I have a question regarding the @Test(dependOnMethods{""}).. I want my tests to run in a particular order so I hit every test that I have written. The best way to do this so far, atleast that I have found, is the dependsOnMethods! However, since the tests to come after requires the one before it to pass, I cant run all of my tests and see which ones failed. My program just exits! So here is what I'm working with..
@Test(dependsOnMethods = {"shouldSelectAmountOfDoors"})
public void shouldSelectExtColor() throws InterruptedException{
sycOptionalInfoPage.selectExtColor("GREEN");
}
@Test(dependsOnMethods = {"shouldSelectExtColor"})
public void shouldSelectIntColor() throws InterruptedException{
sycOptionalInfoPage.selectIntColor("GOLD");
}
@Test(dependsOnMethods = {"shouldSelectIntColor"})
public void shouldEnterAComment() throws InterruptedException{
sycOptionalInfoPage.enterComments("<(*-<) <(*-*)> (>-*)> woot!");
takeABreakYo();
}
Boom. Very easy to understand and trusty POM! But, if my shouldSelectIntColor() fails due to a changed id from the dev team, I want the shouldEnterAComment to still run! How can I continue to keep my tests chained in a line, but still run after a failure? Thanks :)
Aucun commentaire:
Enregistrer un commentaire