TestNG Groups in Multiple XML Package Files

I have test suites generated in three different xml files and two main xml files that call the other three. The only difference between the two main files is that the group is "regression" and the other excludes it.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="MasterSuite">
    <groups>
        <run>
            <include name="regression" />
        </run>
    </groups>

    <suite-files>
        <suite-file path="suiteFile1.xml" />
        <suite-file path="suiteFile2.xml" />
        <suite-file path="suiteFile3.xml" />        
    </suite-files>
</suite>

      

However, the file that includes the "regression" group does not seem to run the tests assigned to the group. Tag doesn't apply to tests called from other xml files? If not, is there a way to run the same test suite (contained in multiple xml files) with or without a group?

+3


source to share


1 answer


Does the following code work for you?



<suite-files>
    <suite-file path="testng.xml">
        <groups>
            <run>
                <exclude name="regression" />
            </run>
        </groups>
    </suite-file>
</suite-files>

      

0


source







All Articles