This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 174173

Summary: JUnit results show 0 seconds for individual tests
Product: java Reporter: dmitri616 <dmitri616>
Component: JUnitAssignee: Victor Vasilyev <vvg>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: Windows Vista   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 160777, 171050    
Bug Blocks:    

Description dmitri616 2009-10-09 02:51:38 UTC
Only total test execution time is shown. Individual test cases always show 0.0s; the tree looks (running one class, as
example) like this:
  All 2 tests passed.(15.007 sec)
     com.my.SampleTest passed
         testLoop passed (0.0s)
         testLoop2 passed (0.0s)

When this feature used to work, it was useful for measuring performance.

Product Version: NetBeans IDE 6.7 (Build 200906241340)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Windows Vista version 6.0 running on x86; Cp1252; en_AU (nb)

(All plugins are updated at the time of reporting.)
Comment 1 pribyl 2009-10-13 10:48:49 UTC
Reproducible

Note: if 'Compile on Save' is disabled in tested project, the text execution time is shown.
Comment 2 dmitri616 2009-10-13 14:17:25 UTC
In my case, "Compile On Save" option affected the test output differently:
- it was off all the time, and all tests showed 0.0s
- I turned it on, and times were shown
- I run the test again, and it is was 0.0s again
- I turned the option off, and no times were shown
That is, test times were displayed only once, the first time I run a test after turning on "Compile on save".
I probably should add that my test cases use both System.out printing, and default Java logging with Level.INFO
Comment 3 Victor Vasilyev 2009-10-13 15:09:04 UTC
Seems a cause is the same as described in the Issue 171050, i.e. the disabling of generating of the JUnit test results
in the "xml" form (see Issue 160777). 
Comment 4 Victor Vasilyev 2009-10-20 15:53:04 UTC
Seems all will work properly if the Issue 171050 will be fixed.
I'll close this issue as a duplicate.

*** This issue has been marked as a duplicate of 171050 ***