aspose file tools*
The moose likes Testing and the fly likes Junit support Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Junit support" Watch "Junit support" New topic
Author

Junit support

Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 300
Hi,
Suppose you are using JUnit extensively in your project. You want to persist test results to a database. So say you have a table in a database which has column such as test suite, test name, pass / fail, execution time etc and you wish to store all tests results from your build in it.

Now, you could write your own framework which wraps around Junit but I am wondering is there anything already that does this?

Even just to give me the test times, and test status I could then just put this in the database very easily using JPA.

Any advice?

Thanks.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31054
    
162

First, I'd consider using Hudson/Jenkins which stores all past results via the tool and provides nice reporting.

If you want to do it yourself, I think you'd have to write something yourself. The Ant junit report task provides a nice XML file that you could read with XPath or the like.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Junit support