Java Test Automation / Scenario
The QA Profile That Never Activated
CI passed -Denv=qa, the pom listened for 'environment', and every test dutifully attacked localhost. A Maven profile whodunit.
- Difficulty
- Medium
- Format
- Scenario
- Points
- 150
- Estimate
- 12 min
// MISSION BRIEF
Your Mission
The test suite supports two environments through Maven profiles: dev (activeByDefault) and qa (activated by a property). CI was told to run against QA. The tests hit localhost:8080 and died with connection errors, while the developer insists "it works on my machine".
Read the pom, the CI log, and the developer note. Find why the qa profile never fired, what happens to dev when it finally does, and which practices make profile bugs loud instead of silent.
// FIRST CONTACT
Battle teaser
First artifact
pom.xml (profiles + surefire wiring)
Why did the qa profile not activate in CI?
- AThe CI runner's network blocked qa.shop.internal, so Maven fell back to dev
- BProfiles cannot be activated by properties, only by -P
- CactiveByDefault profiles permanently block other profiles
- DThe activation listens for a property named 'environment', but CI passed -Denv=qa; the names do not match, so activation never triggered and activeByDefault dev stayed on
// SKILL TAGS