TestNG: Running multiple suites with preserved order using <suite-files> tag

Jacko Moore picture Jacko Moore · Sep 24, 2014 · Viewed 7.5k times · Source

I am trying to run multiple suites from one overall suite file. I define the suites I need to run and run the "master" suite file. I have used preserve-order to run each suite in sequence, however the behaviour is not as I would expect. It seems that it runs them straight away, one after the other, almost in parallel.

Does anyone know a way I can execute the suites, preserving the order, ideally waiting for first suite to finish before second suite will run?

My suite setup 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, Jacko

Answer

VolleyJosh picture VolleyJosh · Oct 29, 2014

Is the issue that you haven't specified the attribute correctly? It should be

preserve-order="true"

not

preserver-order=true