Академический Документы
Профессиональный Документы
Культура Документы
Software Testing
Foundation Of Software Testing
4 Test design
5 Management 6 Tools
techniques
Contents
The test development process
Categories of test design techniques
Black and White box testing
Black box test techniques
White box test techniques
Experience-based techniques
Choosing a test technique
The test development process
Differentiate between a test design specification,
test case specification and test procedure
specification.
Compare the terms test condition, test case and
test procedure.
Evaluate the quality of test cases in terms of clear
traceability to the requirements and expected
results.
Translate test cases into a well-structured test
procedure specification at a level of detail relevant
to the knowledge of the testers.
The test development process
Formality of test documentation
Test analysis: identifying test conditions
Test design: specifying test cases
Test implementation: specifying test
procedures or scripts
1 2 3 Foundation Of Software Testing
4 5 6
Test Design Techniques
Contents
The test development process
Categories of test design techniques
Black and White box testing
Black box test techniques
White box test techniques
Experience-based techniques
Choosing a test technique
Three types of systematic technique
Static (non-execution)
• examination of documentation,
source code listings, etc.
Functional (Black Box)
• based on behaviour /
functionality of software
Structural (White Box)
• based on structure
of software
Some test techniques
Static Dynamic
Reviews etc.
Static Analysis
Behavioural
Inspection
Walkthroughs Structural Non-functional Functional
Desk-checking etc.
etc.
Equivalence
Control Usability Partitioning
Data Flow
Flow Performance
etc. Boundary
Value Analysis
etc.
Statement
Symbolic Cause-Effect Graphing
Execution Branch/Decision Arcs
Random
Definition Branch Condition LCSAJ
-Use State Transition
Branch Condition
Combination
Black box versus white box?
Contents
The test development process
Categories of test design techniques
Black and White box testing
Black box test techniques
White box test techniques
Experience-based techniques
Choosing a test technique
Black Box test design and measurement techniques
- Syntax testing
- Random testing
Also defines how to specify other techniques
Equivalence partitioning (EP)
0 1 100 101
Boundary value analysis (BVA)
0 1 100 101
Example: Loan application
2-64 chars.
Customer Name
Account number 6 digits, 1st
non-zero
Loan amount requested
Term of loan £500 to £9000
Monthly repayment
1 to 30 years
Term:
Minimum £10
Repayment:
Interest rate:
Total paid back:
Customer name
Number of characters:
1 2 64 65
invalid valid invalid
number of digits: 5 6 7
invalid invalid
valid
Input Conditions
Valid username T T T T F F F F
Valid password T T F F T T F F
Account in credit T F T F T F T F
Rationalise input combinations
Input Conditions
Valid username F T T T
Valid password - F T T
Account in credit - - F T
Complete the table
determine the expected output conditions for
each combination of input conditions
Input Conditions
Valid username F T T T
Valid password - F T T
Account in credit - - F T
Output Conditions
Login accepted F F T T
Restricted access - - T F
Determine test case groups
each column is at least one test case
Input Conditions
Valid username F T T T
Valid password - F T T
Account in credit - - F T
Output Conditions
Login accepted F F T T
Restricted access - - T F
Tags A B C D
Design test cases
usually one test case for each column but can
be none or several
Test Description Expected Outcome Tag
1 Username BrbU Invalid username A
2 Username Invalid username A
usernametoolong
3 Username BobU Invalid password B
Password abcd
4 Valid user, no disc Restricted access C
space
5 Valid user with disc Unrestricted access D
space
Rationalising outputs
X T F F
is equivalent to:
Y F T F
Z F F T Output X Y Z
Rationalising dangers
Code = 1, 2, or 3 1 1 1 1 2 2 2 2 3 3 3 3
Exp.date < now T T F F T T F F T T F F
Class A product T F T F T F T F T F T F
Decision Tables in relation to EP and BVA
FALSE
TRUE
1 2 3 Foundation Of Software Testing
4 5 6
Contents
The test development process
Categories of test design techniques
Black and White box testing
Black box test techniques
White box test techniques
Experience-based techniques
Choosing a test technique
White Box test design and measurement
techniques
Stronger structural
techniques (different
structural elements)
Increasing coverage
The test coverage trap
Function exercised, better testing
insufficient structure
Functional
testedness
Structure exercised,
insufficient function
12 12 123
?
? ? ? ?
?
Paths through code with loops
1 2 3 4 5 6 7 8 ….
End
Example 2 Read
End
3
- Cyclomatic complexity: _____
- Minimum tests to achieve:
1
• Statement coverage: ______
• Branch coverage: _____
3
Example 3 Read
Read A Yes No
Read B A>0 B=0 Print
IF A > 0 THEN No Yes
Yes
IF B = 0 THEN Print A>21 Print
Print “No values”
No
ELSE
Print B
IF A > 21 THEN End
Print A 4
- Cyclomatic complexity: _____
ENDIF
ENDIF - Minimum tests to achieve:
ENDIF 2
• Statement coverage: ______
• Branch coverage: _____
4
Yes
Read A<0 Print
Example 4 No
Read A
Read B Yes
B<0 Print
IF A < 0 THEN
No
Print “A negative”
ENDIF
IF B < 0 THEN End
Print “B negative”
ENDIF
3
- Cyclomatic complexity: _____
- Minimum tests to achieve:
• Statement coverage: ______
1
• Branch coverage: _____
2
Yes
Read A<0 Print
Example 6 No
Read A
IF A < 0 THEN Yes
A>0 Print
Print “A negative”
No
ENDIF
IF A > 0 THEN
Print “A positive” End
ENDIF
3
- Cyclomatic complexity: _____
- Minimum tests to achieve:
• Statement coverage: ______
2
• Branch coverage: _____
2
1 2 3 Foundation Of Software Testing
4 5 6
Contents
The test development process
Categories of test design techniques
Black and White box testing
Black box test techniques
White box test techniques
Experience-based techniques
Choosing a test technique
Experience-based techniques
Contents
The test development process
Categories of test design techniques
Black and White box testing
Black box test techniques
White box test techniques
Experience-based techniques
Choosing a test technique
Choosing a test technique