2
0
forked from Wavyzz/dolibarr
Files
dolibarr-fork/test

README (English)
--------------------------------
This directory contains unit tests for Dolibarr code.
To use them, you must:

* Install PHPUnit
If using Eclipse, you must also add an entry as external tool for phpunit programm with:
-Name:      PHPUnit
-Location:  Linux:   /usr/bin/php
            Windows: C:\Program Files (x86)\wamp\bin\php\php5.2.8\php.exe
-Workspace: ${workspace_loc}
-Arguments: Linux:   /usr/bin/phpunit ${resource_path}
            Windows: "C:\Program Files (x86)\PHPUnit-3.4.9\phpunit.php" ${resource_path}

* Run Unit tests: 
Run > phpunit TestFile.php
If using Eclipse, select the test and click on menu "Run external tools and choose PHPUnit".

* Generate a report of Unit tests code coverage among tested classes only:
Run > phpunit --coverage-html ./report MyTestSuite.php
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 528MB.
Run > phpunit --configuration ./phpunittest.xml --coverage-html ./report MyTestSuite.php