InterviewStack.io LogoInterviewStack.io

Flaky Test Detection and Management Questions

Comprehensive coverage of methods, tools, and processes for discovering, diagnosing, and managing flaky tests across large and complex test suites. Topics include statistical and heuristic detection techniques such as historical failure rate analysis and flakiness scoring, automated rerun and correlation strategies, quarantine and marking workflows, triage and prioritization processes, instrumentation and telemetry for dashboards and trend analysis, correlation of failures with code and infrastructure changes, repair and remediation workflows, decision frameworks for rerunning versus quarantining tests, recovery mechanisms such as controlled retries and fixture stabilization, distributed execution and sharding considerations for scale, continuous integration pipeline integration, alerting and release gating, and long term prevention strategies to avoid regression of test reliability at scale.

EasyTechnical
72 practiced
You have a flaky end-to-end UI test that sporadically times out waiting for an element. Propose immediate low-effort stabilization tactics (e.g., explicit waits, conditional retries, network stubbing), explain pros and cons of each, and indicate when each tactic is appropriate versus when a deeper fix is required.
MediumTechnical
82 practiced
Write a Python program or pseudocode that reads a CSV of test runs (columns: test_id, timestamp, status, run_id, duration) and outputs the top 10 tests by flakiness score over the last 30 days. Describe your scoring function and ensure the solution handles missing or out-of-order timestamps.
EasyTechnical
85 practiced
In a CI environment a particular integration test fails about 0.5% of the time and takes ~30 seconds to run. Propose a default rerun/retry strategy that reduces noise while limiting wasted compute and avoiding masking real issues. Include retry limits, backoff strategy, logging/metadata to record attempts, and escalation rules for quarantine or bug filing.
MediumTechnical
69 practiced
You are considering an ML model to predict which tests are likely to become flaky. What features would you include (test metadata, code churn, historical runtime variance, infra signals), how would you define the label for 'will become flaky', and which evaluation metrics and modeling precautions (e.g., temporal validation) would you use?
HardTechnical
84 practiced
As an SDET lead you must convince engineering and product leadership to fund a multi-quarter effort to reduce test flakiness. Draft the executive proposal outline: key KPIs to track, expected ROI and how to compute it, phased roadmap (quick wins vs platform work), resource ask, and how to measure success at the end of each quarter.

Unlock Full Question Bank

Get access to hundreds of Flaky Test Detection and Management interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.