2

I want to execute many test ng suites, which are included in one testng.xml file

testng.xml:

<?xml version="1.0" encoding="UTF-8"?>
<suite name="main_file">
    <suite-files>
        <suite-file path="testng1.xml"></suite-file>
        <suite-file path="testng2.xml"></suite-file>
    </suite-files>
</suite>

testng1.xml is done that way

<?xml version="1.0" encoding="UTF-8"?>
<suite name="testng1"  parallel="methods" thread-count="8" >
    <test name="testng1">
        <classes>
        <class name="myclasses1" />
        <class name="myclasses2" />
        <class name="myclasses3" />
        <class name="myclasses4" />
    </classes>
</test>
</suite>

So now the main tests suites are executed sequentially and the included test cases are running parallel.

So what I want is, that test cases of testng1.xml can be executed at the same time when testng2.xml are executed. Is there any way to set some tags or something?

Stefan
  • 21
  • 1
  • I think it was answered in this link: http://stackoverflow.com/questions/26810342/is-there-a-possible-way-to-run-two-xml-files-in-testng-xml-parallel – Fady Saad Mar 31 '17 at 08:25
  • Thank you, to summarise it it. You cannot set it in xml, but you can execute the test case with execution parameters like -suitethreadpoolsize 3. That works very fine! – Stefan Mar 31 '17 at 08:54
  • Did you try to set `parallel=test` directly in `testng.xml`? Because `suite-file` is like an import and the actual suite will contain all test nodes. – juherr Apr 20 '17 at 21:10

0 Answers0