Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 60 ยท Static Testing and Reviews

Reviewing Requirements for Testability

Learn to review requirements for ambiguity, missing cases and untestable wording, and to rewrite them as testable acceptance criteria in Given-When-Then form.

If you cannot say how a requirement would be tested, then nobody can say whether the finished software meets it. "The page must load quickly" sounds like a requirement, yet two people will disagree for weeks about whether it passed. A requirement is testable when a person can design a check with a clear pass or fail result.

Reviewing requirements for testability is one of the most valuable things a tester does, and it needs no code. This lesson shows what to look for (ambiguity, missing cases, untestable wording), how to turn vague statements into measurable ones, and how to write acceptance criteria in the Given-When-Then format.

Real versus stand-in. Requirement documents, user stories and tools such as Jira or BDD frameworks are real and live outside the browser. The TryIt blocks are stand-ins: one scans text for vague words using a hand-made word list, the other parses Given-When-Then lines and runs them against a small function. A real review needs human judgment that a word list cannot provide.

What makes a requirement testable

A testable requirement has these qualities:

  • Unambiguous. There is one way to read it.
  • Specific and measurable. Quantities have numbers and units.
  • Complete. It covers the normal case, the limits and the error cases.
  • Consistent. It does not contradict another requirement.
  • Atomic. It states one thing, so one failing test points to one requirement.
  • Traceable. It has an identifier you can link to test cases, covered later in Traceability and Test Estimation.

When a requirement fails these tests, the fix belongs in the requirement, not in the test. Rewrite it, or ask the author or the business what they mean.

Typical problems

Four common requirement flaws

Ambiguous Words with more than one reading.
Incomplete Missing limits, errors, or roles.
Conflicting Two statements cannot both be true.
Unmeasurable No number, no way to judge pass or fail.

Each one is cheaper to fix in the document than in the product.

1 / 2

Ambiguity

Ambiguous wording hides the real expectation. Watch for:

  • Vague adjectives and adverbs: fast, quick, easy, user-friendly, flexible, robust, appropriate, efficient, adequate.
  • Unquantified amounts: several, many, few, large, small, most, usually.
  • Open-ended lists: "and so on", "etc.", "such as".
  • Loose logic words: "and/or", "as soon as possible", "if possible", "should".
  • Unclear references: "it", "this", "the system" when more than one thing could be meant.

Compare these two versions of the same requirement.

  • Vague: "Search results appear quickly."
  • Testable: "For a catalog of 10,000 products, the search page shows results within 2 seconds for at least 95 percent of requests."

The second one tells you the data volume, the time limit and how to judge it. You can design a performance check from it, as discussed in Performance, Load and Stress Testing.

Missing cases

A requirement often describes only the happy path. A tester asks questions the author did not think about.

Requirement: "Users can reset their password by email."

Questions to ask:

  • What if the email address is not registered?
  • How long is the reset link valid, and what happens after that?
  • Can the link be used twice?
  • What if the user requests three resets in a row?
  • What are the password rules for the new password?
  • What does the user see on a failed attempt?

Each question is a defect candidate in the requirement. Finding these gaps in review is much cheaper than discovering them in production.

Conflicts

Two requirements can both look reasonable and still contradict each other. For example, "All form fields are optional" and "The system must reject an order with no delivery address". Reading across the whole document, not one line at a time, is how you catch these.

Untestable wording

Some statements simply cannot be checked: "The system shall never fail", "The software must be 100 percent secure", "The interface should be intuitive". Replace each with something observable: a maximum number of failures per period, a list of security checks that must pass, or "a first-time user completes checkout in under three minutes without help in a usability test".

A vague word finder

Real requirement tools can flag weak wording automatically. The stand-in below is a plain list of suspicious words and phrases. It lowercases each requirement, reports every hit, and suggests the question to ask. It cannot judge meaning, which is why people stay in the loop.

JS Flagging vague words

Press Run (or Ctrl + Enter) to see the console output here.

No output.

REQ-4 passes because it states a measurable range, though a tester would still ask what happens with 7 or 65 characters. That is the boundary thinking taught in Boundary Value Analysis.

Acceptance criteria

An acceptance criterion is a condition a feature must meet for the business to accept it. A user story says what the user wants; its acceptance criteria say how you will know it works. Good criteria are specific, independent and each checkable with a pass or fail.

User story: "As a shopper, I want free delivery on larger orders so that I save money."

Criteria in plain bullets:

  • Orders of 50.00 or more have a delivery fee of 0.00.
  • Orders below 50.00 have a delivery fee of 4.99.
  • The fee is shown before the shopper confirms the order.

Each bullet maps directly to one or more tests. Notice that the first two meet at the number 50.00, the kind of spot where defects like to hide.

Given-When-Then

Given-When-Then is a structure for writing criteria as scenarios. It comes from behavior-driven development (BDD), which you will see again in Testing in Agile Teams and CI/CD.

  • Given describes the starting context.
  • When describes the action or event.
  • Then describes the expected outcome.
TEXT
Scenario: Free delivery at the threshold
  Given a basket totalling 50.00
  When the shopper opens the checkout
  Then the delivery fee is 0.00

Scenario: Fee below the threshold
  Given a basket totalling 49.99
  When the shopper opens the checkout
  Then the delivery fee is 4.99

Real BDD tools read text like this and call code you write for each line. That is real behavior in tools such as Cucumber, which this lesson does not run. The stand-in below does the same job in miniature: it parses scenarios with a regular expression, calls a deliveryFee function and compares the result.

JS Running Given-When-Then scenarios

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The empty-basket scenario fails. The requirement never said what a basket worth 0.00 should cost, so the scenario exposes a gap: the function charges 4.99 for nothing. A good outcome of requirement review is a question like "Can the checkout be opened with an empty basket?" long before this code gets written.

A short review routine

When you receive a requirement, run through this list:

  1. Underline every vague word and ask for a number or a rule.
  2. List the inputs, then ask what happens at the limits and outside them.
  3. Ask about each user role, including "not logged in".
  4. Ask what happens when something goes wrong.
  5. Check the requirement against its neighbors for conflicts.
  6. Write at least one acceptance criterion; if you cannot, the requirement is not testable yet.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Which requirement is the most testable?

    Only the second has a measurable limit, a data volume and a way to judge pass or fail. The others rely on vague or unprovable wording.
  2. 2. What does the 'Given' part of a Given-When-Then scenario describe?

    Given sets up the context, When is the action or event, and Then is the expected outcome.
  3. 3. 'Users can reset their password by email.' Which question best reveals a missing case?

    Asking what happens for unregistered addresses, expired links and repeated requests exposes cases the requirement never described.
  4. 4. Why should a requirement be atomic?

    A requirement that bundles several statements is hard to trace and hard to test. One statement per requirement keeps results clear.
  5. 5. Where is it cheapest to fix a vague requirement?

    Changing words in a document costs little. The later a defect is found, the more work has been built on top of it.

Summary

  • A requirement is testable when someone can design a check with a clear pass or fail result.
  • Look for ambiguity, missing cases, conflicts and untestable wording, and turn them into questions for the author.
  • Replace vague words with numbers, units and rules.
  • Acceptance criteria say how the business will accept a feature; Given-When-Then expresses them as scenarios.
  • If you cannot write a test for a requirement, the requirement needs work.

Next: Equivalence Partitioning.