Professional Documents
Culture Documents
Techniques
Chapter 3
Topics
Component or Customer or
Regulatory Risk levels and Available
system contractual
standards types documentation
complexity requirements
The types of
Software
Tester knowledge defects expected
Available tools Time and budget development
and skills in the component
lifecycle model
or system
Categories of Test Techniques and Their
Characteristics
black-box
white-box
experience-based
Black-box Test
Techniques
• also called behavioral or behavior-based techniques
• based on an analysis of the appropriate test basis
• applicable to both functional and nonfunctional testing.
• concentrate on the inputs and outputs of the test object
without reference to its internal structure.
White-box test techniques
Equivalence
Equivalence partitions
partitioning
-Valid data
(or classes): -invalid data
(EP)
EP Case 2
In an Examination, a candidate must score a
minimum of 24 marks in order to clear the exam.
The maximum that he can score is 40 marks.
Identify the Valid Equivalence values if the
student clears the exam.
EP Case 3
a) 22,23,26
b) 21,39,40
c) 29,30,31
d) 0,15,22
One of the fields on a form contains a text box
that accepts alphanumeric values. Identify the
Valid Equivalence class
EP case 4 a) BOOK
b) Book
c) Boo01k
d) Book
The Switch is switched off once the temperature
falls below 18 and then it is turned on when the
temperature is more than 21. When the
temperature is more than 21. Identify the
Equivalence values which belong to the same
class.
EP Case 5
a) 12,16,22
b) 24,27,17
c) 22,23,24
d) 14,15,19
Boundary value analysis
Complement the can only be used when the Boundary values : the Test on the boundary values
equivalence partitioning partition is ordered, minimum and maximum for a given range of inputs:
consisting of numeric or values (or first and last - min
sequential data. values) of a partition
- min - 1
- min + 1
- max
Lower - max - 1
Upper
boundary (min) boundary (max) - max + 1
• Valid input: integers in the range 100 to 999
BV Case 1
A wholesaler sells printer cartridges. The
minimum order quantity is 5. There is a 20%
BV Case 3 A. 0,1900,2004,2005
B. 1900, 2004
C. 1899,1900,2004,2005
D. 1899, 1900, 1901,2003,2004,2005
BV Case 4
An input field takes the year of birth between 1900 and 2004
The boundary values for testing this field are
A. 0,1900,2004,2005
B. 1900, 2004
C. 1899,1900,2004,2005
D. 1899, 1900, 1901,2003,2004,2005
BV Case 5
DT Case1
3. If the amount of transactions a customer made in the
previous month was more than RM1,000, and if the
amount of transaction is more than RM500 this time,
allow the customer to pay in advance or pay upon delivery
but with 15% prior deposit.
4. If the amount of transactions a customer made in the
previous month was less than RM1,000, request the
customer to pay in advance.
Given the following business rules to decide on
ordering items for the pizza production.
Given this decision table, what is the expected result for the following
test cases?
(A) TCI: Don't supply car; TC2: Supply car with premium charge.
(B) TCI: Supply car with premium charge; TC2: Supply car with
no premium charge.
(C) TCI: Don't supply car; TC2: Supply car with no premium
charge.
(D) TCI: Supply car with premium charge; TC2: Don't supply car.
DT Case 5
You are testing a banking subsystem that provides overdraft
protection customers who have this feature for their checking
accounts. Overdraft protection allows the customer to
temporarily overdraw their balance, with some predefined credit
limit, without having checks returned. A portion of the decision
table describing that feature as shown.
How many test would you design to cover the decision table?
(A) 3
(B) 2
(C) 5
(D) 15
STATE TRANSITION
DIAGRAMS State Transition
A hill-walker’s watch has two modes: Time and Altimeter. In Time mode,
pressing the Mode switch causes the watch to switch to Alt mode; pressing
Mode again returns to Time mode. While the watch is in Alt mode the Set
button has no effect.
When the watch is in Time mode pressing the Set button transitions the watch
into Set Hrs, from which the Hrs display can be incremented by pressing the
Set button. If the Mode switch is pressed while the watch is in Set Hrs mode
the watch transitions to Set Mins mode, in which pressing the Set button
increments the Mins display. If the Mode button is pressed in this mode the
watch transitions back to Time mode
ST Case 2
Alternative flow 3
Alternative flow 1
Alternative flow 2
Alternative flow 4
1 2 3 4
Identify the use For each For each test Complete the
case scenarios scenario, identify case, identify the test case by
one or more test conditions that adding data
cases will cause it to values
execute.
• Use simple matrix that can be implemented in a
spreadsheet, database or test management tool.
• Number the scenarios and define the
combinations of basic and alternative flows that
leads to them.
Identify the • Many scenarios are possible for one use case
use case • Not all scenarios may be documented .. Use an
Design real input data values that will make You may want to look at the use case
such conditions to be valid or invalid and constructs and branches.
hence the scenarios to happen.
UT Case 1
UT Case 2
UT Case 3
Given the following requirement for a scheduler website:
Identify the test cases that should be created using the use case technique.
Technique Model Typical defects that can be
found using this
technique
SUMMARY Boundary
value
Domain
model
Wrong handling of data on the
domain boundaries
OF BLACK analysis
BOX
Decision Decision Wrong handling of the business
table logic rules
testing model
TECHNIQUES State Behavioral Wrong handling of transitions
transition model between states
testing