views:

27

answers:

1

Environment: JUnit 4, JDK 6 I would like to log all test names (annotated with @Test) and figure out the amount of time taken to execute each tests executed by JUnit in a standard J2SE environment.

Should I rely on in-built JDK logging Logger.entering / exiting with System.currentTimeInMillis or is there a better way to do this.

+3  A: 

What about the XML files JUnit produces? They contain the tests run (classname & method name) and the time they took to run.

Example XML document

mlk