I have JUnit 3 setup on Eclipse Helios. I created a test case to add 1 million users through a web service and test the result.
I don't quite understand JUnite timing, the result (on JUnit output):
<?xml version="1.0" encoding="UTF-8"?>
<testrun name="UserRegistrationTestCase" project="TestCases" tests="1" started="1" failures="0" errors="0" ignored="0">
<testsuite name="testcases.UserRegistrationTestCase" time="8880.946">
<testcase name="testCreateUser" classname="testcases.UserRegistrationTestCase" time="8880.946"/>
</testsuite>开发者_如何学C
</testrun>
The time says on the JUnit display: 8,880.946 s
. What does that mean? Does that display in seconds (whereas in the XML the time="8880.946"
)?
Is 8880.946
(in XML) in milliseconds? If not, how would I configure Eclipse JUnit to allow time to display in milliseconds (The reason I ask is because I initially added 1000 users and the result came to 13.593s
).
The timing is always in seconds. Not sure how to change it, and with that large a number, why would you want to?
If you want the time in milliseconds, you can of course move the decimal 3 places to the right.
This is the format in which the time is present in xml:
seconds.ms
So in your case it is 8880 seconds and 946 millis
精彩评论