Hello,

In order to certifiy my new module I wanted to launch unit tests on it to
retrieve metrics.

I installed a fresh CE eshop on a ubuntu server and it is working with demo
data.I downloaded the tests directory from the Starter package from
http://www.oxid-esales.com/en/products/downloads/knowledge.html and put it
in my module folder, so i have this tree :

oxidroot
 |__ modules
    |___ mymodule
       |___ classes
       |___ external_library
       |___ tests


Question 1)
When i execute runmetrics.sh in the tests folders, it works and i have two
new files metrics.txt and metrics.xml. The values are very high because i
use an external library and i can see that all classes in this library are
computed.
I tried to add these line to the file coverage.inc.php :

PHPUnit_Util_Filter::removeDirectoryFromWhitelist(oxPATH .
'/modules/mymodule/external_library/');

But it doesn't work, the library is still included in metrics. How can i
blacklist this folder?

Question 2)
When i execute runtests.sh or runcoverage.sh, i have this error :

PHP Fatal error:  Call to undefined method oxConfig::getInstance() in
/var/www/oxid/source/modules/mymodule/tests/unit/test_utils.php on line 585

Fatal error: Call to undefined method oxConfig::getInstance() in
/var/www/oxid/source/modules/mymodule/tests/unit/test_utils.php on line 585


Maybe I'm doing something wrong, is my tests folder at the right place? Did
i forget a config file?


Thanks in advance for your help!


Best regards,

Nicolas Hodin
www.takeitweb.fr
_______________________________________________
dev-general mailing list
dev-general@lists.oxidforge.org
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to