Running suite-of-suites Parallely in Testng




TestNG is a java framework useful to execute the Unit Tests in a java project. We can even TestNG to automate the Selenium Tests in the Project.In TestNG xml file, the execution of Tests is managed by setting the “parallel” attribute and “thread-count” attribute in the suite xml as follows:

  • <suite name=”My suite” parallel=”methods” thread-count=”5″>
  • <suite name=”My suite” parallel=”tests” thread-count=”5″>
  • <suite name=”My suite” parallel=”classes” thread-count=”5″>
  • <suite name=”My suite” parallel=”instances” thread-count=”5″>
  • Now the question arises that how can we execute multiple Testng xml files in the project. The solution is as follows:

    <suite name=”Running Suite Files” verbose=”1″ preserve-order=”true”>
            <listeners>
                    <listener class-name=”org.testng.reporters.VerboseReporter”/>
            </listeners>
            <suite-files>
                    <suite-file path=”testng1.xml”/>
                    <suite-file path=”testng2.xml”/>
            </suite-files>

    </suite>


    How do we execute these suite-of-suite files parallely?

    Conclusion::


    Execution of the ParallelSuites.java program, stores the Results in the output folder.Make sure the Project is refreshed to view the results as mentioned below:

    is-there-a-possible-way-to-run-two-xml-files-in-testng-xml-parallel

    is-there-a-possible-way-to-run-two-xml-files-in-testng-xml-parallel



    1 comment on “Running suite-of-suites Parallely in Testng

    Leave a Reply

    Your email address will not be published. Required fields are marked *