File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Junit support" Watch "Junit support" New topic

Junit support

Luke Murphy
Ranch Hand

Joined: May 12, 2010
Posts: 300
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?

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

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.

[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
I agree. Here's the link:
subject: Junit support
It's not a secret anymore!