Testable Requirements
According t IEEE-STD-610 , a testable requirement is one that is stated in terms that enables test criteria and test execution to be established in order to determine whether those criteria have been met. Simply stated, a testable requirement must be precisely and unambiguously defined. These criteria can only be met only if a test case is written to validate whether or not a requirement has or has not been implemented correctly.
Ensuring testability into the requirements definition must begin with the business definition of the requirements. Many methods have been developed, such as UML to help eliminate deficiencies and contradictions in requirements management. MicroFocus suggests that the actions, behavior rules, and usage rules can be described utilizing:
• Natural Language
• Logic Tables
• State Models
• Pseudo Code or Structured English
• Cause and Effect diagrams
When reviewing a well-documented requirement for testability, the tester must determines if each requirement can be tested objectively by answering the following questions, not necessarily in this order:
Who initiates an action?
Who is notified of the conclusion of an action?
What triggers an action?
What happens when the trigger is received?
What is produced as an output?
Where does the output go?
Where does the input come from?
Where does the trigger come from?
Where is the action performed?
When does the input arrive (and how often)?
When does the action get performed after the input received?
When does the output get produced?
When does the output get delivered?
When does the action not occur?
How much accuracy is required in the outputs?
How much precision is requested in the calculations?
How much precision is in the input?
How many times can occur before output is produced?
Why is the input necessary?
Why is the output necessary?
How is the output to be completed?
How is the output trigger initiated?
If you want to ensure requirements accuracy and thorough testability from the inception of a mission critical effort is important to ask all of the above questions during the requirements gathering phase. Do it right the first time!
Will share more in future posts!