mercredi 22 novembre 2017

How to programmatically run all test cases forever?

How to programmatically run all test cases forever ? Below is the setup i have … now i have to run this code infinitely …another requirement is i need to restart the app again after @aftersuite… i need to tear down the test cases because i need to produce report after each aftersuite …

For example :

public class SimpleTest() extends TestBase

    {

    AppiumDriver driver;

    @BeforeSuite
    public void setUp() throws MalformedURLException {

       // DesiredCapabilities and all setup

    }
    @Test(priority = 1)
    public void testcase1()throws InterruptedException {

        login();
    }
    @Test(priority = 2)
    public void testcase2() throws InterruptedException {

        //something

    }

    @Test(priority = 3)
    public void testcase3() throws InterruptedException {

      //something
    }
    @Test(priority = 4)
    public void testcase4 throws InterruptedException {

     //something

    }
    @Test(priority = 5)
    public void testcase() throws InterruptedException{

      //something

    }

    @Test(priority = 6)
    public void testcase6() throws InterruptedException{

     //something
    }

    @Test(priority = 7)
    public void testcase_logout() throws InterruptedException {
        logout();
    }

    @AfterSuite
    public void testCaseTearDown()
    {
    driver.quit();
    }

    }

Aucun commentaire:

Enregistrer un commentaire