JUnit statistic "time elapsed" includes setUp() time

Is there a way to get the time elapsed of the test itself, not including setUp() time?

My use case is I'm doing some database tests, and my fixture (setUp() method) primes the database in a consistent way. Depending on the condition of the database when I start, this time varies in an arbitrary manner.

I do have YourKit, but for a simple thing like comparing two different test() methods it would be nice just to read the times from IDEA's statistics tab.

John Hurst
(Wellington, New Zealand)

Please sign in to leave a comment.