diff --git a/test/MyTestSuite.php b/test/MyTestSuite.php index aad027b820e..6efb28f4f28 100644 --- a/test/MyTestSuite.php +++ b/test/MyTestSuite.php @@ -23,6 +23,9 @@ * \version $Id$ * \remarks To run this script as CLI: phpunit filename.php */ +print "PHP Version: ".phpversion()."\n"; +print "Memory: ". ini_get('memory_limit')."\n"; + global $conf,$user,$langs,$db; //define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver require_once 'PHPUnit/Framework.php'; diff --git a/test/README b/test/README index 6a1ca6b9dac..fd69598d839 100644 --- a/test/README +++ b/test/README @@ -16,7 +16,11 @@ If using Eclipse, you must also add an entry as external tool for phpunit progra 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: -Run > phpunit [--configuration ./phpunittestok.xml] --coverage-html ./report MyTestSuite.php +* 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 1Gb. +Run > phpunit --configuration ./phpunittest.xml --coverage-html ./report MyTestSuite.php + diff --git a/test/phpunittestok.xml b/test/phpunittest.xml similarity index 100% rename from test/phpunittestok.xml rename to test/phpunittest.xml diff --git a/test/phpunittestko.xml b/test/phpunittestko.xml deleted file mode 100644 index c01af5e011b..00000000000 --- a/test/phpunittestko.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - ../test/ - - - ../htdocs/ - - - \ No newline at end of file