dolibarr/test
2010-05-08 18:38:17 +00:00
..
.cvsignore New: Add phpunit tests 2010-04-26 23:20:14 +00:00
AdherentTest.php Update unit tests 2010-05-05 17:35:36 +00:00
BuildDocTest.php Add more PHPUnit tests 2010-05-08 18:38:17 +00:00
CommandeTest.php Update unit tests 2010-05-05 17:35:36 +00:00
CommonObjectTest.php Update unit tests 2010-05-05 18:18:09 +00:00
ContratTest.php Update unit tests 2010-05-05 17:35:36 +00:00
DateLibTest.php Add phpunit tests 2010-05-06 19:18:48 +00:00
FactureTest.php Add more PHPUnit tests 2010-05-08 18:38:17 +00:00
MyTestSuite.php Add more PHPUnit tests 2010-05-08 18:38:17 +00:00
phpunittest.xml Add more PHPUnit tests 2010-05-08 18:38:17 +00:00
PropalTest.php Update unit tests 2010-05-05 17:35:36 +00:00
README Add phpunit tests 2010-05-05 22:41:54 +00:00
UserGroupTest.php According to new tree directory 2010-05-06 18:06:19 +00:00
UserTest.php Update unit tests 2010-05-05 17:35:36 +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 528MB.
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