Update phpunit setup

This commit is contained in:
Laurent Destailleur 2012-01-11 15:28:53 +01:00
parent 4b1ac579f2
commit c7e39e3f8d
2 changed files with 3 additions and 2 deletions

1
test/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/report

View File

@ -25,7 +25,7 @@ If using Eclipse, select the test and click on menu "Run external tools and choo
* Generate a report of Unit tests code coverage among tested classes only: * Generate a report of Unit tests code coverage among tested classes only:
> cd test > 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/MyClassTest.php > phpunit -d memory_limit=-1 -d max_execution_time=600 -d max_input_time=600 --configuration ./phpunit/phpunittest.xml --coverage-html ./report --coverage-clover ./report/logs/phpunit.coverage.xml --log-junit ./report/logs/phpunit.xml phpunit/MyClassTest.php
Note that xdebug must be installed for this feature to work. Note that xdebug must be installed for this feature to work.
* Generate a report of Unit tests code coverage among all Dolibarr classes: * Generate a report of Unit tests code coverage among all Dolibarr classes:
@ -33,7 +33,7 @@ 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" Remove all files into dolibarr root found with "find . | grep CVS\/Base\/ | grep \.php"
> cd test > cd test
> 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 > phpunit -d memory_limit=-1 -d max_execution_time=0 -d max_input_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 timeout before end, try this: If there is a timeout before end, try this:
> cd test > cd test