InterviewStack.io LogoInterviewStack.io

Software Testing and Assertions Questions

Core software testing and debugging practices, including designing tests that exercise normal, edge, boundary, and invalid inputs, writing clear and maintainable unit tests and integration tests, and applying debugging techniques to trace and fix defects. Candidates should demonstrate how to reason about correctness, create reproducible minimal failing examples, and verify solutions before marking them complete. This topic also covers writing effective assertions and verification statements within tests: choosing appropriate assertion methods, composing multiple assertions safely, producing descriptive assertion messages that aid debugging, and structuring tests for clarity and failure isolation. Familiarity with test design principles such as test case selection, test granularity, test data management, and test automation best practices is expected.

EasyTechnical
61 practiced
List at least five characteristics of a good unit test (for example, fast, deterministic). For each characteristic give a short example that contrasts a poor test with a good test and explain the impact on developer productivity and reliability.
MediumTechnical
86 practiced
Explain step-by-step how you would use git-bisect to find the commit that introduced a regression causing a failing test. If the test is flaky or slow, how would you automate or adapt the bisection process and how would you narrow down test-only failures vs code regressions?
MediumTechnical
63 practiced
A Python sorting function should sort lists of tuples by first then second element but tests sometimes fail with different ordering. Write pytest unit tests that reproduce problematic inputs with a minimal failing example and explain how you would debug and fix nondeterministic ordering, including when to rely on stable sorting.
HardTechnical
47 practiced
Define SLOs and metrics to measure test reliability across a product. Propose measurable metrics such as flakiness rate (percent of runs that fail intermittently), mean time to detect test failures, false-positive rate, and average test execution latency. Explain how to build dashboards and alerts and what actions teams should take when thresholds are breached.
EasyTechnical
65 practiced
You own a function parse_date(input_str) that accepts formats YYYY-MM-DD and MM/DD/YYYY. List a thorough set of test cases that exercise normal inputs, edge cases (e.g., leap years), boundary conditions, invalid inputs, and performance considerations (very long inputs). For each test case describe the expected behavior and why it is important.

Unlock Full Question Bank

Get access to hundreds of Software Testing and Assertions interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.