Start by restating the function spec in your own words to confirm understanding, then systematically derive test cases from the spec using categories like happy path, boundaries, invalid inputs, and stateful behavior. For each category, write concrete test cases and explain the rationale, then describe a prioritization strategy for time-boxed scenarios.
Pro tip: Demonstrate maturity by explicitly calling out assumptions and ambiguities in the spec, and propose how you'd clarify them with the author or product owner before finalizing tests.
Restate the function's purpose, inputs, outputs, side effects, and constraints. Identify any ambiguities or missing details and note them for clarification.
Enumerate categories such as happy path, boundary conditions, invalid inputs, equivalence partitions, idempotency, and concurrency/stateful behavior. For each, list specific scenarios.
For each scenario, define input values, expected outputs, and any setup/teardown. Include edge cases like empty inputs, max/min values, and repeated calls.
Rank tests by risk and impact: start with happy path and critical boundaries, then invalid inputs, then idempotency and concurrency. Explain your rationale.
Review coverage against the spec, ensure tests are independent and deterministic, and mention any tools or frameworks you'd use (e.g., JUnit, pytest).
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.