Reputation: 9
I want to build a tool in java, where I can see the progress of my Junit test suite execution. Like below.
From this information, I want to build a graphical report.
How to start?
Upvotes: 1
Views: 228
Reputation: 95614
The preferred external facade seems to be JUnitCore, which offers a series of useful run(...)
overloads. Call JUnitCore.addListener
with a RunListener implementation and you should be able to get the notifications you need.
Note that the total number of test cases pending may not be easy to get ahead of time; the test count is available as part of the Description object but by default JUnit doesn't seem to create all the runners and Descriptions until immediately before their run.
Upvotes: 4