4

I have Java unit tests which I run using JUnit plugin in Eclipse. After all tests are completed in eclipse, I can export the result in .xml format which I use it to upload the results in test result tracking tool.

Now I am running same tests in AIX system where I am using command line to run JUnit tests.

My command is

java org.junit.runner.JUnitCore com.rsa.qa.sae.test.testClassName

Now I want to get results of these tests in a similar XML file.

How can I get it?

user358591
  • 432
  • 3
  • 5
  • 15

1 Answers1

3

The base JUnit library doesn't produce reports. Various libraries that run JUnit do (Ant, Eclipse, etc etc).

If you can't/won't use those tools, then you need to generate the report yourself by implementing a RunListener, and creating your own main method that registers it with JUnitCore. Using that you can generate the XML in whatever form you'd like.

Similar questions:

Community
  • 1
  • 1
sharakan
  • 6,821
  • 1
  • 34
  • 61