Black box test techniques overview
-
Upload
vilius-zukauskas -
Category
Technology
-
view
66 -
download
0
Transcript of Black box test techniques overview
![Page 1: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/1.jpg)
Black box test techniquesBy Vilius Žukauskas, test engineer in Visma Lietuva
![Page 2: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/2.jpg)
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)
![Page 3: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/3.jpg)
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?
![Page 4: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/4.jpg)
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?
![Page 5: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/5.jpg)
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
![Page 6: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/6.jpg)
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?
![Page 7: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/7.jpg)
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
![Page 8: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/8.jpg)
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
![Page 9: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/9.jpg)
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.
![Page 10: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/10.jpg)
How can we optimize a decision table?
● Domain analysis. This technique combines well with equivalence classes, boundary values analysis and decision tables.
![Page 11: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/11.jpg)
State transition testing
● It is a technique in which test cases are designed to execute valid and invalid state transitions.
![Page 12: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/12.jpg)
State transition diagram
![Page 13: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/13.jpg)
State transition table construction rules
How it is made:● Current state● Event/condition● Action● New state
![Page 14: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/14.jpg)
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
![Page 15: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/15.jpg)
Switch coverage techniques
● Sequences of transitionsgeneration.Two most popular:● 0-switch coverage● 1-switch coverage
![Page 16: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/16.jpg)
Switch coverage example
0-switch 1-switch
A1 A2 A1B3 A2A1
B3 B4 B4C5 C5D7
C5 ... D7A1 ...
![Page 17: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/17.jpg)
Use case testing
● Technique in which test cases are designed to execute user scenarios.
● Using business language
![Page 18: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/18.jpg)
Use case testing example
● 4 test cases● Short, clear descriptions● mostly “Happy path” testing
Client should be able to add funds
![Page 19: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/19.jpg)
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)
![Page 20: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/20.jpg)
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
![Page 21: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/21.jpg)
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
![Page 22: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/22.jpg)
Classification trees
• Technique in which test cases, described by means of a classification tree, are designed to execute combinations.
![Page 23: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/23.jpg)
Classification tree example
![Page 24: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/24.jpg)
Classification tree table
TC 1 X X X
TC 2 X X X
... ... ... ... ... ... ... ...
![Page 25: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/25.jpg)
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.
![Page 26: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/26.jpg)
Error guessing testing
● Technique where the experience of the tester is used to anticipate what defects might be present.
● This technique has no rules.
![Page 27: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/27.jpg)
Checklist based testing
● Make a list of features to be tested.
● Test using that list.
![Page 28: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/28.jpg)
Checklist based testing - example
If we want to test the UI of any functionality:● Consistency● Screen size● Error messages, dialogs● Translations● Simple navigation● ...
![Page 29: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/29.jpg)
Exploratory testing● Tester simultaneously learns the system,
designs tests and executes them● Little documentation● Dynamic test goals
![Page 30: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/30.jpg)
Questions?
![Page 31: Black box test techniques overview](https://reader030.fdocuments.net/reader030/viewer/2022032700/55d59577bb61eb22778b46da/html5/thumbnails/31.jpg)