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

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

@BeforeTest runs setup code before all test methods in a tag.

Entri Contact Image

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