Q. What is the purpose of @AfterClass in TestNG?

A
To run setup before each test
B
To execute cleanup after all tests in a class
C
To define a test
D
To generate a report
Solution:

@AfterClass runs teardown code once after all test methods in a class.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!