Meaningless Drivel is fun!*
The moose likes Testing and the fly likes How to creat a report from JUnit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "How to creat a report from JUnit" Watch "How to creat a report from JUnit" New topic
Author

How to creat a report from JUnit

Gynnad Paullussen
Ranch Hand

Joined: Jan 26, 2011
Posts: 49
Hello All,

I know how to use JUnit, I always used it only in netbeans and ecplise to see if all the code is conform with the tests. Know I’m building a tool and I want to call external the JUnit testcase and get a nice report from it. But I don’t know how to get a report from JUnit, I’m reading everywhere that is it possible but never see how to do it.

Thanks already for the answers!
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 761
    
    9
Do you want to dynamically create a jrxml file or you already have one and just want to fill it in with results and display it?
Gynnad Paullussen
Ranch Hand

Joined: Jan 26, 2011
Posts: 49
E Armitage wrote:Do you want to dynamically create a jrxml file or you already have one and just want to fill it in with results and display it?


I have nothing, only JUnit tests..
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 761
    
    9
Try integrating your tests with DynamicJasper http://dynamicjasper.com/
They have lots of examples showing how things are done:http://dynamicjasper.com/documentation-examples/how-to-2/
Gynnad Paullussen
Ranch Hand

Joined: Jan 26, 2011
Posts: 49
E Armitage wrote:Try integrating your tests with DynamicJasper http://dynamicjasper.com/
They have lots of examples showing how things are done:http://dynamicjasper.com/documentation-examples/how-to-2/


Hmm.. I don't think it is usefull.. I will tell you want my ideas are. I have a Content Management System on my server, I can add plugins to that CMS. And I want to test if the Plugins are working correct in the current version of CMS. So I make a viewtool in the plugins where I will call the tests in the plugin. They will run the tests, but now comes the problem: I want some feedback from that tests. So I need a report from the tests, but it is not just one plugin but 25 or something. So my question is, How can I create the report and How can I merge them together?
linda russel
Ranch Hand

Joined: Jan 05, 2012
Posts: 86
you can create nice reports if you use maven plugins and using Jenkins is also a good idea
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 761
    
    9
Yes I agree with the maven plugins. The sure-fire-report one is nice: http://maven.apache.org/plugins/maven-surefire-report-plugin/

I'm now trying to figure out how I got it into my head that you had mentioned something about Jasper reports. My eyes must have added random text into your words.

Kind regards

E Armitage(<-----clearly getting old
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to creat a report from JUnit
 
Similar Threads
Not able to generate Junit Report
Taking Report for junit
junit test report eclipse?
IBM BPM 7.5 Standard Process Center Process Server Connection / Communication
Junit Help