InterviewStack.io LogoInterviewStack.io

Testability and Testing Practices Questions

Emphasizes designing code for testability and applying disciplined testing practices to ensure correctness and reduce regressions. Topics include writing modular code with clear seams for injection and mocking, unit tests and integration tests, test driven development, use of test doubles and mocking frameworks, distinguishing meaningful test coverage from superficial metrics, test independence and isolation, organizing and naming tests, test data management, reducing flakiness and enabling reliable parallel execution, scaling test frameworks and reporting, and integrating tests into continuous integration pipelines. Interviewers will probe how candidates make code testable, design meaningful test cases for edge conditions, and automate testing in the delivery flow.

HardTechnical
0 practiced
Propose a system where scheduled chaos experiments are used to validate SLO robustness. Include automation to schedule and scope experiments, safety controls, how to measure SLO impact, what rollback or mitigation to run automatically if experiments cause excessive degradation, and how experiment results feed into reliability improvements.
EasyTechnical
0 practiced
Define test doubles (mocks, stubs, fakes, spies) and explain appropriate use cases for each when testing networked services. As an SRE, which of these would you prefer for fast CI runs and which for high-fidelity integration tests, and why?
MediumTechnical
0 practiced
Using Python and pytest, write a test snippet that uses monkeypatch or a requests-mock approach to simulate an external HTTP service that returns 500 for the first two calls and 200 on the third, and assert that the client's retry logic eventually succeeds. Show fixtures and assertions.
MediumTechnical
0 practiced
Create a cost-efficient strategy to spin up ephemeral integration environments for CI runs that require a full stack. Consider container images, shared mocked services, use of spot instances or preemptible VMs, caching mechanisms, and automated reclaiming to reduce spend while keeping test fidelity high.
MediumTechnical
0 practiced
You want to enable reliable parallel execution across thousands of tests that currently share a single Redis instance. Propose strategies for isolation such as namespacing, ephemeral instances, or containerized Redis, and explain how to prevent resource contention and ensure deterministic behavior.

Unlock Full Question Bank

Get access to hundreds of Testability and Testing Practices interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.