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 252841 - JUnit Test Results reports incorrect timings
Summary: JUnit Test Results reports incorrect timings
Status: RESOLVED INVALID
Alias: None
Product: utilities
Classification: Unclassified
Component: Test Runner (show other bugs)
Version: 8.0.2
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Theofanis Oikonomou
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-05 19:57 UTC by carlpmiller
Modified: 2015-09-08 14:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description carlpmiller 2015-06-05 19:57:06 UTC
Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Mac OS X version 10.7.5 running on x86_64
Java; VM; Vendor = 1.7.0_71
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.71-b01

Whichever @Test is run first includes the overhead of any @Before method(s). In my opinion this is not correct for reporting timing results against @Tests since it leads one to believe a particular test is taking longer than it actually does. I discovered this by independently profiling each method as it ran comparing the results to what gets reported by the NetBeans IDE when showing JUnit results. I am not sure if this is a problem generated by NetBeans itself or if those timings are coming out of the JUnit suite. Figured you folks would be the best place to start with.

It's easy enough to re-create, define a @Before method that simply sleeps a known number of seconds and then have some @Test methods to see the results.
Comment 1 Theofanis Oikonomou 2015-09-08 14:26:19 UTC
we actually show what we get from whichever testing framework the user has selected eg junit or testng. We have no control over the timings that get produced by each framework. Thank you for reporting though.