phpunit testing framework and phpunitwebui
Posted: Thu Jul 21, 2011 10:54 pm
Hi, I found phpunitwebui here http://sourceforge.net/projects/phpunitwebui/ and I'm trying to get it setup to use because I don't understand how to use phpunit by it's self when I don't get any type of visual confirmation that the test ran. Maybe I'm missing how to use phpunit.
Either way, I have some questions about the config.php file in phpunitwebui.
I got the first line set right for the root directory of the tests because that got me past a page full of errors but now when I go to the index.php page in a browser I get a little box that says "no tests found. Please check out your config file." I grabbed a copy of a simple test from here http://www.phpunit.de/manual/current/en ... punit.html and I also dropped a copy of phpunit into the root directory and put that in the PHPUNIT_DIR config line.
I think the main things I'm confused about are "phpunit command line script", "test case prefix", and "Test suffix" Also please see the commented debug echo I put in for directory path. Looks wrong to me with back slashes.
Can anyone tell me how you would interpret this config file?
I have the directories set up with phpunit, phpuniwebui, and unit_tests all side by side in the unit_testing root directory.
Thank you
Either way, I have some questions about the config.php file in phpunitwebui.
Code: Select all
<?php
/**
* PHPUnit Test Runner WUI Sample config file.
*/
// the root directory of the tests
define('ROOT_DIR', '../testunits');
// excluded folders patterns
$exclude = array('/PHPUnit/');
// test file suffix (used to determine test files from other files)
define('TEST_SUFFIX', 'Test');
// the directory where the code coverage reports will be generated
define('CODE_COVERAGE_DIR', dirname(__FILE__) . '/CodeCoverageReports');
// location of the PHPUnit command line script
define('PHPUNIT', dirname(dirname(__FILE__)) . '/phpunit');
// location of the PHPUnit framework folder
// define this if PHPUnit is not in the include path
define('PHPUNIT_DIR', dirname(dirname(__FILE__)) . '/phpunit');
//checking the directory here.
echo PHPUNIT_DIR;
die;//outputs E:\shared_www_root\www\tg\learning\php\unit_testing/phpunit which is the right path but \/? should there be back slashes?
// used for running single test cases
define('TEST_CASE_PREFIX', 'test_');
// used for variable decorator
define('TAB_WIDTH', '4');
// set this to true if you want to use Ajax requests with progressive test loading status
define('USE_AJAX', true);
/*EOF*/I think the main things I'm confused about are "phpunit command line script", "test case prefix", and "Test suffix" Also please see the commented debug echo I put in for directory path. Looks wrong to me with back slashes.
Can anyone tell me how you would interpret this config file?
I have the directories set up with phpunit, phpuniwebui, and unit_tests all side by side in the unit_testing root directory.
Thank you