Skip to content
startingwithseleniumwebdriver edited this page Oct 8, 2016 · 3 revisions

RealTime TestNG Report is created to get the result status at runtime test .Speciality of this report is user don't need to change any existing code base to generate this report, only need to add a listener tag to generate this realtime report. As an example if before using this report TestNg file looks like

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
<test name="Test">
	<classes>
		<class name="report.test.google.VerifyGoogleHome" />
	</classes>
</test> <!-- Test -->
</suite> <!-- Suite --> 

If user have wish to generate this report then simply add the listner tag in TestNg.xml file .So modified TestNg xml looks like below:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
<listeners>
	<listener class-name="report.realtime.listener.RealTimeTestResultListener" />
</listeners>
<test name="Test">
	<classes>
		<class name="report.test.google.VerifyGoogleHome" />
	</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->  

Under the project directory RealTimeReport directory will be created automatically after started to execute the suite.

Clone this wiki locally