I'm new to Automation and wondering how do I execute 2 test classes in a specific order if they belong to different tests.
I have the following testng.xml
file:
<suite name="myTestProject" parallel="false">
<listeners>
<listener class-name="utility.eTestListener"></listener>
</listeners>
<test name="LOGINTEST">
<parameter name="browserName" value="chrome"/>
<parameter name="url" value="https://url/"/>
<groups>
<define name = "all">
<exclude name="negativeTest"/>
<include name="loginTest"/>
</define>
<run>
<include name = "all"/>
</run>
</groups>
<classes>
<class name="site.tests.suite.TestClass1"/>
</classes>
</test>
<test name="FILE_RECON">
<groups>
<define name = "all">
<include name="IncomingVisa"/>
</define>
<run>
<include name="All"/>
</run>
</groups>
<classes>
<class name="site.tests.suite.TestClass2"/>
</classes>
</test>
</suite>
When executing the project, TestClass2 is executed first.
How can I change the testng.xml
or perform some other changes in order for the TestClass1 run first and TestClass2 run second?