SW Testing Basics 2011 Module 4

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 55

NSN internal knowledge share

SW Testing Basics
Teresa Sousa (maria.sousa@nsn.com)
FPM26 October 2011

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

NSN internal knowledge share


SW Testing Basics
Module 4 Testing Techniques
Teresa Sousa (maria.sousa@nsn.com)
FPM26 October 2011

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Content
Introduction
Modulo 1 - Why do we need to test
Modulo 2 - Basic concepts
Modulo 3 - An overview in processes
Modulo 4 Testing Techniques
Modulo 5 Best Practices

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Agenda
Needs of testing techniques
Five main techniques referred by ISTQB*
Equivalence class partitioning
Boundary value analysis
Decision tables

Coffee Break

State transition diagrams


Orthogonal Arrays

Conclusions

* International Software Testing Qualification Board


4

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

macro.

Needs of testing techniques

Nokia Siemens Networks 2011

Needs of testing techniques

We need to
know how to
start.

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Needs of testing techniques

We need to be
selective when
the quantity is
huge

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Needs of testing techniques

We need to
select the best
way

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Needs of testing techniques

We need to
avoid
redundancy

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

macro.

Five main techniques referred by ISTQB

10

Nokia Siemens Networks 2011

Five main techniques referred by ISTQB

Equivalence class partitioning


Boundary value analysis
Decision tables
State transition diagrams

Orthogonal Arrays

11

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Equivalence class partitioning


Description:
A set of values that can be handled in the same
way by our system.
The values from the valid partitions will be
processed correctly by the system.
The values that belongs to the invalid partitions will
originate exceptions in our system, maybe errors
messages or crashes
It Reduces a lot the needed number of test cases
because eliminates the need of creating test cases
for all combinations.
When selection the partitions it may lead to missed
or redundant test cases.
If the right partitions are selected, it helps on
efficient testing.
But if different partitions are considered identical, or
identical partitions are considered different, we will
do redundant testing, and will miss other tests.

12

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Equivalence class partitioning


Example:
Equivalent Classes:

ATM Withdrawals:

Minimum amount 10
Maximum amount 200.
Valid withdrawals are in
increments of 10 only.

EC1: Values between 10 and

200 - valid values


EC2: Values minor than 10 invalid values.
EC3: Values greater than 200 invalid values
http:\\www.caveofknowledge.com

10

Invalid partition

200
Valid partition

210

Invalid partition

Note:
Maybe needed more test cases for invalid special cases
13

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

macro.

Exercise

14

Nokia Siemens Networks 2011

Exercise
Equivalent Classes:
EC 1: Less than 1 counter
EC 2: Between 1 and 15 counters
EC 3: More than 15 counters

0 counters

1 counter

Invalid partition

15

Nokia Siemens Networks

Get a graphic in SPOTS


Minimum number of counters 1
Maximum number of counters 15

15 counters

Valid partition

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

16 counters

Invalid partition

Exercise
Equivalent Classes:
EC 1: Less than 10 cars -invalid
EC 2: Between 10 and 20 cars - valid
EC 3: Between 20 and 30 cars - invalid
EC 4: Between 30 and 40 cars - valid
EC 5: More than 40 cars - invalid

10 cars

Invalid partition

16

Nokia Siemens Networks

20 cars

Valid partition

Control nr. of cars in a ship:


There are 4 compartments
In each compartment is possible to

store 10 cars
The ship can not leave with an odd
nr. of compartments occupied.
The occupied compartments do not
need to be completed
To start filling a new compartment
the previous one should be
completed
30 cars

Invalid partition

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

40 cars

Valid partition

Invalid partition

Boundary value analysis


Description:
Complements the equivalent
class partitioning.
Checks the values in the
boundaries of a valid range.
Usually are problematic values
for systems.
The result of this Test cases
specification should be
complemented with the tester
instinct.

17

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Boundary value analysis


Example:

ATM Withdrawals:
Equivalent Classes:
EC1: Values between 10 and
200 - valid values
EC2: Values minor than 10 invalid values.
EC3: Values greater than 200 invalid values

Test Cases:
TC1: 10- valid
TC2: 200 - valid
TC3: 0 - invalid
TC4: 210 - invalid

people with tester instinct, will define


the test cases:
TC5: 9,99
TC6: 200,01

http:\\www.caveofknowledge.com

10

Invalid partition

18

Nokia Siemens Networks

200
Valid partition

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

210

Invalid partition

macro.

Exercise

19

Nokia Siemens Networks 2011

Exercise
Test Cases:
TC1: 0 counters
TC2: 1 counter
TC3: 15 counters
TC4: 16 counters

Equivalent Classes:
EC 1: Less than 1 counter
EC 2: Between 1 and 15 counters
EC 3: More than 15 counters

people with tester instinct, will define


the test cases:
TC5: 2 counters
TC6: 14 counters
TC7: 100 counters

0 counters

1 counter

Invalid partition

20

Nokia Siemens Networks

15 counters

Valid partition

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

16 counters

Invalid partition

Exercise
people with tester
instinct, will define the
test cases:
TC10: 9 cars
TC11: 12 cars
TC12: 19 cars
TC13: 22 cars
TC14: 29 cars
TC15: 32 cars
TC16: 39 cars

Test Cases:
TC1: 10 cars
TC2: 11 cars
TC3: 20 cars
TC4: 21 cars
TC5: 30 cars
TC6: 31 cars
TC7: 40 cars
TC8: 41 cars
TC9: 0 cars

10 cars

Invalid partition

21

Nokia Siemens Networks

20 cars

Valid partition

Equivalent Classes:
EC 1: Less than 10 cars - invalid
EC 2: Between 10 and 20 cars - valid
EC 3: Between 20 and 30 cars - invalid
EC 4: Between 30 and 40 cars - valid
EC 5: More than 40 cars - invalid

30 cars

Invalid partition

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

40 cars

Valid partition

Invalid partition

Decision tables
Description:
List all possible input combinations of
interest, origination test cases.
It is a very mature design technique and
very thorough
It is used to document functionalities
that can be defined by a set of rules:
- Web Browser detection
- Accepting diferent parameters
from object-oriented methods:
setDate(), setDate(dd,mm), or
setDate(dd,mm,yyyy)
Used when there is a feature that needs
a set of inputs, that can change.
This tables can have several formats.
Can have test cases and expected
results in text, or can have almost only
logical keys.

22

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Decision tables
Example:
A situation where we have 3 conditions to check, and
several output according to combination of these 3
conditions. It is needed to check if the browser is Firefox, if
the JavaScript is enabled and if Music plug-in is installed.
The actions maybe to redirect the page, to use cookies, and
to play the music.

23

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Decision tables
Example:
Customer Oriented

24

Test Case

Input and execution conditions

Expected results

The browser is not the firefox

The page is redirected

The browser is firefox


JavaScript disabled

The page is redirected

The browser is firefox


JavaScript is enabled
Music plugin is not installed

Do not redirect the page


Use cookies
Do not play the music

The browser is firefox


JavaScript is enabled
Music plugin is installed

Do not redirect the page


Use cookies
Play the music

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Decision tables
Example:
Development Oriented

Test cases
1

conditions

Yes

Yes

Yes

JavaScript Enabled N/A

No

Yes

Yes

Music plug-in
detected

N/A

N/A

No

Yes

Redirect page

Yes

Yes

No

No

Use cookies

N/A

N/A

Yes

Yes

Play music

N/A

N/A

No

Yes

Input and Execution Conditions


Firefox

No

Expected Results
actions

25

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

macro.

Exercise

26

Nokia Siemens Networks 2011

Exercise

Situation:
A page in a reporter tool has 4 inputs:
Date should be valid
A list of counters, that should be between 1 and 15
and the type of report wanted:
chart or
table.

27

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Decision tables
Exercise:
Customer Oriented

28

Test Case

Input and execution conditions

Expected results

The date is invalid

Message: Date invalid

The date is valid


The number of counters invalid

Message: Invalid number


of counters

The date is valid


The number of counters is valid
The type of report not selected

Message: You must


choose the type of report

The date is valid


The number of counters is valid
Chart report selected

Execute and shows a


Chart

The date is valid


The number of counters is valid
Table report selected

Execute and shows a


Table

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Decision tables
Exercise:
Development Oriented
Test cases
1

Date Valid

No

Yes

Yes

Yes

Yes

Nr. of counters Valid

N/A

No

Yes

Yes

Yes

Table Selected

N/A

N/A

No

Yes

No

Chart Selected

N/A

N/A

No

No

Yes

Invalid date

Yes

No

No

No

No

Invalid nr. of counters

No

Yes

No

No

No

Must choose the type of report No

No

Yes

No

No

Chart

No

No

No

No

Yes

Table

No

No

No

Yes

No

Input and Execution Conditions


conditions
conditions

Expected Results
actions
actions
29

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Decision tables
Exercise:
Development Oriented, focusing only on date field:
Start date and end date should be filled
Start date should be valid
End date should be valid
End Date should be greater that Start date
Selected date should not be in the future

30

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Decision tables
Exercise:
Customer Oriented, focusing only on date field

31

Test Case

Input and execution conditions

Expected results

Start date and End Date is empty

Message: Fill the Date

Start date or End date is empty

Message: Fill the Date

Start date is invalid

Message: Date invalid

End date is invalid

Message: Date invalid

End date is in the future

Message: End Date is in


the future

End date is previous start date

Message: End date must


be after Start Date

Start date and End Date are valid

Go to next field

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Decision tables
Exercise:
Development Oriented, focusing only on date field
Test cases
1

Input and Execution Conditions


conditions
conditions
actions
actions
32

Nr. of Parameters

Start date valid

N/A

N/A

No

Yes

Yes

Yes

Yes

End date valid

N/A

N/A

N/A

No

Yes

Yes

Yes

End date > today

N/A

N/A

N/A

N/A

Yes

No

No

Start date < End date

N/A

N/A

N/A

N/A

N/A

No

Yes

Invalid date

Yes

Yes

Yes

Yes

No

No

No

End Date is in the future

No

No

No

No

Yes

No

No

End date must be after Start Date No

No

No

No

No

Yes

No

Go to next field

No

No

No

No

No

Yes

Expected Results

Nokia Siemens Networks

No

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

http://www.gearfuse.com

Coffee Break
33

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

State transition diagrams


Description:
Used to test the different states of the system
according to different transitions.
To check behaviour of systems with multi-state or
with memory.
It is good to eliminate redundant test cases
State result of the previous event, action or
activity
Transition or event causes change from one
state to another
Usually starts with an UML chart and ends in a
table with test scenarios:

State
Chart

34

Nokia Siemens Networks

Stateevent
table

Transition
Tree

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Test
scenarios

State transition diagrams


Example:
Registering and Running an agent in Spots-RT

State Chart

UnregisterAg

RejectData

No
agent

CreateAgent

FormSetAgentType Window to
to fill
Select

RegAgent

Agent
Registered

StartAg

StopAg
Cancel

Boxes are states


Arrows are transitions or events
35

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Agent
Running

State transition diagrams

UnregisterAg

RejectData

State Event Table

No
CreateAgentForm
SetAgentType Window to RegAgentAgent
StartAg Agent
agent
to fill
Registered
Running
Select
StopAg
Cancel

States
Transitions
36

No Agent

Form to fill

Window to
Select

Agent
Registered

Agent
Running

CreateAgent

SetAgentTyp
e

Cancel

RejectData

regAgent

StartAg

StopAg

UnregisterAg

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

UnregisterAg

State transition diagrams

RejectData

No
agent

Transition Tree

createAgent

Form
to fill

SetAgentType

Window to
Select

RegAgent

Agent
Registered

StartAg

Agent
Running

StopAg
Cancel

No Agent

Form to fill

Window to
Select

Agent
Registered

Agent
Running

createAgent

SetAgentType

Cancel

RejectData

regAgent

StartAg

StopAg

UnregisterAg

No Agent
Re
je c
tD

at
a

TP4

No Agent

createAgent

Form
to fill
TP1

t
Se

pe
tTy
n
e
Ag
Ca
nc

Window to
Select
TP2

reg
Ag
en

Agent
Registered
TP5

el

No Agent
TP3

TP = Test path
37

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Agent
Running

tAg
Star

TP6

Un
re

gis
te r

St
o

pA
g

Agent
Registered
Ag

No Agent
TP7

TP8

No Agent

Form to fill

Window to
Select

Agent
Registered

Agent
Running

createAgent

SetAgentType

Cancel

RejectData

regAgent

StartAg

StopAg

UnregisterAg

State transition diagrams


Test Scenarios
No Agent
TP4

Window to
Select
TP2

Form
to fill

No Agent

Agent
Registered

TP1

AgentX
Running
TP6

TP5

No Agent
No Agent

TP7

TP3

Test Path

State

Initial transition

Succeeding transition

No Agent

createAgen
t

Form to Fill

SetAgentTy
pe

Window to
Select

No Agent

createAgen
t

Form to Fill

Cancel

No Agent

No Agent

createAgen
t

Form to fill

RejectData

No Agent

Form to Fill

SetAgentTy
pe

Window to
Select

regAgent

Agent
Registered

Window to
Select

RegAgent

Agent
Registered

StartAg

Agent
Running

Window to
Select

RegAgent

Agent
Registered

UnregisterA
g

No Agent

Agent
Registered

StartAg

Agent
Running

StopAg

Agent
Registered

38

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Agent
Registered
TP8

State transition diagrams


Test Path

Test Scenarios

State

Initial transition

Succeeding transition

No Agent

createAgen
t

Form to Fill

SetAgentTy
pe

Window to
Select

No Agent

createAgen
t

Form to Fill

Cancel

No Agent

No Agent

createAgen
t

Form to fill

RejectData

No Agent

Window to
Select

RegAgent

Agent
Registered

UnregisterA
g

No Agent

Agent
Registered

StartAg

Agent
Running

StopAg

Agent
Registered

No Agent
TP4

Window to
Select
No Agent

Form
to fill

TP2

Agent
Running
Agent
Registered

TP1

TP6

TP5

No Agent
No Agent
TP3

39

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

TP7

Agent
Registered
TP8

macro.

Exercise

40

Nokia Siemens Networks 2011

Exercise
Situation:
Execution of a report in reporting tool
Close

State Chart

No report

SetDate

Form to fill

SelectCounters

Window to select
counters

SetType

Cancel
Cancel

41

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

SetType

SetDate

SelectCounters

Cancel

Close

GetChart

Form to
select type
GetTable

RejectDate

SetType

SetDate

SelectCounters

Chart

Table

Exercise
State Event Table
Close

Form
Form to
to fill
fill

SelectCounters

Window
Window to
to select
select
counters

Cancel

SetType

Form
Form to
to
select type

Cancel

Table

Close

No Report
SetDate

Form to fill

RejectDate

SelectCount
ers

Nokia Siemens Networks

8
BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Chart

Table

10

14

11

15

12

16

GetChart
42

Form to
Select Type

Cancel

SetType

Window for
counters

GetC
hart

SetType

SetDate

SelectCounters

Cancel

GetTable

SetDate

SetType

SelectCounters

SetDate
RejectDate

No
No report
report

Chart
Chart

Close

SelectCo
unters

No
Report

SetDate

Form
to fill

o
C

11

15

12

16
Cancel

Window for
Counters
TP4

9
Ca
nc

No Report
TP5

Form type

ate

Nokia Siemens Networks

GetC
hart
GetTable

Window for
Counters
TP15

Form Type
TP16

Close

No Report

17

TP17

GetCh
art

Chart
TP8

SetDate
Sele
ctC
oun
ter
Se
tTy
pe

el

tD
jec
Re

43

TP14

TP9

No Report
TP2

Cl
o

No Report
TP7

TP = Test path

SetType

Table

TP6

13

el

Form to Fill

e
at

s
ter
un
o
tC
lec
Se
SetType

nc
Ca

TP1

Close

l
Se

t
ec

Table
Table

t
Se

e
yp
tT
Se

GetChart

rs
te 8
n
u

Cancel

Close

GetTable

14

SetType

10

Form to
select type
select
type

Cancel

Ta
bl
e

RejectDa
te

Table

G
et

Chart

SetType

Window to select
counters
counters

Cancel

Form to
Select
Type

Cancel

SelectCounters

SelectCounters

Window
for
counters

Form to fill

SetDate

SetDate

Form to
fill

SetDate

SetType

RejectDate

No report

No
Report

SelectCounters

Transition Tree

SetDate

State transition diagrams

Chart

se

Form to Fill
TP10

Window for
Counters
TP11

Form Type
TP12

No Report

No Report

TP3

TP13

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

State transition diagrams

tD
Se

Test Scenarios

le
Se

cel

No Report

No
Report

SetDate

SetDate

Form
to fill

Cancel

No Report

Form type
No Report

Form to Fill

SelectCounter
s

Window for
Counters

Cancel

No Report

SetType

Form Type

No Report

SetDate

Form to Fill

SelectCounter
s

Form to Fill

SelectCounter
s

Window for
Counters

Window for
Counters

SetType

Form Type

Window for
Counters

SetType

Form Type

GetChart

Chart

Window for
Counters

SetType

Form Type

GetTable

Table

10

Form Type

GetChart

Chart

SetDate

Form to Fill

11

Form Type

GetChart

Chart

SelectCounter
s

Window for
Counters

12

Form Type

GetChart

Chart

SetType

Form type

13

Form Type

GetChart

Chart

Close

No Report

14

Form Type

GetTable

Table

SetDate

Form to Fill

15

Form Type

GetTable

Table

SelectCounter
s

Window for
Counters

16

Form Type

GetTable

Table

SetType

Form type

Form Type

GetTable

Table

Close

No Report

17
44

Nokia Siemens Networks

ate

tD
jec
Re

No Report
TP2

Cancel
No Report

Close

No Report

TP3

Chart

TP6

Form to Fill
TP14

Window for
Counters
TP15

Form Type
TP16

No Report
TP17

TP8

RejectDate

SetDate

Window for
Counters

SetType

TP9

GetCh
art

e
nc
Ca

Ca to Fill
Form
nc
el

No Report

TP1

Ta
bl
e

TP4

TP5

Table

s
t er
un

G
et

s
n
u
o
C
ct
e
l
Se Form to Fill

Initial transition ter

State

No Report

e
yp
tT
Se

Test Path

Can
Window for
CountersSucceeding transition

o
ctC

e
at

No Report
TP7

SetDate
Sele
ctC
oun
ters
Se
tTy
pe
Cl
os
e

Form to Fill
TP10

Window for
Counters
TP11

Form Type
TP12

No Report
TP13

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

State transition diagrams


Test Scenarios
Test Path

State

Initial transition

Succeeding transition

No Report

SetDate

Form to Fill

Cancel

No Report

No Report

SetDate

Form to Fill

RejectDate

No Report

No Report

SetDate

Form to Fill

SelectCounter
s

Window for
Counters

Form to Fill

SelectCounter
s

Window for
Counters

Cancel

No Report

Form to Fill

SelectCounter
s

Window for
Counters

SetType

Form Type

Window for
Counters

SetType

Form Type

Cancel

No Report

Window for
Counters

SetType

Form Type

GetChart

Chart

Window for
Counters

SetType

Form Type

GetTable

Table

10

Form Type

GetChart

Chart

SetDate

Form to Fill

11

Form Type

GetChart

Chart

SelectCounter
s

Window for
Counters

12

Form Type

GetChart

Chart

SetType

Form type

13

Form Type

GetChart

Chart

Close

No Report

14

Form Type

GetTable

Table

SetDate

Form to Fill

15

Form Type

GetTable

Table

SelectCounter
s

Window for
Counters

16

Form Type

GetTable

Table

SetType

Form type

17

Form Type

GetTable

Table

Close

No Report

45

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

State transition diagrams


Test Scenarios
Test Path

State

Initial transition

Succeeding transition

No Report

SetDate

Form to Fill

RejectDate

No Report

Form to Fill

SelectCounter
s

Window for
Counters

Cancel

No Report

Window for
Counters

SetType

Form Type

GetChart

Chart

Form Type

GetTable

17

Table

Close

Form to Fill

te
Da
t
Se

No Report

TP14

Window for
Counters

rs
nte

SetDate

Form
to fill

No Report

Form type
Ca
n

ce

G
et
Ta
bl
e

TP5

Table

TP8

ctD
ate

No Report
TP2

TP3

46

Nokia Siemens Networks

SetDate
Sele
ctCo
unte
r
Se
tTy
pe

Cl
o

No Report
TP7

No Report

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

TP16

Close

el

je
Re

Form Type
No Report
TP17

Chart

TP6

TP15

TP9

GetCh
art

nc
Ca

TP1

TP4

Cancel

e
yp
tT
Se

No
Report

c
le
Se

n
ou
tC

rs
te

Window for
Counters

ou
tC
c
e
l
Se
SetType

se

Form to Fill
TP10

Window for
Counters
TP11

Form Type
TP12

No Report
TP13

Test Path

Exercise
State Chart with selected test
scenarios

State

Initial transition

Succeeding transition

No Report

SetDate

Form to Fill

RejectDate

No Report

Form to Fill

SelectCounter
s

Window for
Counters

Cancel

No Report

Window for
Counters

SetType

Form Type

GetChart

Chart

17

Form Type

GetTable

Table

Close

No Report

Close

No report

SetDate

Form to fill

SelectCounters

Window to select
counters

SetType

Cancel
Cancel

47

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

SetType

SetDate

SelectCounters

Cancel

Close

GetChart

Form to
select type
GetTable

RejectDate

SetType

SetDate

SelectCounters

Chart

Table

Orthogonal Arrays
Description:
Is a mathematical approach to select subsets of tests, when it is impossible to test all
test cases, due to too much combinations.
This technique expose pair-wise defects.
Allows to detect compatibility problems because select pairs.
Reduce the number of test cases.

48

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Orthogonal Arrays
Example:
WebBrowser: Internet Explorer, Firefox, Opera
Client Operation System: Windows2000, WindowsXP, windows2003
DataBase Management System: SQL Server, SyBase, Oracle
Language: English, Portuguese, Finnish

Combinations to test: 3 x 3 x 3 x 3 = 81!!!

49

Test Case

Browser

Operation
System

DataBase

Language

IE

2000

SQL

English

IE

XP

SyBase

Finnish

IE

2003

Oracle

Portuguese

Firefox

2000

SyBase

English

Firefox

XP

Oracle

Finnish

Firefox

2003

SQL

Portuguese

Opera

2000

Oracle

English

Opera

XP

SQL

Finnish

Opera

2003

SyBase

Portuguese

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

It is possible to
reduce from 81
test cases to 9
test cases!

macro.

Exercise

50

Nokia Siemens Networks 2011

Exercise
Situation:
Magic is a system running in Linux and can use for webservices TomCat
or Websphere, user can run web browser in Windows XP, Windows 7 and
Linux, the web browser can be Internet Explorer, Firefox or Opera, and
can export for csv, xml or HTML.
a) How many test cases do we have for all combinations?
b) Find out how many test cases can we have using orthogonal arrays, by
building the table.

Solution:
a) How many test cases do we have for all combinations?
2 x 3 x 3 x 3 = 54
b) Find out how many test cases can we have using orthogonal arrays, by
building the table.

51

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Exercise
Test Case

Operation
System

Browser

Export

WebServer

WindowsXP

IE

csv

Tomcat

Windows7

IE

xml

Tomcat

Linux

IE

HTML

Tomcat

WindowsXP

Firefox

csv

Websphere

Windows7

Firefox

xml

Websphere

Linux

Firefox

HTML

Websphere

WindowsXP

Opera

csv

Tomcat

Windows7

Opera

xml

Websphere

Linux

Opera

HTML

Tomcat

Solution:
a) How many test cases do we have for all combinations?
2 x 3 x 3 x 3 = 54
b) Find out how many test cases can we have using orthogonal arrays, by
building the table.
It is possible to reduce from 54 test cases to 9 test cases!

52

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

macro.

Conclusions

53

Nokia Siemens Networks 2011

Conclusions
Five main techniques referred by ISTQB
Equivalence class partitioning
Reduce number of tests

Boundary value analysis


Identify error-prone areas

Decision tables
List all possible conditions

State transition diagrams


Guide the testing approach

Orthogonal Arrays
Expose pair-wise defects
54

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

Useful Links
Link to ISTQB:
http://www.istqb.org/
Interesting Link:
http://www.testingstandards.co.uk/

55

Nokia Siemens Networks

BSO OSS R&D FPM 26 / Teresa Sousa / October 2011

You might also like