Aazim
Aazim

Reputation: 770

Create test reports programmatically (not using ANT) in Selenium using Junit / Test NG

I want to create test reports (reports generated after the execution of each test case). I can generate JUnit test reports using ANT. But, my requirement is such that I would have to generate these reports through Java.

Which is the best way to create test reports using Java ?

The test reports need not only be created in JUnit. It can be created in any test framework. Any suggestions / advice related to it might prove helpful. So, request you to share you experience in generating test reports using Java.

Upvotes: 2

Views: 4396

Answers (2)

A.J
A.J

Reputation: 4949

TestNG provides a programmatic way to run the tests without using any build file. TestNG suite and other parameters that are being used in build XML have corresponding JAVA classes. Check this link. http://testng.org/doc/documentation-main.html#running-testng-programmatically

You can get the report as mentioned by Tarken.

Upvotes: 0

Tarken
Tarken

Reputation: 2202

TestNG reports get generate automaticlly if you run a suite(xml). Standard folder is test-output in your project. Have a look at the testNG doc at chapter 6.2.2 and following http://testng.org/doc/documentation-main.html how to customize those.

Upvotes: 1

Related Questions