2
0
forked from Wavyzz/dolibarr
Files
dolibarr-fork/test/phpunit
Laurent Destailleur 6f26f35529 Add more phpunit tests
2010-10-13 19:01:22 +00:00
..
2010-08-15 23:19:46 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 14:57:08 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 19:01:22 +00:00
2010-10-03 18:53:40 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 19:01:22 +00:00
2010-10-13 19:01:22 +00:00

README (English)
--------------------------------
This directory contains unit tests and docs for
Dolibarr quality analysis.



PHPUNIT
-------

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 512MB.
Check that you use the "mysqli" driver in your conf.php file (otherwise
edit the file phpunittest.xml).
Run > phpunit --configuration ./phpunittest.xml --coverage-html ./report MyTestSuite.php



PHPDEPEND
---------
* Install PDepend

* Laucnh PDepend analysis:
pdepend --summary-xml=./report/summary.xml --jdepend-chart=./report/jdepend.svg --overview-pyramid=./report/pyramid.svg /yourdir