What is @AfterTest?

@AfterTest is one of the TestNG Annotations. As the name defines, @AfterTest is executed after the execution of all the @test annotated methods inside a TestNG Suite. This annotation allows developers to specify various actions to be taken after the execution of all the @test annotated methods inside a TestNG Suite.

TestNG @AfterTest Annotation

The Concept Annotations is introduced in Java 1.5 (jdk5). The Popular Annotation in Java is @override. We use the same annotation concept in TestNG.

In TestNG, there are 10 Annotations

In this article, we will learn about @AfterTest.

Similar Reads

What is @AfterTest?

@AfterTest is one of the TestNG Annotations. As the name defines, @AfterTest is executed after the execution of all the @test annotated methods inside a TestNG Suite. This annotation allows developers to specify various actions to be taken after the execution of all the @test annotated methods inside a TestNG Suite....

Example of @AfterTest

Let’s understand the @AfterTest annotation through an example....