InterviewStack.io LogoInterviewStack.io

Flaky Test Management and Test Reliability Questions

Detecting, isolating, and eliminating non-deterministic tests. Covers root-causing flakiness, quarantine and remediation systems, distinguishing product bugs from test bugs, and maintaining suite health over time. Emphasizes keeping automated suites trustworthy so failures mean something.

HardTechnical
70 practiced

Evaluate three third-party tools or services (e.g., FlakyTestDetector, test analytics platforms, service virtualization) for integrating with your CI to surface flaky tests. For each, describe the criteria you'd use to evaluate them (integration effort, accuracy, cost, privacy), and outline an integration plan for the chosen tool with rollback if it underperforms.

HardTechnical
61 practiced

Technical coding: Implement (in Python or clear pseudocode) a function compute_flaky_score(history, window_size) that takes a list of timestamped test outcomes (each outcome includes timestamp and boolean success) and returns a flaky score between 0 and 1 using a sliding time window with exponential decay weighting for recent runs. Explain your choice of decay factor, handling of sparse data, and how the score responds to recent bursts of failures.

HardTechnical
67 practiced

Implement in Java (or pseudocode) a parallel test executor helper that runs test tasks concurrently but prevents concurrent execution of tasks that declare overlapping named resources (e.g., 'db:tenant42', 'gpu:0'). Requirements: tasks declare a set of resource keys, executor uses a thread pool, overlapping keys must be mutually exclusive, provide the scheduling algorithm and a thread-safe lock acquisition method. Discuss scalability and failure modes (task crashes while holding locks).

HardTechnical
74 practiced

Your organization must decide between investing heavily to make tests fully deterministic (high engineering cost) vs accepting some non-determinism and improving observability/alerting. How would you evaluate trade-offs, quantify costs and benefits, and recommend a path considering team size, release cadence, and product risk?

HardTechnical
78 practiced

Given long-term time-series of test pass/fail rates that show weekly seasonality and occasional infrastructure upgrades, outline an algorithm to detect genuine flakiness regressions. Cover preprocessing (smoothing and deseasonalizing), candidate change-point detection techniques, and approaches to choose thresholds that keep false positives low in production.

Unlock Full Question Bank

Get access to all Flaky Test Management and Test Reliability interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.