PhpUnit2 - Unit test framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  
Hi,

I am trying to use PHPUnit2 package under pear to run unit test for php scripts.

Finally after pulling lotta hairs from my head, I am able to run phpunit command line utilty to run test. 

I am still not sure how to get the result of the test in xml (or text or html) format. phpUnit --help says by using it like this:
/*
Usage: phpunit [switches] UnitTest [UnitTest.php]
--testdox-html <file> Log test progress in TestDox/HTML format to file.
--testdox-text <file>  Log test progress in TestDox/Text format to file.
--log-xml <file>       Log test progress in XML format to file.
--loader <loader>      TestSuiteLoader implementation to use.
--skeleton             Generate skeleton UnitTest class for Unit in Unit.php.
--wait                 Waits for a keystroke after each test.
--help                 Prints this usage information.
--version              Prints the version and exits.
*/

I tried using the following:

1) phpUnit Run.php
It gives the result of test and other things on system out. (monitor)

2) phpUnit --testdox-html myHtmlFile.html UnitTest Run.php
It still givest the result of the test on system output.

3) phpUnit --log-xml <mylog.xml> UnitTest Run.php
The system cannot find the file specified.

4) phpUnit --log-xml mylog.xml UnitTest Run.php
Still on system out.

5)phpUnit --log-xml "c:/../../mylog.xml" UnitTest Run.php
Still on system out.

Has anybody used this framework. I went to its site (http://www.phpunit.de/en/index.php) and still no detail documentation about its usage.

Any help in this would be highly appreciated.

Thanks!
Regards,

Dipesh

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux