How to run test classes one by one inside <test> tag using maven

75 views Asked by At

I have below testng xml but its not working. Every time running by maven it strat execution on three browsers. I want to run all classes one by one.

<?xml version="1.0" encoding="UTF-8"?>

<parameter name="browser" value="${browser}" />
<parameter name="execution" value="${execution}" />

<test name="POC Test" preserve-order="true" thread-count="1" >
    <classes>
        <class name="com.testscript.OurPurposeTest" />
        <class name="com.testscript.ContactUsTest" />
        <!-- <class name="com.testscript.ChevronTest" /> -->
        <class name="com.testscript.SearchTest" />
        <class name="com.testscript.FinancialRegulatoryReportsTest" />
        <class name="com.testscript.CompanyHistoryTest" />
        <class name="com.testscript.HomePageTest" />
    </classes>
</test> <!-- POC Test -->

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.9</version>
            <configuration>
                <suiteXmlFiles>
                    <suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
                </suiteXmlFiles>
            </configuration>

        </plugin>
0

There are 0 answers