black box test techniques overview

31
Black box test techniques By Vilius Žukauskas, test engineer in Visma Lietuva

Upload: vilius-zukauskas

Post on 20-Aug-2015

65 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Black box test techniques overview

Black box test techniquesBy Vilius Žukauskas, test engineer in Visma Lietuva

Page 2: Black box test techniques overview

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

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

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

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

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

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

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

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

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

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

State transition diagram

Page 13: Black box test techniques overview

State transition table construction rules

How it is made:● Current state● Event/condition● Action● New state

Page 14: Black box test techniques overview

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

Switch coverage techniques

● Sequences of transitionsgeneration.Two most popular:● 0-switch coverage● 1-switch coverage

Page 16: Black box test techniques overview

Switch coverage example

0-switch 1-switch

A1 A2 A1B3 A2A1

B3 B4 B4C5 C5D7

C5 ... D7A1 ...

Page 17: Black box test techniques overview

Use case testing

● Technique in which test cases are designed to execute user scenarios.

● Using business language

Page 18: Black box test techniques overview

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

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

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

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

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

Classification tree example

Page 24: Black box test techniques overview

Classification tree table

TC 1 X X X

TC 2 X X X

... ... ... ... ... ... ... ...

Page 25: Black box test techniques overview

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

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

Checklist based testing

● Make a list of features to be tested.

● Test using that list.

Page 28: Black box test techniques overview

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

Exploratory testing● Tester simultaneously learns the system,

designs tests and executes them● Little documentation● Dynamic test goals

Page 30: Black box test techniques overview

Questions?

Page 31: Black box test techniques overview