The objective of this article is to explain that every business scenario should have at least one business requirement. Business scenario is a hypothetical story that helps us to think the system behavior for a given condition or set of conditions. The following examples show different ways of looking business scenarios:
- A scenario can be considered as a process flow from point A to point B.
- Every alternative path can be consider as another scenario.
- Variables that can produce different results can be considered as different scenarios.
- Negative test on how the system responds when invalid inputs or sequence is applied.
How do we select which requirement(s) for a scenario?
In Requirement Driven Testing, each scenario should have at least one business requirement. There is no hard and fast rule on how to link scenario and requirement together. You can associate any requirements with one or more scenarios and vice versa. Maintaining scenario-requirement relationship is an ongoing process. Quite often the existing scenarios and/or business rules are changed, moved or removed during the Software Development Life Cycle (SDLC). It is recommended to review all requirements when business scenario changes to maintain the quality of test cases for each requirement.
You can ask yourself the following questions when assigning requirements to scenario(s):
- Which scenario(s) would this requirement applies to?
- If this requirement is changed or removed which scenarios will be affected?
- If this requirement is changed or removed which other requirement(s) will be affected which are linked to other scenario(s)
In most cases it will be one-to-many relationship, that is one requirement might be applicable to more than one business scenarios.
Lets do one example
Scenario 1: Actor logs in using a valid username and password
Scenario 2: Actor perform search using item description
Requirement 1: only authorized user can use the system
Requirement 2: search result page should only return the first 50 records
In this example it is clear that Requirement 1 is applicable for Scenario 1 an Scenario 2 where Requirement 2 is only applicable to Scenario 2.
If you have any question, feel free to send email to email@example.com.