197
AmiBug.Com, Inc. Test Fundamentals For Expert Testers Robert Sabourin President AmiBug.Com, Inc. Montreal, Canada [email protected] June 5, 2014 © Robert Sabourin, 2014 Slide 1

Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Test FundamentalsFor Expert Testers

Robert Sabourin

President

AmiBug.Com, Inc.

Montreal, Canada

[email protected] 5, 2014 © Robert Sabourin, 2014 Slide 1

Page 2: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 2

• Robert Sabourin ,

Software Evangelist

• President

• AmiBug.Com Inc.

• Montreal, Quebec,

Canada

[email protected]

• www.amibug.com

Test FundamentalsFor Expert Testers

Page 3: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Quiz

• Application screens

are selected with

three controls:

(a) has 5 options

(b) has 6 options

(c) has 2 options

• How many screens can a user choose?

June 5, 2014 © Robert Sabourin, 2014 Slide 3

Page 4: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Quiz

• Total Combinations

= 6 x 5 x 2 = 60

• To exercise each

combination once a

total of 60 tests

would be required.

June 5, 2014 © Robert Sabourin, 2014 Slide 4

Page 5: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

• How many tests

would be required to

exercise all possible

screens in every

possible order?.

Quiz

June 5, 2014 © Robert Sabourin, 2014 Slide 5

Page 6: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

• To exercise all screens in every

possible order would require

60! Test cases

60! = 60 x 59 x 58 x ... 3 x 2 x 1

60! ≈ 8.32 x 10**81

Pop Quiz

June 5, 2014 © Robert Sabourin, 2014 Slide 6

Page 7: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pop Quiz

From 7.0 × 10**79

To 1.5 × 10**82

How many atoms are in

the observable

universe?

June 5, 2014 © Robert Sabourin, 2014 Slide 7

Page 8: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 8

Fundamental Question

• How do you know when you are finished?

Page 9: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

What is Quality?

June 5, 2014 © Robert Sabourin, 2014 Slide 9

Page 10: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 10

Crosby on Quality

• “Quality is defined as conformance to

requirements”

• “Quality is not a measure of

GOODNESS”

– Phil B. Crosby, Quality is Free

Page 11: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 11

Gerald M. Weinberg

“Quality is value to some person”

Exploring Requirements Quality Before Design

Dorset House

Page 12: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 12

“Quality is fitness for use”

Joseph Juran

Quality Control Handbook

Page 13: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

What is Quality?

June 5, 2014 © Robert Sabourin, 2014 Slide 13

Conform to requirements

Value to stakeholders

Suit purpose

Page 14: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 14

Edsger W. Dijkstra

• “Program testing can be used to show

the presence of bugs, but never to show

their absence”

Page 15: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Marcus Vitruvius PollioDe Architectura (25 BCE)

An architect should be ingenious …

… and apt in the

acquisition of

knowledge.

June 5, 2014 © Robert Sabourin, 2014 Slide 15

Page 16: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Marcus Vitruvius Pollio

• Skill set of an architect:

– Good writer

– Skilled draftsman

– Versed in geometry and optics

– Expert in figures

– Acquainted with history

– Informed on the principles of

natural and moral philosophy

– Musician

– Not ignorant of the sciencesJune 5, 2014 © Robert Sabourin, 2014 Slide 16

Page 17: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Marcus Vitruvius Pollio

• Quality Principles

– Firmatis (Durability) - It should stand

up robustly and remain in good

condition.

– Utilitas (Utility) - It should be useful

and function well for the people using

it.

– Venustatis (Beauty) - It should delight

people and raise their spirits.

June 5, 2014 © Robert Sabourin, 2014 Slide 17

Page 18: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Circa 25 BC

June 5, 2014 © Robert Sabourin, 2014 Slide 18

Page 19: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Circa 1979

June 5, 2014 © Robert Sabourin, 2014 Slide 19

Page 20: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 20

"No! Try not, Do. Or do not.

There is no try."

Yoda

Page 21: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 21

C. Northcote Parkinson

Parkinson’s Law:

“…work expands so as to fill the time available for its completion…”

Page 22: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pareto Principle

• Vilfredo Pareto, 1848 - 1923, Economist

– 80% of the wealth was in the hands of 20%

of the population

June 5, 2014 © Robert Sabourin, 2014 Slide 22

Page 23: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pareto Principle

Joseph Juran, 1904 - 2008

• 1950 Quality Control Handbook

• 20% of the study population accounts for 80% of the measure under consideration

• The critical few and the trivial many

June 5, 2014 © Robert Sabourin, 2014 Slide 23

Page 24: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Bugs on Bugs

Some Boolean algebra

June 5, 2014 © Robert Sabourin, 2014 Slide 24

Page 25: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Duck Season

• Who is the duck?

• Who is the rabbit?

• Isn’t it obvious?

• Peer rivalry

• Common nemesis

June 5, 2014 © Robert Sabourin, 2014 Slide 25

Page 26: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Rabbit Season

• Just because it

was written down

doesn't make it

so!

June 5, 2014 © Robert Sabourin, 2014 Slide 26

Page 27: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Duck Season

• Ambiguous

pronouns

• Fallacious

negation

• Role playing

June 5, 2014 © Robert Sabourin, 2014 Slide 27

Page 28: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Which Season?

June 5, 2014 © Robert Sabourin, 2014 Slide 28

ME HOME RESULT COMMENT

F F Shoot Rabbit now Probably the opposite the Rabbit Wanted

F T Shoot Rabbit at home Another interesting opposite

T F Shoot me now Funny opposite

T T Shoot me at home Suggested target

SHOOT

Page 29: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Boolean Logic

• Conditions– TRUE

– FALSE

• Primary Operators– AND

– OR

– XOR

– NOT

• Composite Operators– NAND

– NOR

June 5, 2014 © Robert Sabourin, 2014 Slide 29

Page 30: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Boolean Logic

• Demorgan’s Rule

– NOT ( (A) AND (B) ) = (NOT (A)) OR (NOT (B))

June 5, 2014 © Robert Sabourin, 2014 Slide 30

Page 31: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

DeMorgan’s Law

A B Not A Not B A and B NOT (A and B) (Not A) or (Not B)

0 0 1 1 0 1 1

0 1 1 0 0 1 1

1 0 0 1 0 1 1

1 1 0 0 1 0 0

June 5, 2014 © Robert Sabourin, 2014 Slide 31

Page 32: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Boolean Logic

• Composed Logic

– Minterms

• For “n” logical variables there are 2n Minterms

• Any logical function of “n” variables can be

constructed from the logical OR of one or more

Minterms

June 5, 2014 © Robert Sabourin, 2014 Slide 32

Page 33: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Boolean Logic

• Composed Logic

– 2 Variable Minterms

MINTERM A B

M0 F F

M1 F T

M2 T F

M3 T T

June 5, 2014 © Robert Sabourin, 2014 Slide 33

Page 34: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Boolean Logic

• Composed Logic

– 3 Variable Minterms

MINTERM A B C

M0 F F F

M1 F F T

M2 F T F

M3 F T T

M4 T F F

M5 T F T

M6 T T F

M7 T T T

June 5, 2014 © Robert Sabourin, 2014 Slide 34

Page 35: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Boolean Logic

MINTERM A B C Y

M0 F F F F

M1 F F T T

M2 F T F T

M3 F T T F

M4 T F F T

M5 T F T F

M6 T T F F

M7 T T T T

Y = M1 OR M2 OR M4 OR M7

M1 = (NOT A) AND (NOT B) AND (C)

M2 = (NOT A) AND (B) AND (NOT C)

M4 = (A) AND (NOT B) AND (NOT C)

M7 = (A) AND (B) AND (C)June 5, 2014 © Robert Sabourin, 2014 Slide 35

Page 36: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Logic Reduction

• Express a logical relationship with fewer

terms

– Karnaugh (K) mapping

• Visual

– Quine-McCluskey

• Tabular

June 5, 2014 © Robert Sabourin, 2014 Slide 36

Page 37: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Ambiguous Requirements

• Is it really perfectly

clear?

• Do not tick off the

stakeholders

• Decision tables?

• Real communications?

June 5, 2014 © Robert Sabourin, 2014 Slide 37

Page 38: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Test Design

Decision Tables

June 5, 2014 © Robert Sabourin, 2014 Slide 38

Page 39: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

• The following instructions are taken from FAFSASM,

the Free Application for Federal Student Aid form:

Step Four: Who is considered a parent in this step? Read these notes to

determine who is considered a parent for purposes of this form. Answer all

questions in Step Four about them, even if you do not live with them. Are you an

orphan, or are you or were you (until age 18) a ward/dependent of the court? If

Yes, skip Step Four. If your parents are both living and married to each other,

answer the questions about them. If your parent is widowed or single, answer the

questions about that parent. If your widowed parent is remarried as of today,

answer the questions about that parent and the person whom your parent

married (your stepparent). If your parents are divorced or separated, answer the

questions about the parent you lived with more during the past 12 months. (If you

did not live with one parent more than the other, give answers about the parent

who provided more financial support during the last 12 months, or during the

most recent year that you actually received support from a parent.) If this parent

is remarried as of today, answer the questions on the rest of this form about that

parent and the person whom your parent married (your stepparent).

System Requirements | Visual Models | Decision Tables

June 5, 2014 © Robert Sabourin, 2014 Slide 39

Page 40: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

Construction

1. Identify Conditions

2. Identify Actions

3. Relate Conditions to Actions with Rules

4. Logic Reduction

5. Tests each Rule

June 5, 2014 © Robert Sabourin, 2014 Slide 40

Page 41: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

Logic Modeling

Application Logic

Business Rules

Regulations

Multiple Conditions

Multiple Actions

June 5, 2014 © Robert Sabourin, 2014 Slide 41

Page 42: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

Conditions

Rules

Actions

June 5, 2014 © Robert Sabourin, 2014 Slide 42

Page 43: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tablesw

ww

.wik

ipedia

.co

m

June 5, 2014 © Robert Sabourin, 2014 Slide 43

Page 44: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Fizzbin

• Complex rules

• Conditions?

• Actions?

June 5, 2014 © Robert Sabourin, 2014 Slide 44

Page 45: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Fizzbin

• Each player gets six cards, except for the player on the dealer's right,

who gets seven

• The second card is turned up, except on Tuesdays

• Two jacks are a half-fizzbin

• If you have a half-fizzbin

• a third jack is a shralk and results in disqualification

• one wants a king and a deuce, except at night, when one wants a

queen and a four

• if a king had been dealt, the player would get another card, except

when it is dark, in which case he'd have to give it back

• The top hand is a "royal fizzbin", but the odds against getting one are

said to be "astronomical". June 5, 2014 © Robert Sabourin, 2014 Slide 45

Page 46: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

University Acceptance

Decision Table

June 5, 2014 © Robert Sabourin, 2014 Slide 46

Page 47: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision TablesExample

Conditions R01 R02 R03 R04 R05 R06 R07 R08 R09 R10

SAT SCORE High High High High High High High High High High

Prerequisites All All All Core Only Core Only Core Only Partial Partial Partial None

Residency In State Out of State Foreign In State Out of State Foreign In State Out of State Foreign *

Actions

Accept x x x

Redirect x x x x

Conditional x x x

Reject

Grant x x x x x x

June 5, 2014 © Robert Sabourin, 2014 Slide 47

Page 48: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision TablesExample

Conditions R11 R12 R13 R14 R15 R16 R17 R18 R19 R20

SAT SCORE Medium Medium Medium Medium Medium Medium Medium Medium Medium Medium

Prerequisites All All All Core Only Core Only Core Only Partial Partial Partial None

Residency In State Out of State Foreign In State Out of State Foreign In State Out of State Foreign *

Actions

Accept x x x

Redirect x x x

Conditional x x x

Reject x

Grant x x x

June 5, 2014 © Robert Sabourin, 2014 Slide 48

Page 49: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision TableExample

Conditions R21 R22 R23 R24

SAT SCORE Low Low Low Low

Prerequisites All Core Only Partial None

Residency * * * *

Actions

Accept

Redirect

Conditional x

Reject x x x

Grant

June 5, 2014 © Robert Sabourin, 2014 Slide 49

Page 50: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

DVD Rental

Decision Table

June 5, 2014 © Robert Sabourin, 2014 Slide 50

Page 51: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

• The following rules describe how we process

DVDs that are not returned. Create a decision table

that represents these rules:

“When a DVD is “lost” (it has not been returned in 90 days) the following

rules apply: If the customer has not lost any DVDs in the preceding 12

months we do not suspend the account nor do we bill for the lost DVDs. If

the customer has lost 1-2 DVDs in the preceding 12 months and if they

have not filed a complaint with the USPS we do not suspend or bill, If the

customer has lost 1-2 in the preceding 12 months and if they have filed a

complaint with the USPS we do not suspend or bill. If the customer has

lost 3-4 DVDs in the preceding 12 months and if they have not filed a

complaint then we suspend their account but do not bill for the lost DVDs.

If the customer has lost 3-4 DVDs in the preceding 12 months and if they

have filed a complaint then we do not suspend their account nor do we bill

them. If the customer has lost 5 or more DVDs in the preceding 12 months

we suspend their account and bill them for the lost DVDs.”

System Requirements | Visual Models | Decision Tables | Exercise

June 5, 2014 © Robert Sabourin, 2014 Slide 51

Page 52: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision TableExample

Binary Ranges

Conditions Rule 1 Rule 2 Rule 3 Rule 4 Rule 5 Rule 6

Lost DVDs in past 12 Months (YES or NO) NO YES YES YES YES YES

Lost 1-2 DVDS in past 12 Months (YES or NO) NO YES YES YES YES YES

Complaint to USPS Dcare NO YES NO YES Dcare

Lost 3-4 DVDs in past 12 Months (YES or NO) NO NO NO YES YES YES

Lost 5 or more DVDs in past 12 Months (YES or NO) NO NO NO NO NO YES

Actions

Suspend account NO NO NO YES NO YES

Bill for lost DVDs NO NO NO NO NO YES

June 5, 2014 © Robert Sabourin, 2014 Slide 52

Page 53: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision TableExample

Conditions Rule 1 Rule 2 Rule 3 Rule 4 Rule 5 Rule 6

Number of DVDs lost in past 12 Months 0 1-2 1-2 3-4 3-4 5 +

Filled Complaint with USPS Dcare YES NO YES NO Dcare

Actions

Suspend account NO NO NO NO YES YES

Bill for lost DVDs NO NO NO NO NO YES

Value Ranges

June 5, 2014 © Robert Sabourin, 2014 Slide 53

Page 54: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision TableExample

Conditions Rule 1 Rule 2 Rule 3 Rule 4

Number of DVDs lost in past 12 Months 0-2 3-4 3-4 5 +

Filled Complaint with USPS * YES NO Dcare

Actions

Suspend account NO NO YES YES

Bill for lost DVDs NO NO NO YES

Reduced

June 5, 2014 © Robert Sabourin, 2014 Slide 54

Page 55: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Customer Business Rules

Decision Tables

June 5, 2014 © Robert Sabourin, 2014 Slide 55

Page 56: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

Elicited from customer

June 5, 2014 © Robert Sabourin, 2014 Slide 56

Page 57: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

Reduced

June 5, 2014 © Robert Sabourin, 2014 Slide 57

Page 58: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Monopoly®

House Purchase Rules

Decision Tables

June 5, 2014 © Robert Sabourin, 2014 Slide 58

Page 59: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

• House Purchase

Rules

• Property must be in

a color group

• A player must own

all properties of a

color group

• No properties can

be mortgaged

June 5, 2014 © Robert Sabourin, 2014 Slide 59

Page 60: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

• House Purchase

Rules

• Houses must be

available for sale

• Houses must be

built progressively

• Each property can

have a maximum of

4 houses

June 5, 2014 © Robert Sabourin, 2014 Slide 60

Page 61: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

• House Purchase

Rules

• If multiple players

attempt to purchase

the same house the

highest auction

bidder gets it

June 5, 2014 © Robert Sabourin, 2014 Slide 61

Page 62: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 62

Page 63: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Wrap-O-Matic

Decision Tables

June 5, 2014 © Robert Sabourin, 2014 Slide 63

Page 64: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

• Wrapping Rules:• Disallows ribbons applied to unwrapped

chocolates.

• Disallows hollow chocolates tied with metallic

ribbon.

• Uses the gentle wrapping algorithm with tissues

wrappers.

June 5, 2014 © Robert Sabourin, 2014 Slide 64

Page 65: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

• Wrapping Rules:• Uses the rapid wrapping algorithm whenever

chocolates do not have ribbons and do not

have tissue wrappers.

• Uses the gentle algorithm whenever hollow

chocolates are tied with ribbons.

• Uses the normal algorithm for all other cases.

June 5, 2014 © Robert Sabourin, 2014 Slide 65

Page 66: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Decision Tables

Rules

R01 R02 R03 R04 R05 R06 R07 R08 R09 R10 R11 R12 R13 R14 R15

Co

nd

itio

ns

Viscosity Hollow Not Hollow

Ribbon Metallic Other None Metallic or Other None

WrapperMetallic

or PaperTissue None

Metallic

or PaperTissue None

Metallic

or PaperTissue None

Metallic

or PaperTissue None

Metallic

or PaperTissue None

Act

ions

Disallow x x x . . x . . . . . x . . .

Rapid

Algorithm. . . - . - X . x . . . x . x

Normal

Algorithm. . . . . . . . . x . . . . .

Gentle

Algorithm. - . x x x . x . . x . . x .

Wrapping Rules

June 5, 2014 © Robert Sabourin, 2014 Slide 66

Page 67: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Problem Solving

How to solve it?

June 5, 2014 © Robert Sabourin, 2014 Slide 67

Page 68: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Amazon Problem

• So what would you do next?

– Give 3 alternatives

June 5, 2014 © Robert Sabourin, 2014 Slide 68

Page 69: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Problem Solving

June 5, 2014 © Robert Sabourin, 2014 Slide 69

George Pólya

1945

Page 70: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pólya onProblem Solving

How to solve problems

• Understand it

• Plan it

• Do it

• Review it

June 5, 2014 © Robert Sabourin, 2014 Slide 70

Page 71: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pólya onProblem Solving

Understand it

• What are you asked to find or show?

• Can you restate the problem in your own words?

• Can you make a diagram to help understand the problem?

• Is there enough information to find a solution?

• Do you understand concepts used in stating the problem?

• Do you need to ask a question to get the answer?

June 5, 2014 © Robert Sabourin, 2014 Slide 71

Page 72: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pólya onProblem Solving

Plan it

• Guess and check

• Make an orderly list

• Eliminate possibilities

• Use symmetry

• Consider special cases

• Use direct reasoning

• Solve an equation

June 5, 2014 © Robert Sabourin, 2014 Slide 72

Page 73: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pólya onProblem Solving

Plan it

• Look for a pattern

• Draw a picture

• Solve a simpler problem

• Use a model

• Work backward

• Use a formula

• Be creative

• Use your head

June 5, 2014 © Robert Sabourin, 2014 Slide 73

Page 74: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pólya onProblem Solving

Do it

• Prepare

• Follow plan

• Learn

• Adapt

June 5, 2014 © Robert Sabourin, 2014 Slide 74

Page 75: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pólya onProblem Solving

Review it

• Did we solve it?

• Any partial solution?

• Next step?

• New strategy?

June 5, 2014 © Robert Sabourin, 2014 Slide 75

Page 76: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pólya Heuristics

Analogy

• Can you find a problem analogous to your problem and solve that?

Generalization

• Can you find a problem more general than your problem

Induction

• Can you solve your problem by deriving a generalization from some examples?

Variation of the Problem

• Can you vary or change your problem to create a new problem (or set of problems) whose solution(s) will help you solve your original problem?

Auxiliary Problem

• Can you find a subproblem or side problem whose solution will help you solve your problem?

June 5, 2014 © Robert Sabourin, 2014 Slide 76

Page 77: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Pólya Heuristics

Pattern recognition

• Can you find a problem related to yours that has already been solved and use that to solve your problem?

Specialization

• Can you find a problem more specialized?

Decomposing and Recombining

• Can you decompose the problem and "recombine its elements in some new manner"?

Divide and conquer

• Working backward Can you start with the goal and work backwards to something you already know?

Backward chaining

• Draw a Figure Can you draw a picture of the problem

June 5, 2014 © Robert Sabourin, 2014 Slide 77

Page 78: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 78

Test Design

Variable identification

Page 79: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 79

Identify Variables

• What is a variable?

– To VARY is to CHANGE

• A variable is something which can

change

– Software behavior depends on the

VALUES of many VARIABLES

• Anything which influences the

behavior of software could be a

variable

Page 80: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 80

Identify Variables

• Review test basis

• Identify variables– Influencers

– Outcomes

• Potential Sources– Conditions

– Environment

– Rules

– Constraints

– Actions

– States

Page 81: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 81

Wrap-O-Matic

Variable identification

Page 82: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 82

Page 83: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 83

Page 84: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 84

Page 85: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 85

Page 86: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 86

Page 87: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 87

Page 88: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 88

Page 89: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 89

Page 90: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 90

Page 91: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 91

Page 92: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 92

Gmail Image Attachment

Variable identification

Page 93: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 93

Page 94: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 94

Examples

Page 95: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 95

Examples

Page 96: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 96

Insurance Policy Cancelation

Variable identification

Page 97: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 97

Page 98: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 98

Page 99: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 99

Page 100: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 100

Page 101: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 101

Page 102: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 102

Page 103: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Identify Variables

June 5, 2014 © Robert Sabourin, 2014 Slide 103

Act on variables

Ignore

Default values

Specific values

Observe

Page 104: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 104

Test Design

Equivalence Classes

Page 105: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 105

• Equivalence class– A subset of all possible test values to a variable

– Each member assumed provide the same info

– Each variable may have many classes

– Equivalence class are not mutually exclusive

– Focus testing

– Reduce the number of test cases

Taking AIM

Page 106: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 106

Sets – Venn DiagramEquivalence Classes

b

a

c

a

b c

d

a b

c d

e

f

Page 107: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 107

Equivalence Classes

– Sources• Requirements

– Business logic

– Capabilities

– Ranges

– Constraints

• Code

– Decisions

– Intermediate computations

• Data

– Input fields

– Database

– Internal structures

Equivalence

Page 108: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 108

AIM - Equivalence Classes

Page 109: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 109

Square Root Function

AIM - Equivalence Classes

Page 110: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 110

Example: SQRT XEquivalence Classes

Mind Map

Page 111: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 111

Date Field

AIM - Equivalence Classes

Page 112: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 112

Example: Date FieldEquivalence Classes

Mind Map

Page 113: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 113

Insurance Claim Amount

AIM - Equivalence Classes

Page 114: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 114

Example: Claim AmountEquivalence Classes

Mind Map

Page 115: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 115

Gmail “to composed”

AIM - Equivalence Classes

Page 116: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 116

Example: Gmail To ComposedEquivalence Classes

Mind Map

Page 117: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 117

Example: Gmail To ComposedEquivalence Classes

Mind Map

Page 118: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 118

Example: Gmail To ComposedEquivalence Classes

Mind Map

Page 119: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 119

Example: Gmail To ComposedEquivalence Classes

Mind Map

Page 120: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 120

Example: Gmail To ComposedEquivalence Classes

Mind Map

Page 121: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 121

Scenario Based Testing

Page 122: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Whiteboarding

June 5, 2014 © Robert Sabourin, 2014 Slide 122

Use

r M

ind

Ma

p

Page 123: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 123

Buying a Book

Usage Scenarios

Page 124: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Whiteboarding

June 5, 2014 © Robert Sabourin, 2014 Slide 124

Sto

ry B

oa

rd

Page 125: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 125

Page 126: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 126

Page 127: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 127

Page 128: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 128

Social Networking

Usage Scenarios

Page 129: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 129

Page 130: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 130

Scenario Based Testing

Page 131: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 131

Scenario Based Testing

Page 132: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 132

Scenario Based Testing

Page 133: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 133

Scenario Based Testing

Page 134: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 134

Scenario Based Testing

Page 135: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 135

Scenario Based Testing

Page 136: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 136

Scenario Based Testing

Page 137: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 137

Scenario Based Testing

Page 138: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 138

Test Design

Control Flow Testing

Page 139: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 139

Control Flow Testing

• Exercise paths through a

system

– Data Flow

– Transaction Flow

– Code Flow

– Process Flow

Page 140: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 140

Control Flow Testing

• Model flow

– Create control flow diagram

– Find basis paths• Minimal set of transactions

• Exercise at least once

– Each step

– Each decision

Page 141: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 141

Control Flow Testing

– Process Steps

• A flows to B

• B flow to C

B

A

C

Page 142: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 142

Control Flow Testing

– Decisions

• A flow to B or C

CB

A

Page 143: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 143

Control Flow Testing

– Junctions

• A or B flow to C

A

C

B

Page 144: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 144

Control Flow Testing

– Minimal basis paths

• N – number of nodes

• E – number of edges

• P – number of basis paths

• P = E – N + 2

• McCabe Cyclomatic Complexity

B

A

C D

F G

E

H

I

N=9

E=10

P=10-9+2

P=3

Page 145: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 145

Control Flow Testing

– A set of basis paths:

• A B D E G H I

• A B C E G H I

• A B D E F H I

B

A

C D

F G

E

H

I

N=9

E=10

P=10-9+2

P=3

Page 146: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 146

Control Flow Testing

– Finding basis paths:

1. Start with a typical baseline

2. Flip first decision keep rest as similar as possible

3. Continue flipping decisions on baseline

4. After all decisions on baseline have been flipped continue on next path

5. Stop when all paths have been exhausted

B

A

C D

F G

E

H

I

N=9

E=10

P=10-9+2

P=3

Page 147: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 147

Keyword Optimization

Control Flow Diagram

Page 148: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 148

Page 149: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 149

ST A

B

E

C

END

IHG

D

F

Page 150: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 150

Page 151: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 151

Control Flow Testing

Page 152: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 152

Page 153: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 153

Insurance Workflow

Control Flow Diagram

Page 154: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 154

Control Flow Testing

• Application screens

are selected with

three controls:

(a) has 5 options

(b) has 6 options

(c) has 2 options

• How many screens can a user choose?

Page 155: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 155

Control Flow Testing

• Total Combinations

= 6 x 5 x 2 = 60

• To exercise each

combination once a

total of 60 tests

would be required.

Page 156: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 156

Control Flow Testing

• How many tests

would be required to

exercise all possible

screens in every

possible order?.

Page 157: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 157

Control Flow Testing

• To exercise all screens in every

possible order would require

60! Test cases

60! = 60 x 59 x 58 x ... 3 x 2 x 1

60! ≈ 8.32 x 10**81

Page 158: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 158

Control Flow Testing

From 7.0 × 10**79

To 1.5 × 10**82

How many atoms are in

the observable

universe?

Page 159: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 159

Control Flow Testing

Page 160: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 160

Page 161: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 161

Control Flow Diagram to Identify Basis Paths

Basis Paths

p01 Start Dispatch L M N P Q R

p02 Start Dispatch X Y AA AB R

p03 Start Dispatch AC AF AJ AI AK R

p04 Start Dispatch AD AE AF AJ AI AK R

p05 Start Dispatch O P Q R

p06 Start Dispatch K P Q R

p07 Start Dispatch I J C D H P Q R

p08 Start Dispatch A B C D H P Q R

p09 Start Dispatch L M N P S T Q R

p10 Start Dispatch L M N P S T U R

p11 Start Dispatch L M N P S T U V W R

p12 Start Dispatch X Z AA AB R

p13 Start Dispatch X Z AA AM R

p14 Start Dispatch X Z AA AM AN AP AQ R

p15 Start Dispatch X Z AA AM AN AO AQ R

p16 Start Dispatch AC AF AG R

p17 Start Dispatch AC AF AH R

p18 Start Dispatch AC AF AJ AL AM R

p19 Start Dispatch AC AF AJ AL R

p20 Start Dispatch I J C D E F R

p21 Start Dispatch I J C D E G R

p22 Start Dispatch A B R

Nodes 45

Edges 65

Complexity 22 E-N+2

Page 162: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Control Flow

• Some interesting

control flow test ideas

– All nodes

– All edges

– All paths

June 5, 2014 © Robert Sabourin, 2014 Slide 162

Page 163: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 163

Page 164: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 164

Test Design

State Models

Page 165: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 165

Gerald M. Weinberg

“A state is a situation which can be

recognized if it occurs again”

An Introduction to General Systems

ThinkingDorset House

Page 166: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 166

State Models

“Stateful” Systems

Transactions

Embedded Systems

Process

Workflow

User Interface

Page 167: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 167

State Models

State

A

State

B

Transition i

Transition j

Page 168: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 168

State Models

Construction

1. Identify: States

2. Identify: Transitions

3. Identify: Triggers and Outcomes

4. Test: Get to Each State

5. Test: Exercise Each Transition

6. Test: Cover Each Path

Page 169: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 169

San Diego Singles Pattern

State Models

Page 170: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 170

State ModelsSan Diego Singles Pattern

State

C

Transition k

Transition l

State

B

Transition i

Transition j

State

A

Page 171: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 171

State ModelsSan Diego Singles Pattern

Non

Existing

Departed

Come to be

Together

Get Together

Separate

Single

Page 172: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 172

Stack Pattern

State Models

Page 173: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 173

Loaded

Push

Pop beyond Min

State ModelsStack Pattern

Full

Push beyond Max

Pop

Empty

Attempted

Pop

Attempted

PushPush

Pop

Page 174: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 174

Embedded Systems

State Models

Page 175: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 175

State ModelsCoffee Machine

power up

idleinserting

coins

user

choose

make

coffee

service

needed

coin insertedreset button

coin return

right amount

enteredcoin return

button pushed

no cups

OR no coffee

OR sensor jam

cup removed

Page 176: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 176

Insurance Transactions

State Models

Page 177: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 177

State ModelsTransaction

Cancel

Null

Warning

Approved ActiveIssued PaidRequest

Ord

er

su

bm

itte

d

Cre

dit a

nd R

isks O

K

Cre

ate

Po

licy

Re

ce

ive

Pa

ym

en

t

Po

licy A

ctiva

ted

Late Pay

No Pay

Page 178: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 178

Wrap-O-Matic

State Models

Page 179: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

State Models

June 5, 2014 © Robert Sabourin, 2014 Slide 179

IdleError State

Wrapping

Sta

rt Wra

p-o

-Matic

Pre

ssed S

top o

r

Wra

ppin

g C

om

ple

te

Power Up

Attemp to Start without

Manifest or Insufficient

Materials Needed

Pro

cessin

g E

rror

Recovery

System Reset

Recovery Complete

Inputting ManifestBacking up Reports

Inputting Manifest

Backing up

Reports

Page 180: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 180

State Models

Tools of the Trade

Baskets

Index Cards

Excel

Visio

Power Point

Case Tools

Page 181: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

State Models

Model Based Testing

Finite State Machines

Robots

ProbesJune 5, 2014 © Robert Sabourin, 2014 Slide 181

Page 182: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 182

Test Design

Failure Mode Analysis

Page 183: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

Failure Mode and Effects Analysis

Create block diagram

List classes of users

Find elements which can fail

Create usage/failure table

Rank potential failure impacts

June 5, 2014 © Robert Sabourin, 2014 Slide 183

Page 184: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

Create block diagram

Blocks

• System Elements

• Processes

• Subsystems

Connector

• Logical relationships

• Physical relationships

• Process invocations

June 5, 2014 © Robert Sabourin, 2014 Slide 184

Page 185: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

List classes of usersWho are the users?

What are they doing?

Classes

Personas

Context

June 5, 2014 © Robert Sabourin, 2014 Slide 185

Page 186: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

Find elements which can fail

• Break

• Constrained

• Slow

• ABEND

• Crash

June 5, 2014 © Robert Sabourin, 2014 Slide 186

Page 187: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

Create usage/failure table

•Scenarios

• Interesting blocks

June 5, 2014 © Robert Sabourin, 2014 Slide 187

Page 188: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

June 5, 2014 © Robert Sabourin, 2014 Slide 188

Rank potential failure impacts

S4 –

Cosmetic

• User can accomplish the task with some inconvenience

S3 –

Work around

• User can accomplish task by working around the problem

S2 –

No Work around

• User cannot accomplish some tasks

S1 –

Show stopper

• User cannot accomplish any tasks

S0 –

No Impact

• User can accomplish the task

Page 189: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 189

Wrap-O-Matic

Failure Mode Analysis

Page 190: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Whiteboarding

June 5, 2014 © Robert Sabourin, 2014 Slide 190

Fa

ilure

Mo

de

s

Page 191: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

June 5, 2014 © Robert Sabourin, 2014 Slide 191

Page 192: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

June 5, 2014 © Robert Sabourin, 2014 Slide 192

Page 193: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

June 5, 2014 © Robert Sabourin, 2014 Slide 193

Prize Server

Failure Mode Analysis

Page 194: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

June 5, 2014 © Robert Sabourin, 2014 Slide 194

Prize

Manageme

nt Interface

Prize TableGame

ServerPrize Server

Prize

Spinner

Prize Status

ReporterGame Server

System Elements

Page 195: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

Users

Prize Administrator

Database Administrator

Auditor

Player

June 5, 2014 © Robert Sabourin, 2014 Slide 195

Page 196: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Failure Mode Analysis

June 5, 2014 © Robert Sabourin, 2014 Slide 196

Prize System Failure Modes

Pri

ze

Man

age

me

nt

Inte

rfac

e

Pri

ze S

tatu

s

Re

po

rter

Pri

zeT

ab

le

Pri

zeSe

rve

r

Ga

me

Ser

ver

Pri

zeS

pin

ner

User Scenario What if the process fails?

Prize Administrator Add prize S1 S0 S1 S0 S0 S0

Prize Administrator Change prize dates S3 S0 S1 S0 S0 S0

Prize Administrator Change prize amounts S3 S0 S1 S0 S0 S0

Prize Administrator Stop prizes S3 S0 S1 S0 S0 S0

Prize Administrator Start prizes S3 S0 S1 S0 S0 S0

Database Administrator Report prize statusS0 S0 S1 S0 S0 S0

Database Administrator Modify prize statusS0 S0 S1 S0 S0 S0

Auditor View prize schedule S0 S3 S1 S0 S0 S0

Auditor View prizes awarded S0 S3 S1 S0 S0 S0

Auditor View prizes remaining S0 S3 S1 S0 S0 S0

Player Spin for prize S0 S0 S1 S1 S1 S1

Page 197: Test Fundamentals For Expert Testerslets-test.com/wp-content/uploads/2014/06/2014_05_25_Test_Funde… · Conform to requirements Value to stakeholders Suit purpose. AmiBug.Com, Inc

AmiBug.Com, Inc.

Thank You

• Questions?

June 5, 2014 © Robert Sabourin, 2014 Slide 197