Java Test Automation / Quiz
Listeners & Retry: TestNG's Control Plane
ITestListener screenshots, IRetryAnalyzer contracts, and the one listener @Listeners cannot register. The plumbing under every serious framework.
- Difficulty
- Hard
- Format
- Quiz
- Points
- 200
- Estimate
- 10 min
// MISSION BRIEF
Your Mission
Every mature TestNG framework has a control plane: listeners that react to results (screenshots, reports, Slack pings) and a retry analyzer that decides whether a failure deserves a second chance.
This quiz goes into the interfaces themselves: which method fires when, how registration works, where IAnnotationTransformer is special, and how retried attempts show up in reports.
// FIRST CONTACT
Battle teaser
Screenshot-on-failure logic belongs in which ITestListener method?
- AonTestSkipped(ITestResult result)
- BonStart(ITestContext context)
- ConFinish(ITestContext context)
- DonTestFailure(ITestResult result), invoked when a test fails
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
javatestnglistenersretry