← Quiz: TestNG: all 10 questions
Quiz: TestNG · Question 9 of 10
What is a TestNG listener used for?
What is a TestNG listener used for?
- A.Choosing which browser to open
- B.Reacting to test events, such as logging results or taking a screenshot on failure
- C.Running SQL queries
- D.Replacing assertions
Answer & explanation
Correct answer: Reacting to test events, such as logging results or taking a screenshot on failure
Listeners are registered in testng.xml or with an annotation.
Can you get the rest right without peeking?
Take the timed Quiz: TestNG quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →