Download - Techniques in black box testing

Transcript
Page 1: Techniques in black box testing

Techniques in Black Box TestingTechniques in Black Box TestingPresenter: Le Thuy Linh

25-Apr-14 Copyright 2014 © ANS Asia 1

Page 2: Techniques in black box testing

Agenda

� About A.N.S Asia and About Me

� Techniques in Black Box Testing

� Discussions

25-Apr-14 2Copyright 2014 © ANS Asia

Page 3: Techniques in black box testing

About A.N.S Asia

� 100% subsidiary of ANS Japan

� Address : 10F CMC Tower, Duy Tan Street

� Foundation: 10/2012� Foundation: 10/2012

� Business functions: Software development and IT consulting,…

25-Apr-14 3Copyright 2014 © ANS Asia

Page 4: Techniques in black box testing

About Me

� My Name: Le Thuy Linh

� Current position: Tester

� Interesting in: Travelling, Listening Music... Music...

25-Apr-14 4Copyright 2014 © ANS Asia

Page 5: Techniques in black box testing

Methods in Testing

I/P O/P

� Black Box Testing

� White Box Testing

25-Apr-14 5Copyright 2014 © ANS Asia

Page 6: Techniques in black box testing

Techniques

� Equivalence Partitioning

� Boundary-value Analysis

� Cause – effect graphic testing

� State transition testing� State transition testing

� ....

25-Apr-14 6Copyright 2014 © ANS Asia

Page 7: Techniques in black box testing

Equivalence Partitioning

� Equivalence partitioning is based on the premise that the inputs of a component can be partitioned into classes

� The result of testing a single value from an equivalence partition is considered representative of the complete partition.

25-Apr-14 7Copyright 2014 © ANS Asia

Page 8: Techniques in black box testing

Equivalence Partitioning

Determine equivalence classes:

� a<x<b

� True/False

� {a,b,c,..}

25-Apr-14 8Copyright 2014 © ANS Asia

Page 9: Techniques in black box testing

Boundary Value Analysis (BVA) is a test Functional Testing technique where the extreme boundary values are chosen.

� Standard BVA

BVA

� Standard BVA

� Robustness testing

25-Apr-14 9Copyright 2014 © ANS Asia

Page 10: Techniques in black box testing

� Standard BVA

Boundary values include: Min, Min+, Mom, Max-, Max

Test cases : 4n+1

BVA - Standard

Test cases : 4n+1

– 4: values( min,min+, max, max-)

– n: number of variables

– 1: mom

25-Apr-14 10Copyright 2014 © ANS Asia

Page 11: Techniques in black box testing

� Robustness testing:

Boundary values include : Min, Min+, Mom, Max, Max, Min-, Max+

Test cases: 6n+1.

BVA - Robustness

Test cases: 6n+1.

– 6: values(min-, min,min+, max-, max,max+)

– n: number of variables

– 1: mom

25-Apr-14 11Copyright 2014 © ANS Asia

Page 12: Techniques in black box testing

� Cause Effect Graph is a black box testing

technique that graphically illustrates the

relationship between a given outcome and

all the factors that influence the outcome.

Cause –effect graphic

all the factors that influence the outcome.

25-Apr-14 12Copyright 2014 © ANS Asia

Page 13: Techniques in black box testing

Cause – effect graphic

� Step 1: Identify the causes and the effects

� Step 2: Establish the graph of relations between causes and effects

�� Step 3: Complete the graph by adding constraints between causes and effects

� Step 4: Convert the graph to a decision table

� Step 5: Generate a test cases

25-Apr-14 13Copyright 2014 © ANS Asia

Page 14: Techniques in black box testing

A system of car insurance premiums:

� Sex is Female and Age is < 65, Premium is 500$

� Sex is Male and Age is < 25, Premium is

Example

� Sex is Male and Age is < 25, Premium is 3000$

� Sex is Male and Age is => 25 and <65, Premium is 1000$

� Age is => 65, Premium is 1500$

25-Apr-14 14Copyright 2014 © ANS Asia

Page 15: Techniques in black box testing

Establish the graph of relations between causes and effects

Step 2

25-Apr-14 15Copyright 2014 © ANS Asia

Page 16: Techniques in black box testing

Complete the graph by adding constraints between causes and effects

Example – Step 3

25-Apr-14 16Copyright 2014 © ANS Asia

Page 17: Techniques in black box testing

Example – Step 3

25-Apr-14 Copyright 2014 © ANS Asia 17

Page 18: Techniques in black box testing

Example – Step 4

25-Apr-14 Copyright 2014 © ANS Asia 18

Page 19: Techniques in black box testing

Example – Step 5

25-Apr-14 Copyright 2014 © ANS Asia 19

Page 20: Techniques in black box testing

State transition testing

State transition technique is a dynamic testing technique, which is used when the system is defined in terms of a finite number of states and the transitions between the states is governed by the rules of the system.

25-Apr-14 Copyright 2014 © ANS Asia 20

Page 21: Techniques in black box testing

Shopping Cart

• Your Shopping Cart is empty - S1

• Add Item - S2

• Remove Item

• Checkout - S3• Checkout - S3

• Payment - S4

25-Apr-14 Copyright 2014 © ANS Asia 21

Page 22: Techniques in black box testing

State –Transition diagram

25-Apr-14 Copyright 2014 © ANS Asia 22

Page 23: Techniques in black box testing

State -Transition Tables

25-Apr-14 Copyright 2014 © ANS Asia 23

Page 24: Techniques in black box testing

Test Case

25-Apr-14 Copyright 2014 © ANS Asia 24

Page 25: Techniques in black box testing

Q & A

25-Apr-14 Copyright 2014 © ANS Asia 25

Page 26: Techniques in black box testing

ThanksThanks

25-Apr-14 Copyright 2014 © ANS Asia 26