jeudi 3 octobre 2019

Run parallel tests in TestNG with priority

i have two sets of test in the suite xml which can run in 3 nodes. The first set contains longer tests and the other set contains the remaining tests. First set of tests should be executed first only then the second set should run. Also, the second set should start right after a node is empty instead of waiting for the first set to complete.

This is what i've tried so far. The second set only starts after the first set is completely executed.

<suite name="taste" parallel="instances" thread-count="3">
       <test name="Long Tests" parallel="instances" thread-count="3">
            <classes>
                <class name="Test1.1"/>
                <class name="Test.1.2"/>
                <class name="Test1.3"/>
            </classes>
        </test>


        <test name="Remaining Test" parallel="instances" thread-count="3">
            <classes>
                <class name="Test2.1"/>
                <class name="Test2.2"/>
                <class name="Test2.3"/>
                <class name="Test2.4"/>
            </classes>
        </test>
</suite>

Required:
 test 1.1
 test 1.2
 test 1.3
 test 2.1
 test 2.2
 test 2.3
 test 2.4

Aucun commentaire:

Enregistrer un commentaire