my dog learned polymorphism
The moose likes Testing and the fly likes Junit reports for Hudson Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Junit reports for Hudson" Watch "Junit reports for Hudson" New topic

Junit reports for Hudson

ParagM Pmahajan

Joined: Nov 16, 2011
Posts: 10
Hi ,

I am able to successfully run my JUnit test suite from the command line and now I want run these tests from Hudson.

However , for Hudson to generate the reports , it needs a results file (I think in xml format) .

How do I generate a results file from JUnit ? I am using the following command to run the tests :
java com.nvidia.tests.TestSuite1

I am not using any build tool as I compile the test suite with javac and run with java.

Thanks in advance .
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32635

That xml file is generated when you run junit from ant or maven. Since you aren't using any build tool now, I recommend Ant. That way you don't have to restructure your project/use the Maven lifecycle. With Ant, you can write a build script that just executes the <junit> task.

[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
ParagM Pmahajan

Joined: Nov 16, 2011
Posts: 10
Thanks Jeanne .
I agree. Here's the link:
subject: Junit reports for Hudson
It's not a secret anymore!