The moose likes Testing and the fly likes Taking Report for junit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Testing
Bookmark "Taking Report for junit" Watch "Taking Report for junit" New topic
Author

Taking Report for junit

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980
how to generate reports using junit..

if i run a test for one class..
i want see it in eclipse ..IDE..the resulsts...but how to capture it as a report...
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2543
    
  10

One posibility is to use Ant.
You can use Ant's JUnit and JUnitReport tasks to create a html report for your tests.

Regards, Jan


OCUP UML fundamental and ITIL foundation
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980
And how to generate it without Ant ...??
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2543
    
  10

Maven also allows you to create a report of your JUnit tests.
I am not aware of any other solution.

Regards, Jan
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

If you just want the failures (as opposed to a pretty report with all the tests), you could use the text runner that comes with JUnit and store the output.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 980
Thanks everyone....

I am able to created junit reports using ant build script
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Taking Report for junit
 
It's not a secret anymore!