Continental Test Lab: September 2014
Continental Test Lab: September 2014
September 2014
3 Experienced Based
4 Test Plan
5 Test Report
3/
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Categories of Test Techniques
The purpose of a test design techniques is to identify test conditions and test
cases
Some techniques fall clearly into a single category, others have elements of more
then one category
Experiences-based
4/
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Equivalence Partitioning are also known as equivalence classes
Partitions exercised: Valid partitions and invalid partitions
5/
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Equivalence Partitioning
Exercise:
Postal rates for 'light letters' are 25p up to l0g, 35p up to 50g plus an extra
l0p for each additional 25g up to l00g. Which test inputs (in grams) would
be selected using equivalence partitioning?
a. 8,42,82,102
b. 4,15, 65, 92,159
c. 10,50,75,100
d. 5, 20, 40, 60, 80
6/
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
a. 8,42,82,102
b. 4,15, 65, 92,159
c. 10,50,75,100
d. 5, 20, 40, 60, 80
7/
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Boundary value analysis
Boundaries to be exercised: just below, on, just above
Note that we have both valid boundaries (in the valid partitions)
and invalid boundaries (in the invalid partitions).
8/
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Boundary value analysis
Exercise:
In a system designed to work out the tax to be paid:
An employee has £4000 of salary tax free.
The next £1500 is taxed at 10%.
The next £28000 after that is taxed at 22%.
Any further amount is taxed at 40%.
To the nearest whole pound, which of these is a valid Boundary Value Analysis test
case?
A £28000.
B £33501.
C £32001.
D £1500.
9/
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
28000 ….
• 4000 • 33500
• Tax • 5500 • 22% • >33500
free • 10% • 40%
+1500 ….
To the nearest whole pound, which of these is a valid Boundary Value Analysis
test case?
A £28000.
B £33501.
C £32001.
D £1500.
10 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
State Transition
• Identify initial state and data/events that will trigger the transition
11 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
State Transition
Exercise:
Given the state diagram, which test case is the minimum series of valid transitions to cover
every state?
a. SS-S1-S2-S4-S1-S3-ES
b. SS-S1-S2-S3-S4-ES
c. SS-S1-S2-S4-S1-S3-S4-S1-S3-ES
d. SS-S1-S4-S2-S1-S3-ES
12 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
First try:
SS -> S1 -> S2 -> S4 -> S1 -> S2 -> S1 -> ….
Second try:
SS->S1->S2->S4->S1->S3->ES => 7 states
Third try:
SS->S1->S3->S4->S1->S2->S4->S1->
->S3->ES => 9 states
4th try:
SS->S1->S2->S4->S1->S3->S4->S1->
->S3->ES => 9 states
13 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
14 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Exercise:
If you are a new customer opening a credit card account, you will get a
15% discount on all your purchases today. If you are an existing customer
and you hold a loyalty card, you get a 10% discount. If you have a
coupon, you can get 20% off today (but it can't be used with the
'newcustomer' discount). Discount amounts are added, if applicable.
15 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Solution:
We may choose to test each rule/combination and if there are only a few this will usually be
the case. However, if the number of rules/combinations is large we are more likely to sample
them by selecting a rich subset for testing.
16 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Use Case testing
Use case testing is a technique that helps us to identify test cases that exercise
the whole system on a transaction by transaction basis from start to finish
17 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Use Case testing
18 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Random testing
19 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Specification-based or Black Box Techniques
Summary
20 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
Statement testing
Decision testing
21 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
Statement testing
Statement coverage = (Number of statements exercised/Total number of
statements)x100%
Exercise:
1 READ A
2 READ B
3 C =A + 2*B
4 IF C> 50 THEN
5 PRINT large C
6 ENDIF
We have two read statements, one assignment statement, and then one IF statement on
three lines, but the IF statement contains another statement (print) as part of it ? 6
statements
One test is sufficient for 100% statement coverage
22 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
Decision testing
Decision coverage = (Number of decision outcomes exercised/Total number
of decision outcomes)x100%
Exercise:
1 READ A
2 READ B
3 C =A + 2*B
4 IF C> 50 THEN
5 PRINT large C
6 ENDIF
Two tests are needed for 100% decision coverage. Note that 100% decision coverage
guarantees 100% statement coverage, but not the other way around!
23 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
Exercises:
1. Given the following code, which option is true about the minimum
number of test cases for full statement and decision coverage:
Read M
Read N
If M > N then print “Message 21”
ENDIF
If N >= M then
a) 1 test for statement coverage, 2 tests
Print “Message 31” for decision coverage
If N > 10 then
b) 1 test for statement coverage, 3 tests
for decision coverage
Print “Message 41” c) 2 tests for statement coverage, 2 tests
ENDIF for decision coverage
d) 2 tests for statement coverage, 3 tests
ENDIF for decision coverage
Print “END”
24 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
Test 1: Read M
M = 12 Read N
N= 11
Message 21
Test 2:
M = 15
N = 15
Message 31
Test 3:
M=2 Message 41
N=9
END
25 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
Exercises:
1. Given the following code, which option is true about the minimum
number of test cases for full statement and decision coverage:
Read M
Read N
If M > N then print “Message 21”
ENDIF
If N >= M then
a) 1 test for statement coverage, 2 tests
Print “Message 31” for decision coverage
If N > 10 then
b) 1 test for statement coverage, 3 tests
for decision coverage
Print “Message 41” c) 2 tests for statement coverage, 2 tests
ENDIF for decision coverage
d) 2 tests for statement coverage, 3
ENDIF tests for decision coverage
Print “END”
26 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
Exercises:
2. If you are flying with an economy ticket, there is a possibility that you
may get upgraded to business class, especially if you hold a gold card in
the airline's frequent flier program. If you don't hold a gold card, there is a
possibility that you will get 'bumped' off the flight if it is full and you check
in late.
27 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
28 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
29 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Structured-based or White Box Techniques
Summary
30 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Experience-based
In the Experience-based testing the tests are derived from the tester’s
skills, intuition and experiences with similar applications and technologies
31 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Experience-based
What is Error guessing?
“A test technique where the experience of the tester is used to anticipate what defects
might be present in the component or system under test as a result of errors made, and
to design tests specifically them.”
A structured approach to the Error Guessing is to enumerate a list of possible errors and to
design tests that attack these errors
This systematic approach is called Fault Attack
32 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Experience-based
Exploratory testing
Is a test execution, based on a test charter containing test objectives, and
carried out with time-boxes
It can serve as a check on the test process, to help ensure that the most
serious defects are found
33 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Experience-based
Summary
34 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Test Plan
Introduction
Scope of testing / Purpose
Relationship to the PLC (V-cycle)
Acceptance criteria
System overview
Test approach
Tailoring of Test Strategy and Test Documentation
Definitions of Test Categories
Test suite types
Communication between testing and integration team
35 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Test Plan
Test environment
Test configuration set-up
References
36 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Test Report
37 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti
Test Report
38 /
Autor
/Interior Infotaiment and Connectivity R&D Romania
Datu
m ©
Conti