I'm having some problems with the Priority annotation in TestNG not running test cases. My priority numbers are not sequential, I have intentionally skipped numbers so at a future date I can add some test methods between them so the run in a specific order. Any ideas how I can get TestNG to execute my test methods that follow the number gap? For example, I have priorities in the order of 1 - 3 and then I jump to 200 - 202. The tests with priorities 200 - 202 are not being executed. Thanks for your time.
public class ClassOneTest{
@Test (enabled=true, priority=1)
public void methodOneTest() {
.....
}
/**
* Updates the ServiceNow End Point
*/
@Test (enabled=true, priority=2)
public void methodTwoTest() {
.....
}
/**
* Deletes the ServiceNow End Point
*/
@Test (enabled=true, priority=3)
public void methodTwoTest() {
.....
}
}
public class ClassTwoTest{
@Test (enabled=true, priority=200)
public void methodThreeTest() {
.....
}
/**
* Updates the ServiceNow End Point
*/
@Test (enabled=true, priority=201)
public void methodFourTest() {
.....
}
/**
* Deletes the ServiceNow End Point
*/
@Test (enabled=true, priority=202)
public void methodFiveTest() {
.....
}
}
Aucun commentaire:
Enregistrer un commentaire