Requirements Based Testing
Requirements Based Testing
Gary E. Mogyorodi
Bloodworth Integrated Technology, Inc.
This article provides an overview of the requirements-based testing (RBT) process. RBT is comprised of two phases: ambiguity reviews and cause-effect graphing. An ambiguity review is a technique for identifying ambiguities in functional 1 requirements to improve the quality of those requirements. Cause-effect graphing is a test-case design technique that derives the minimum number of test cases to cover 100 percent of the functional requirements. The intended audience for this article is project managers, development managers, developers, test managers, and test practitioners who are interested in understanding RBT
and how it can be applied to their organization.
Design
27%
Code
7%
Other
10%
Standard Software
Development Life Cycle
testable requirements and integrated testing, the RBT process is integrated throughout the entire software development life
cycle. As soon as requirements are complete, they are tested. As soon as the design
is complete, the requirements are walked
through the design to ensure that they can
be met by the design. As soon as the code
is constructed and reviewed, it is tested as
usual. But because testing begins at the
requirements phase, many defects are
avoided instead of being tested out of the
code.
This is a less costly and more timely
approach. User manuals and training materials can be developed sooner. The entire
software development life cycle is compressed. Testing is performed in parallel
with development instead of all at the end,
so testing is no longer a bottleneck. There
are fewer surprises when the code is delivered (see Figure 3).
www.stsc.hill.af.mil
13
Quality Software
An Ambiguity Review
A Cause-Effect Graphing
Example
A cause-effect graph shows the relationships between the conditions (causes) and
the actions (effects) in a notation similar to
that used by designers of hardware logic circuits. The check-debit requirements are
modeled by the cause-effect graph shown in
Figure 4. C1 and C2 cannot be true at the
same time.
The cause-effect graph is converted into
a decision table. Each column of the decision table is a rule. The table comprises two
parts. In the top part, each rule is tabulated
against the causes. A T indicates that the
cause must be TRUE for the rule to apply
and an F indicates that the condition must
be FALSE for the rule to apply. In the bottom part, each rule is tabulated against the
effects. A T indicates that the effect will be
performed; an F indicates that the effect will
not be performed; an asterisk (*) indicates
that the combination of conditions is infeasible and so no effects are defined for the
rule. The check-debit function has the decision table shown in Table 1.
Only test cases one through five in Table
1 are required to provide 100 percent functional coverage. Rule No. 6 does not provide
any new functional coverage that has not
already been provided by the other five rules,
so a test case is not required for rule No. 6.
No test cases are generated for rule Nos. 7
and 8 because they describe infeasible conditions since C1 and C2 cannot be true at the
same time. The final set of test cases with
sample-data values is described in Table 2.
Summary
Real-Life Problem Test Cases
EFFECTS
Current
Balance
Debit
Amount
Difference
Overdraft
Limit
New
Balance
Account
Type
-$70
$50
-$120
-$100
-$70
Counter
$420
$2,000
-$1,580
-$1,500
$420
Postal
$650
$800
-$150
-$250
-$150
Counter
$2,100
$1,200
$900
-$1,000
$900
Counter
$250
$150
$100
-$500
$100
Postal
Test
Case
March 2003
Action
Action
Rules
Note
15