jeudi 25 mai 2017

TestNG - Run each instance from TestNG factory as separate test

I am using TestNG for test automation along with ReportNG for reporting. I use a TestNG factory class to provide different inputs for my tests. The problem which I face here is that all test instances supplied by the factory run under the same test, and the report generated displays all the scenarios under a single test.

I want to run each test instance supplied by the factory as a separate test. Is there any way to do this? PFB my xml configuration

<suite name="Default suite" parallel="classes">
<listeners>
         <listener class-name="org.uncommons.reportng.HTMLReporter" />
</listeners>
<test verbose="2" name="Default test" group-by-instances="true">
    <classes>
        <class name="com.test.factory.RAExcelFactory"/> 
    </classes>
  </test> <!-- Default test -->
</suite> <!-- Default suite -->

Aucun commentaire:

Enregistrer un commentaire