I am running Cucumber features using AbstractTestNGCucumberTests.
Each feature file has one corresponding Runner class which extends the AbstractTestNGCucumberTests class.
public class LoginRunner extends AbstractTestNGCucumberTests {
}
public class CreateAccountRunner extends AbstractTestNGCucumberTests {
}
I am also using a Cucumber reporting listener which is an implementation of the ISuiteListener. On finish, the Cucumber ReportBuilder will generate the reports.
public class CucumberReporting implements ISuiteListener{//}
My TestNG.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
<listeners>
<listener
class-name="listeners.reportlistener.CucumberReport" />
</listeners>
<test name="Test - 1">
<classes>
<class name="testrunner.LoginRunner" />
<class name="testrunner.CreateAccountRunner" />
</classes>
</test>
</suite>
As you can see there are two runner classes. When I run testng.xml it executes one runner class and then moves to the next.
In this situation, only the last run feature file is generating the Cucumber report. In other words the reports are getting overwritten. And every run of the xml ends up with one single HTML report.
How can I generate one single report which has results from both the runner classes?