Logo vun Requirements Testing

Requirements Testing

Communautéit
jdm4pku
requirements-testing

Derive test cases from requirements, use cases, and business rules to verify testability and completeness. Use when you need to validate that requirements are verifiable and to plan acceptance testing early.

Iwwersiicht

Editeurjdm4pku
RepositoryRE-Skills
Skill-Nummrequirements-testing
Stären
27
Forks
1
Matgeliwwert Fichieren
2
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum jdm4pku op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Requirements Testing an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/jdm4pku/RE-Skills/tree/main/skills/requirements-testing
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jdm4pku/RE-Skills.git /tmp/RE-Skills
mkdir -p .claude/skills
cp -r /tmp/RE-Skills/skills/requirements-testing .claude/skills/requirements-testing
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Requirements Testing an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Requirements Testing automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Requirements Testing net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Purpose

Derive test cases directly from requirements before code is written. Use this to verify that every requirement is testable, expose requirements that are too vague to test, and produce an early acceptance test plan that aligns development with stakeholder expectations.

This is not a software testing methodology -- it is a requirements quality technique. The act of writing tests from requirements reveals defects in the requirements themselves: ambiguity, incompleteness, and untestable statements.

Key Concepts

Testability as a Quality Attribute

A requirement is testable if and only if there exists a finite, cost-effective process to determine whether the implemented system satisfies it.

Testable:

The system shall display search results within 3 seconds for
queries returning up to 1000 chemical records.

Not testable:

The system shall display search results quickly.

The difference is a fit criterion -- a quantified, measurable threshold that defines what "quickly" means.

Fit Criteria

Every requirement needs a fit criterion that makes it objectively verifiable:

Requirement TypeFit Criterion Example
PerformanceResponse time <= 3 seconds for 95% of queries
UsabilityNew users complete core task within 5 minutes without help
ReliabilitySystem uptime >= 99.5% measured monthly
CapacitySupport 500 concurrent users with no degradation
FunctionalChemical added to inventory appears in search results within 1 minute

Test Case Derivation Sources

SourceDerivation Method
Use casesOne test per main flow + one per alternate/exception flow
Functional requirementsOne or more tests per "shall" statement
Business rulesOne test per rule outcome + boundary tests
State modelsOne test per valid transition + one per invalid transition
Data dictionaryBoundary value tests for each constrained field
Quality attributesMeasurable tests against fit criteria

Writing Tests Before Code

Conceptual testing (writing tests from requirements, before code) serves several purposes:

  1. Validates testability -- If you cannot write a test, the requirement is defective
  2. Exposes ambiguity -- Writing concrete test steps forces you to resolve vague terms
  3. Discovers missing requirements -- Test scenarios reveal conditions the requirements did not address
  4. Creates acceptance criteria -- Tests become the definition of "done" for each requirement

Why This Works

Writing test cases forces a level of precision that requirements writing alone does not demand. When you try to write "Given [precondition], When [action], Then [expected result]," you discover that the requirement did not specify the precondition, the action is ambiguous, or the expected result is undefined.

Anti-Patterns

  • Untestable Requirements -- Requirements containing "appropriate," "user-friendly," "fast," "intuitive" with no fit criteria
  • Tests After Code -- Writing tests only after implementation, which validates implementation rather than requirements
  • Happy Path Only -- Deriving tests only from main use case flows, ignoring exception and error cases
  • Missing Boundary Tests -- Testing only typical values, not boundary and invalid values

Application

Use template.md for the fill-in structure.

Step 1: Inventory Requirements to Test

Gather all testable sources:

  • Functional requirements ("shall" statements)
  • Use cases (main, alternate, and exception flows)
  • Business rules
  • Quality attribute requirements
  • Data constraints from the data dictionary (skills/data-dictionary/SKILL.md)

Step 2: Assign Fit Criteria to Vague Requirements

For every requirement that contains an unmeasurable term, define a fit criterion:

Original RequirementProblemFit Criterion
"System shall be fast""Fast" is subjective"Search results display within 3 seconds for up to 1000 records"
"System shall be easy to use""Easy" is subjective"New user completes Add Chemical task within 5 minutes without training"
"System shall handle large volumes""Large" is undefined"System supports 10,000 chemical records with no performance degradation"

Step 3: Derive Tests from Use Cases

For each use case, generate tests:

Main flow test: Execute the use case steps as described. Verify all postconditions.

Alternate flow tests: One test per alternate flow. Verify the alternate postconditions.

Exception flow tests: One test per exception flow. Verify error handling and recovery.

Boundary tests: For each input in the use case, test boundary values.

Step 4: Derive Tests from Functional Requirements

For each "shall" statement:

Given: [Precondition -- the system state before the test]
When:  [Action -- what the user or system does]
Then:  [Expected Result -- the observable outcome]

Generate at minimum:

  • One positive test (requirement is satisfied)
  • One negative test (what happens when the condition is not met)
  • Boundary tests for any numeric, date, or string constraints

Step 5: Derive Tests from Business Rules

For each business rule (skills/business-rule/SKILL.md):

  • Test each outcome of the rule
  • Test boundary conditions for all thresholds
  • Test combinations if multiple conditions interact (use decision tables from skills/decision-table/SKILL.md)

Step 6: Compile Acceptance Test Plan

Organize derived tests into an acceptance test plan:

  1. Group tests by feature or use case
  2. Assign priority (critical path tests first)
  3. Identify test data requirements
  4. Identify environment requirements
  5. Define pass/fail criteria for the overall system

Step 7: Validate Requirements Through Tests

Review the test suite to find requirements issues:

  • Every requirement has at least one test case
  • Every test case has concrete expected results (no "system behaves appropriately")
  • Boundary values are tested for all constrained inputs
  • Exception flows have corresponding test cases
  • Quality attributes have measurable fit criteria with corresponding tests
  • Any requirement that cannot be tested is flagged for rewriting

Examples

See examples/sample.md for complete test case derivations for ChemTrack.

Mini example:

markdown
## Requirement: CT-FR-12
"The system shall prevent users from assigning a chemical to an experiment
if the chemical's expiration date is earlier than the experiment's start date."

### Test Cases:

**TC-12.1: Expired chemical blocked (positive test)**
- Given: Chemical "Acetone" expires 2026-01-15; Experiment starts 2026-02-01
- When: User assigns Acetone to the experiment
- Then: System rejects with message "Chemical expires before experiment start date"

**TC-12.2: Valid chemical accepted (negative test for the rule)**
- Given: Chemical "Acetone" expires 2026-06-15; Experiment starts 2026-02-01
- When: User assigns Acetone to the experiment
- Then: System accepts the assignment

**TC-12.3: Same-day boundary**
- Given: Chemical "Acetone" expires 2026-02-01; Experiment starts 2026-02-01
- When: User assigns Acetone to the experiment
- Then: [REQUIREMENT GAP: Does "earlier than" include same day?]

Note how TC-12.3 exposes a missing requirement -- the original requirement does not specify whether "earlier than" includes the exact same day.

Common Pitfalls

Pitfall 1: Untestable Requirements Accepted

Symptom: Requirements like "the system shall be user-friendly" are approved without fit criteria.

Consequence: No way to verify the requirement. Acceptance testing becomes subjective. Disputes about whether the requirement is met.

Fix: Every requirement must have a fit criterion. If stakeholders cannot define "user-friendly" in measurable terms, facilitate a discussion to establish specific, testable criteria.


Pitfall 2: Tests Only for Happy Path

Symptom: Test cases cover the main flow of each use case but ignore alternate and exception flows.

Consequence: Error handling, edge cases, and recovery paths are untested. These are where most production defects occur.

Fix: Derive at least one test per alternate flow and one per exception flow. Use state models (skills/state-modeling/SKILL.md) to identify error transitions.


Pitfall 3: No Boundary Testing

Symptom: Tests use only typical mid-range values (e.g., quantity = 5) and never test boundaries (0, 1, maximum, maximum+1).

Consequence: Off-by-one errors, overflow conditions, and empty-set cases go undetected until production.

Fix: For every constrained field in the data dictionary, generate boundary tests: minimum, minimum-1, maximum, maximum+1, zero, empty, null.


Pitfall 4: Tests Written After Development

Symptom: Test cases are written after the code is complete, based on what the system does rather than what it should do.

Consequence: Tests validate the implementation, not the requirements. Requirements defects are coded into the system and verified by the tests.

Fix: Write conceptual test cases during requirements analysis, before development. Use test-writing as a requirements validation technique.

References

Related Skills

  • skills/use-case/SKILL.md -- Use cases are a primary source for test case derivation
  • skills/business-rule/SKILL.md -- Business rules generate rule-outcome test cases
  • skills/decision-table/SKILL.md -- Decision tables ensure coverage of all condition combinations
  • skills/specification-review-checklist/SKILL.md -- Testability is a key quality attribute checked during reviews
  • skills/acceptance-criteria/SKILL.md -- Acceptance criteria and fit criteria are complementary

External Frameworks

  • Karl Wiegers & Joy Beatty, Software Requirements, Third Edition (2013) -- Chapter 17: Beyond Requirements Development (conceptual testing)
  • Glenford Myers, The Art of Software Testing (2011) -- Boundary value analysis and equivalence partitioning
  • Volere Requirements Specification Template -- Fit criteria methodology

Skill type: Component Dependencies: References skills/use-case/SKILL.md, skills/business-rule/SKILL.md, skills/decision-table/SKILL.md Used by: skills/requirements-validation-process/SKILL.md, skills/acceptance-criteria/SKILL.md

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Requirements Testing?

Derive test cases from requirements, use cases, and business rules to verify testability and completeness. Use when you need to validate that requirements are verifiable and to plan acceptance testing early.

Firwat Requirements Testing op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Requirements Testing besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Requirements Testing an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/jdm4pku/RE-Skills/tree/main/skills/requirements-testing an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Requirements Testing benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Requirements Testing benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Requirements Testing domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Requirements Testing gratis?

De Skill gëtt vum jdm4pku op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇