@Test(priority=2)
public class PositiveTests {
public void loginTest() {
}
@Test(priority=1)
public class NegativeTests {
public void negativeLoginTest() {
}
TestNg.xml
<classes>
<class name="com.herokuapp.theinternet.PositiveTests" />
<class name="com.herokuapp.theinternet.NegativeTests">
</classes>
-->> Will the priority work here? Which class will run first? Positive Test or Negative Test?
priority works for @Test methods inside class.
To run classes in specified order, we need to use preserver-order as'true'