Below is my project structure in eclipse :
->testclasses
---->AccountTest(Priority of Methods from 1-6)
---->BillingTest(Priority of Methods from 7-13)
---->HomePageTest(Priority of the only method is 17)
---->SupportTest (Priority of Methods from 14-16)
All the test classes above have methods where priority is set in incremental order as shown above.
Now when I right click on testclasses package and run it as Testng. It starts the execution with HomePageTest.
I am setting the priority of my test methods as below :
@Test(priority=6, dataProvider="Setup")
I want the execution to be as per the priority defined for each method and Thus method with priority 1 should execute first irrespective of which class it is in.