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?

  1. ARestAssured tests cannot run under Maven without a special extension
  2. BThe Docker container was down, so Maven skipped the class
  3. 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
  4. DIntegration tests need @IntegrationTest, which was missing
Answers, scoring, hints, and the full battle stay sealed.

// SKILL TAGS

javamavensurefirefailsafe