diff --git a/test/README b/test/README index 75f248986b8..4b573b22b3e 100644 --- a/test/README +++ b/test/README @@ -30,16 +30,31 @@ Note that xdebug must be installed for this feature to work. * Generate a report of Unit tests code coverage among all Dolibarr classes: Increase your PHP memory (memory_limit in php.ini) to 512MB. -Check that you use the "mysqli" driver in your conf.php file (otherwise -edit the file phpunittest.xml). +Check that you use the "mysqli" driver in your conf.php file (otherwise edit the file phpunittest.xml). +Remove all files into dolibarr root found with "find . | grep CVS\/Base\/ | grep \.php" > cd test -> phpunit -d memory_limit=-1 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/AllTests.php +> phpunit -d memory_limit=-1 -d max_execution_time=0 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/AllTests.php + +If there is a fu... timeout before end, try this: +> cd test +> php -d max_input_time=0 -d max_execution_time=0 /usr/bin/phpunit -d memory_limit=-1 -d max_input_time=0 -d max_execution_time=0 --configuration ./phpunit/phpunittest.xml --coverage-html ./report phpunit/AllTests.php +puis renice -11 du process php + + + +PHP-CODESNIFFER +--------------- +* Install phpcs + +* Launch PHP-Codesniffer: +> cd test +> phpcs --debug -d memory_limit=-1 --configuration=./phpunit/phpunittest.xml --phpunit-xml=./report/logs/pdepend.xml --summary-xml=./report/logs/summary.xml --jdepend-chart=./report/logs/jdepend.svg --overview-pyramid=./report/logs/pyramid.svg --ignore=custom,custom2,adodbtime,artichow,ckeditor,efc_xfss,fckeditor,fpdf,geoip,magpierss,nusoap,odtphp,phpexcel,php_writeexcel,smarty,smtps,tcpdf,vcard ../htdocs PHPDEPEND --------- -* Install PDepend +* Install pdepend * Launch PDepend analysis: > cd test diff --git a/test/phpunit/phpunittest.xml b/test/phpunit/phpunittest.xml index eee177bc1ad..d9d90bcd8a5 100644 --- a/test/phpunit/phpunittest.xml +++ b/test/phpunit/phpunittest.xml @@ -4,9 +4,16 @@ ../CVS/ + ../../build/ + ../../dev/ + ../../doc/ + ../../htdocs/CVS/ ../../test/ ../../htdocs/custom/ ../../htdocs/custom2/ + ../../htdocs/products/canvas/ + ../../htdocs/contact/canvas/ + ../../htdocs/societe/canvas/ ../../htdocs/includes/adodbtime/ ../../htdocs/includes/artichow/ ../../htdocs/includes/barcode/php-barcode/ @@ -43,9 +50,16 @@ ../../htdocs/includes/modules/fichinter/modules_fichinter.php ../CVS/ + ../../build/ + ../../dev/ + ../../doc/ + ../../htdocs/CVS/ ../../test/ ../../htdocs/custom/ ../../htdocs/custom2/ + ../../htdocs/products/canvas/ + ../../htdocs/contact/canvas/ + ../../htdocs/societe/canvas/ ../../htdocs/includes/adodbtime/ ../../htdocs/includes/artichow/ ../../htdocs/includes/barcode/php-barcode/