views:

294

answers:

2

The JUnit integration with eclipse is very nice. However, I would like a feature to be able to generate a quick report from the Unit Tests. It is possible to do so when running a headless build (and my nightly build is configured to do so), but sometimes I want to generate a report from the UI.

Is there anyway to do this? command line options maybe? an extra plugin? maybe the functionality is already there and I can't find it?

EDIT: I have a PDE build, as my project is an RCP application. Thus, running the tests from this build is not really straight-forward. I guess I could try to hack a smaller ANT script to do the test, but then probably I have to fight with the classpath to obtain what I want. I was hoping to find some extension to the already existing JUnit plugin that would provide the information on the tree view, but as an HTML document.

+1  A: 

You can use ant and generate HTML report [I think you can use Ant in Eclipse]
I found these link but you can survey more :
JUnitReport Task
JUnit Tutorial
JUint Report

SjB
A: 

I'm not sure if you want a "physical" report that you can distribution or just more information you can view in your IDE.

Either way I agree with SjB's advice on configuring Eclipse to run the ant script generating the report in your nightly build.

If it's not possible to run the nightly build locally, you can do some very simple build script hacking following the links in SjB's answer.

You also might want to check out the Ant JUnit Task Manual Page

austen