Testability and Shift-Left Testing Questions
Designing software to be testable and moving quality earlier in the lifecycle. Covers testability and design review, shift-left practices, collaborating with developers on quality at design time, and improving testability of existing code. Emphasizes preventing defects rather than only catching them.
Describe best practices for organizing and naming tests in a repository maintained by SREs. Include how to structure unit, integration, and smoke tests in a monorepo, and show how naming conventions can help CI select tests, expedite triage, and surface slow or flaky tests.
Provide a prioritized, step-by-step checklist to diagnose and fix a flaky integration test that intermittently fails with 'connection refused' in CI. Include immediate mitigations to reduce pipeline noise and longer-term fixes to ensure stability.
Tell me about a time you improved test quality or code quality on a mobile team. What problem were you solving, what change did you introduce, and how did you know it actually helped?
Case study: a production outage occurred because tests used a mock that omitted a newly required authentication header, and the change reached production undetected. Run a post-incident review focused on test gaps, pipeline shortcomings, contract testing adoption, owner responsibilities, and produce a prioritized action list to prevent recurrence.
Compare fakes, stubs, and mocks for replacing a database in tests. As an SRE, when would you prefer a lightweight in-memory fake database versus spinning up an isolated real database instance for integration tests, and why?
Unlock Full Question Bank
Get access to all Testability and Shift-Left Testing interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.