Unittest command now shows time taken

at 2010-12-31 in Unittests by friebe (0 comments)

TimeThe unittest command distributed along with the XP Framework now includes the total time all the unittests it executed in one run have taken:

  $ unittest -e '$this->assertEquals(1, 1);'
[.]

OK: 1/1 run (0 skipped), 1 succeeded, 0 failed
Memory used: 3499.33 kB (3905.10 kB peak)
Time taken: 0.000 seconds
Granted, in this case, the execution time is too fast to be displayed in milliseconds - for the XML testsuite, though, the time is "measureable":



  $ unittest devel/xp/trunk/ports/unittest/xml.ini
[...............................................................N........
.........................................................................
.........................................................................
..........]

OK: 227/228 run (1 skipped), 227 succeeded, 0 failed
Memory used: 6320.95 kB (6500.18 kB peak)
Time taken: 0.270 seconds
Your mileage on this will vary:-)



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases
5.8-SERIES
Unicode
Language
5.9-SERIES

Related

Find related articles by a search for «Unittest».