Can someone let me know why it stops after the first @test(=1)? It ran the @beforeclass, then @test( 1) then @aftermethod. So it skipped @test(prority=) and @test(=)

public class SDSearchTest {

    private  driver;
    private String baseUrl= "website";
    ExtentReports report;
    ExtentTest test;

    @BeforeClass
    public void beforeClass() {
        driver = new FirefoxDriver();
        driver.get(baseUrl);
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        driver.manage().window().maximize();
    }
    @Test(priority=1)
    public void sdLogin() {
        //enter username and password 


    }

    @Test(priority=2)
    public void testDocument() throws Exception {
        //find the element 1, enter data and drag and drop 

    }
    @Test(priority=3)
    public void pheWastesting() {

       //find the element 2, enter data and drag and drop 


    }
    @AfterMethod
    public void tearDown(ITestResult testResult) throws IOException {

        driver.quit();

    }
}



Source link https://sqa.stackexchange.com/questions/34520/--but-did-not-execute-the-priority-2-and-priority-3

LEAVE A REPLY

Please enter your comment!
Please enter your name here