TestNG: running multiple sets with the saved order using the <suite-files> tag
I am trying to run multiple sets from one package file. I define the classes that I need to run and run the "master" file. I used save-order to run each set sequentially, however the behavior is not as I expected. It seems that he runs immediately, one after another, almost in parallel.
Does anyone know a way that I can execute packages while keeping order, ideally waiting for the completion of the first set before the second package is launched?
My set of settings is as follows:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" > <suite name="My test suite" preserver-order=true> <suite-files> <suite-file path="Test1.xml"></suite-file> <suite-file path="Test2.xml"></suite-file> <suite-file path="Test3.xml"></suite-file> </suite-files> </suite> Regards, Jaco
According to the testng documentation ,
By default, TestNG will run your tests in the order in which they are in the XML file. If you want the classes and methods listed in this file to execute in an unpredictable order, set the save-order attribute to false
In addition, if you want execution to be performed in an unpredictable way, you can do it as follows.
<suite name="My test suite" preserver-order="false"> <suite-files> <suite-file path="Test1.xml"></suite-file> <suite-file path="Test2.xml"></suite-file> <suite-file path="Test3.xml"></suite-file> </suite-files> </suite> You must specify
preserve-order = "false"
not
preserve-order = false