A team has a test suite where 5% of tests fail randomly. How do you deal with flaky tests?
IntermediateScenarioBuilds, Artifacts, Nexus, SonarQube and Testing
Answer
Situation read → Flakiness erodes trust in CI.
What I'd do →
- Detect: track pass/fail history per test and flag those that flip with no code change.
- Quarantine: move flaky tests to a non-blocking job with an owner and ticket.
- Fix root causes: shared state, time, ordering, network, async waits.
- Do not auto-retry everything; allow limited retry that is reported.
Why → Silent retries hide problems while quarantine keeps the gate trustworthy.
Interview tip → Report flaky rate as a metric.
More on Builds, Artifacts, Nexus, SonarQube and Testing
A Maven project resolves dependencies from Maven Central on every build and a left-pad style outage would stop all builds.BeginnerYou must publish snapshot and release artifacts without overwriting a released version.IntermediateEvery merge to main should produce a unique semantic version automatically.IntermediateAn npm build is non-reproducible: different versions install on different days.BeginnerThe SonarQube quality gate must block merging PRs that add new bugs, vulnerabilities or uncovered code.IntermediateCoverage shows 0% in SonarQube although tests run in CI.Intermediate