Java Test Automation / Scenario
The Integration Tests That Never Ran
CheckoutFlowIT passed review, sat in the repo, and executed exactly zero times before the outage. Surefire vs failsafe, learned the expensive way.
- Difficulty
- Medium
- Format
- Scenario
- Points
- 150
- Estimate
- 13 min
// MISSION BRIEF
Your Mission
A team shipped a broken checkout. The bitter part: an integration test covering exactly that flow existed, reviewed and merged, named CheckoutFlowIT.java. It just never ran, in any environment, not once.
Then they "fixed" CI, and the next incident was stranger: integration tests FAILED and the build stayed green.
Read the pom, the CI logs, and the incident notes. Explain both failures, they are two halves of the same lesson about surefire, failsafe, and the lifecycle.
// FIRST CONTACT
Battle teaser
First artifact
CheckoutFlowIT.java (excerpt)
Why did CheckoutFlowIT never run before the outage?
- ARestAssured tests cannot run under Maven without a special extension
- BThe Docker container was down, so Maven skipped the class
- CSurefire's default includes match *Test-style names, not *IT; the *IT convention belongs to failsafe, which was not declared, and mvn test never reaches failsafe's phases anyway
- DIntegration tests need @IntegrationTest, which was missing
// SKILL TAGS