Hi, Answer 1) coverage.inc.php is only used for code coverage, but not for metrics. To exlude directory from metrics, you need to edit runmetrics file and add directory to ignore: ./pdepend --ignore external_library
Answer 2) Current testing library is not working with 5.2 version of the shop, as deprecated methods (getInstance()) was removed from the shop. I would suggest to use new testing library https://github.com/OXID-eSales/testing_library which is currently in alpha stage, but should work fine with newer shop versions or change all the usages of oxConfig::getInstance() to oxRegistry::getConfig() in current testing library. If you will go with the new testing library option, please give us any feedback on how easy it is to use it and what problems are still left there. Aurimas Gladutis Software Developer [email protected]<mailto:[email protected]> Fon +49 761 36889-0 Fax +49 761 36889-29 www.oxid-esales.com<http://www.oxid-esales.com?campaign=emailsignatur/oxid-esales-com?adword=OXSIG_Startseite> [dmexco] Köln, 10.-11.09.2014, Halle 7 Stand C 011/D 010 Jetzt Termin vereinbaren<http://www.oxid-esales.com/index.php?id=2622&adword=OXSIG_DMEXCO14> OXID eSales AG Bertoldstraße 48 79098 Freiburg Deutschland Vorstand: Roland Fesenmayr (Vorsitzender), Andrea Seeger Vorsitzender des Aufsichtsrats: Michael Schlenk, Sitz: Freiburg Amtsgericht Freiburg i. Br., HRB 701648, USt-IdNr.: DE231450866 ________________________________ From: [email protected] [[email protected]] on behalf of Nicolas Hodin [[email protected]] Sent: Friday, February 06, 2015 9:52 AM To: [email protected] Subject: [oxid-dev-general] Module certification and unit tests 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<http://www.takeitweb.fr/>
_______________________________________________ dev-general mailing list [email protected] http://dir.gmane.org/gmane.comp.php.oxid.general
