The user is asking about the relationship between requirements and test cases in software or systems engineering. I need to explain that requirements define what a system should do, while test cases verify that functionality. Some requirements, like non-functional ones, aren't directly testable, but ideally, every requirement should be verifiable. It's important to note that verification doesn't mean a one-to-one mapping to test cases; some can span multiple cases or assessments. They serve different purposes, but both are crucial in the engineering process.Clarifying BDD and requirements
In agile Behavior-Driven Development (BDD), requirements expressed as acceptance criteria or Gherkin scenarios can closely resemble tests but are still different in terms of abstraction and purpose. I should explain that while requirements and test cases are fundamentally distinct, each requirement should have a verification method. Many map to tests, but some involve other forms of verification like reviews or analysis. A common saying is, "if you can't test it, it's not a requirement," but this means that requirements must be verifiable, whether through measurement or inspection.Crafting a concise answer
I need to structure my answer around several key points: definitions, mapping cardinality, examples, BDD and acceptance tests, non-functional qualities, and addressing whether a requirement can be separate from a test case. The answer is yes; some qualities or constraints may not have direct test cases but still need traceability. It's essential to keep explanations clear and concise, like defining a requirement as a needed behavior or capability, while a test case details inputs, procedures, and expected outcomes. For example, a requirement could be: "The system shall allow users to reset their password via email," with various test cases covering valid emails, invalid emails, and rate limiting.Distinguishing requirements and test cases
I need to clarify the relationship between requirements and test cases. For example, a performance requirement like "95% of queries < 200ms under 1000 concurrent users" does lead to load tests, yet it's more than just a test case. Regarding the question of whether a requirement can exist without being a test case: yes, they often require decomposition into measurable tests. However, there’s a distinction: a requirement states "what must be true," while a test case is an experiment to verify that. Each requirement should have corresponding tests, but they aren't tests themselves.Clarifying requirements and test cases
Requirements and test cases are different artifacts with distinct roles. While some agile teams may write requirements as examples or scenarios that also serve as automated test specifications, the roles still differ: requirements are contracts, while tests are for verification. It's important to note that while some requirements can’t be tested directly, they remain valid, like those requiring regulatory compliance or expert review. There are levels of requirements—business, user, system, and subsystem—that often need decomposition to yield testable cases. The key nuance is that although not every requirement is a test case, every requirement should ultimately be verifiable. Requirements and test cases are closely related, but they are not the same thing.
1. What each one is
Requirement
A requirement is a statement of what the system must do or what must be true about it.
Examples:
“The system shall allow a user to reset their password via email.”
“The system shall support 10,000 concurrent users.”
“The user interface shall comply with WCAG 2.1 AA accessibility guidelines.”
Test case
A test case is a specific experiment designed to check whether some aspect of a requirement is satisfied. It has inputs, preconditions, steps, and expected results.
Examples (for the password-reset requirement above):
Valid email, registered user → reset link sent.
Invalid email format → error shown, no email sent.
Unregistered email → generic message, no account info leaked.
So: a requirement is a condition that must hold; a test case is a way to try to falsify or confirm that condition in a particular situation.
2. Cardinality: how they relate
One requirement → many test cases
A single requirement is usually covered by multiple test cases (valid paths, edge cases, negative cases, performance scenarios, etc.).
One test case → one or more requirements
A given test case might touch more than one requirement (e.g., a workflow test that covers authentication, permissions, and logging).
They are related via traceability, not one-to-one identity.
3. Can a requirement not be a test case?
Yes. In fact, most requirements are not test cases. They are higher-level and must be verified via one or more test cases or other verification methods.
Important nuance:
In good engineering practice, every requirement should be verifiable.
“Verifiable” means you can check it by:
Testing (dynamic execution),
Inspection / review,
Analysis / modeling,
Demonstration.
…but “verifiable” ≠ “is itself a test case.”
Examples of requirements that are not themselves test cases
High-level business requirement
“Users shall be able to complete checkout in under 2 minutes on average.”
This turns into many detailed UX, performance, and functional requirements, each with its own tests. The original statement is not a single test case.
Non-functional / quality requirement
“The system shall be maintainable by a developer with 2 years of Java experience.”
You can’t write a simple automated test for this. You might verify it indirectly (code standards, complexity metrics, reviews), but the requirement itself is not a test case.
Regulatory or standards compliance
“The device shall comply with IEC 62304.”
This is verified via audits, documentation review, and process checks, not a single test script.
Cross-cutting constraints
“All user data shall be encrypted in transit and at rest.”
You’ll have many tests (config checks, penetration tests, certificate checks), but again: the requirement is broader than any one test case.
4. Why people say “If it’s not testable, it’s not a requirement”
That phrase is really about quality of requirements: you should phrase requirements so they are clear and objectively verifiable, not vague (“fast”, “user friendly”, “simple”).
To make them testable, you usually:
Refine vague requirements into measurable ones (e.g., “95% of requests under 200 ms at 500 concurrent users”).
Then design one or more test cases to measure them (e.g., a specific JMeter or Gatling scenario).
The refined statement is still a requirement; the scripts and scenarios are the test cases.
5. Where they get closer: executable specifications
In BDD / Specification by Example, you often write requirements as scenarios:
gherkin
Scenario: Successful password reset
Given a registered user with email "alice@example.com"
When she requests a password reset
Then an email containing a reset link is sent to "alice@example.com"
This can serve both as:
A human-readable requirement, and
An automated test (when wired into a tool like Cucumber).
Even here, though, there is a conceptual distinction:
You treat it as a requirement when agreeing on behavior.
You treat it as a test when executing it to validate the system.
6. Bottom line
Requirements and test cases are fundamentally different types of artifacts:
Requirement: “What must be true about the system.”
Test case: “How we will check whether that is true in a specific situation.”
You absolutely can (and usually do) have requirements that are not themselves test cases.
But every requirement should be traceable to at least one verification activity (often one or more test cases), or it’s a weak requirement.