TestNG - Annotations
TestNG - Annotations ~30 mins

TestNG Annotations

What are Annotations?

Why do we need to use it?

When to use annotation?

Annotations

Available annotations in Testng are:

Annotations

@BeforeAll

@AfterAll

Annotations

@BeforeSuite:

@AfterSuite:

@BeforeTest:

@AfterTest:

@BeforeTest:

@AfterTest:

@BeforeClass:

@AfterClass:

@BeforeMethod:

Example:

    @BeforeMethod
public void preCondition() {
EdgeDriver driver = new EdgeDriver();
}

@AfterMethod

    @AfterMethod
public void postCondition() {
driver.close();
}

Classroom Activity (Breakout)