black box test techniques overview
TRANSCRIPT
Black box test techniquesBy Vilius Žukauskas, test engineer in Visma Lietuva
Agenda
A lot of black box testing techniques(Equivalence partitioning & boundary values analysis, Decision tables, Cause-effect graphing, State transition, Use case, Domain analysis, Switch coverage, Pairwise testing, Classification trees, Error guessing, Checklist based testing, Exploratory testing)
Equivalence testing
Technique in which test cases are designed to execute representatives from equivalence partitions.
● Simple example: functionality acts differently if number entered is between (-10 – 0), (0 – 10), (10 – 50).
● What are the test cases?
Boundary value analysis
Technique in which test cases are designed based on boundary values.
● Same example: functionality acts differently if number entered is between (-10 – 0), (0 – 10), (10 – 50).
● What are such example boundary values?
Boundary value analysis
● Original ranges: (-10;0), (0;10), (10;50)● Change the ranges to: [-9;-1], [1-9], [11-49]
● Test only these numbers: -10, -9, -1, 0, 1, 9, 10, 11, 49, 50
Decision tables
● Technique in which test cases are designed to execute the combinations of inputs and causes.
● Example: person considers whether to buy a house. What is his possibilities?
Full decision table
Rule 1 Rule 2 Rule 3 Rule 4
Conditions
Person wants to buy a house
Yes Yes No No
Person has enough money
Yes No Yes No
Actions
Person buys a house
Yes No No No
Optimized decision table
Rule 1 Rule 2 Rule 3
Conditions
Person wants to buy a house
Yes Yes No
Person has enough money
Yes No -
Actions
Person buys a house
Yes No No
How can we optimize a decision table?
● Cause-effect graphing. Technique in which test cases are derived from cause-effect graphs.
● Combining decision table with equivalence and boundary value analysis.
How can we optimize a decision table?
● Domain analysis. This technique combines well with equivalence classes, boundary values analysis and decision tables.
State transition testing
● It is a technique in which test cases are designed to execute valid and invalid state transitions.
State transition diagram
State transition table construction rules
How it is made:● Current state● Event/condition● Action● New state
State transition table row example
Current state Event/condition
Action New state
Presenting at the UG
Presentation is over
Someone asks a question
Answering questions
Switch coverage techniques
● Sequences of transitionsgeneration.Two most popular:● 0-switch coverage● 1-switch coverage
Switch coverage example
0-switch 1-switch
A1 A2 A1B3 A2A1
B3 B4 B4C5 C5D7
C5 ... D7A1 ...
Use case testing
● Technique in which test cases are designed to execute user scenarios.
● Using business language
Use case testing example
● 4 test cases● Short, clear descriptions● mostly “Happy path” testing
Client should be able to add funds
Pairwise testing
Test cases executes all possible combinations of each pair of input parameters.
Two approaches:● Orthogonal arrays● Various tools (http://www.pairwise.org/tools.asp)
Simple pairwise testing example
OS = {Win, Linux}, Browser = {Firefox, Chrome}Factor
Test OS Browser
1 Win Firefox
2 Win Chrome
3 Linux Firefox
4 Linux Chrome
How to construct pairwise table
There are two main rules:● As many columns as factors● As many rows as the multiplication of two largest
numbers of options
Classification trees
• Technique in which test cases, described by means of a classification tree, are designed to execute combinations.
Classification tree example
Classification tree table
TC 1 X X X
TC 2 X X X
... ... ... ... ... ... ... ...
User story testing
● As WHO I want WHAT so that WHY
● As a user I want to view my inbox so that I could see who has written me.
Error guessing testing
● Technique where the experience of the tester is used to anticipate what defects might be present.
● This technique has no rules.
Checklist based testing
● Make a list of features to be tested.
● Test using that list.
Checklist based testing - example
If we want to test the UI of any functionality:● Consistency● Screen size● Error messages, dialogs● Translations● Simple navigation● ...
Exploratory testing● Tester simultaneously learns the system,
designs tests and executes them● Little documentation● Dynamic test goals
Questions?