While running mutliple testng suite xml files via master testsuite & setAppendExisting(true) , the categories are shown only for the last testsuite.However for individual test cases categories are shown properly. Also 3.0.6 version is shown as 3.0.5
Expected Behavior
Even after appending all categories should be shown in dashboard and category view.
Version in dashboard should 3.0.6
Current Behavior
After appending , last category only shown in dashboard and category view.
Version in dashboard is 3.0.5
Sample
Master xml
--------------
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="master">
<suite-files>
<listeners>
<listener class-name="BaseTestListener" /> <!-- This implements ITestListener-->
</listeners>
<suite-file path="testsuite1.xml" />
<suite-file path="testsuite2.xml" />
</suite-files>
</suite>
testsuite1.xml
-----------------
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="suite1">
<test name="suite11">
<!--<listeners>
<listener class-name="BaseTestListener" />
</listeners>-->
<parameter name="Category" value="KimUnJong1"></parameter>
<classes>
<class name="TestNGTest1" />
<class name="TestNGTest2" />
</classes>
</test>
</suite>
Next suite is also similar with category "KimUnJong"
Inside Listener
------------------
@Override
public void onTestStart(ITestResult itr) {
// System.out.println(classes.toString());
if (!classes.contains(itr.getTestClass().getName())) {
test = extent.createTest(itr.getTestClass().getName());
test.assignCategory(itr.getMethod().getXmlTest().getParameter("Category"));
classes.add(itr.getTestClass().getName());
}
}
@Override
public void onStart(ISuite isuite) {
---some code
htmlReporter.setAppendExisting(true);
extent = new ExtentReports();
extent.attachReporter(htmlReporter);
--some code
}
Summary
While running mutliple testng suite xml files via master testsuite & setAppendExisting(true) , the categories are shown only for the last testsuite.However for individual test cases categories are shown properly. Also 3.0.6 version is shown as 3.0.5
Expected Behavior
Current Behavior
Sample
Environment Details
Screenshots
No error while running the tests...