how to reduce your test cases... magically!

49
Michaël Pilaeten Reducing your testing efforts… magically! @mpilaeten

Upload: sqalab

Post on 16-Apr-2017

295 views

Category:

Education


1 download

TRANSCRIPT

Page 1: How to reduce your test cases... magically!

Michaël Pilaeten

Reducing your testing efforts… magically!

@mpilaeten

Page 3: How to reduce your test cases... magically!

3© 2013 CTG, Inc.

Page 4: How to reduce your test cases... magically!

4© 2013 CTG, Inc.

Huh?

Page 5: How to reduce your test cases... magically!

simplification

Page 6: How to reduce your test cases... magically!

agecivil

statusresidence

Page 7: How to reduce your test cases... magically!
Page 8: How to reduce your test cases... magically!

How many test cases do you need?

Page 9: How to reduce your test cases... magically!
Page 10: How to reduce your test cases... magically!

Again….

Page 11: How to reduce your test cases... magically!

agecivil

status

work

residence

savings

wage

ecological

children properties charity

Page 12: How to reduce your test cases... magically!
Page 13: How to reduce your test cases... magically!
Page 14: How to reduce your test cases... magically!
Page 15: How to reduce your test cases... magically!

All combinationsHow many test cases do you

need?No negative tests

One test per combination

Page 16: How to reduce your test cases... magically!
Page 17: How to reduce your test cases... magically!

17© 2013 CTG, Inc.

5 x 3 x 3 x 5 x 6 x 7 x 6 x 8 x 8 x 10 = 36.288.000 test cases

Writing a test case: 4 minutesExecuting a test case: 1 minute

36.288.000 test cases x 5 minutes= 181.440.000 minutes of testing= 378.000 man days of testing= 2016 man years of testing

Page 18: How to reduce your test cases... magically!

One more thing….

Page 19: How to reduce your test cases... magically!
Page 20: How to reduce your test cases... magically!

Alternatives?

Page 21: How to reduce your test cases... magically!

21© 2013 CTG, Inc.

Page 22: How to reduce your test cases... magically!

Automation?

Page 23: How to reduce your test cases... magically!

CHERRYPICKING

Page 24: How to reduce your test cases... magically!
Page 25: How to reduce your test cases... magically!
Page 26: How to reduce your test cases... magically!

26© 2013 CTG, Inc.Bug research

Page 27: How to reduce your test cases... magically!

Single mode Double mode

Page 28: How to reduce your test cases... magically!

The solution …

Page 29: How to reduce your test cases... magically!

29© 2013 CTG, Inc.

Pairwise Testing

Page 30: How to reduce your test cases... magically!
Page 31: How to reduce your test cases... magically!

Conditions TC 1 TC 2 TC 3 TC 4 TC 5 TC 6

Condition 1

Condition 2

Condition 3

Condition 4

Condition 5

Binary orthogonal arrays are easy !

1

1

1

1

1

1

1

1

1

1

Step 1: # TC = (# conditions + 1)

Step 2: TC 1 all true

Step 3: Left diagonal true

Step 4: Remaining untrue

0

0

0

0

0 0 0 0

0 0 0

0 0 0

0 0 0

000

Only yes/no options

Page 32: How to reduce your test cases... magically!

Conditions TC 1 TC 2 TC 3 TC 4 TC 5 TC 6

Condition 1

Condition 2

Condition 3

Condition 4

Condition 5

Binary orthogonal arrays are easy !

1

1

1

1

1

1

1

1

1

1

0

0

0

0

0 0 0 0

0 0 0

0 0 0

0 0 0

000

A) Each single condition value is tested

B) Each couple of condition values is tested

single mode defects

double mode defects

Only yes/no options

Page 33: How to reduce your test cases... magically!

Conditions TC 1 TC 2 TC 3 TC 4 TC 5 TC 6

Condition 1

Condition 2

Condition 3

Condition 4

Condition 5

Binary orthogonal arrays are easy !

1

1

1

1

1

1

1

1

1

1

0

0

0

0

0 0 0 0

0 0 0

0 0 0

0 0 0

000

100% certainty of finding all combinatorial defects

25 or 2 x 2 x 2 x 2 x 2 = 32 -> 32 Test Cases

Only yes/no options

Page 34: How to reduce your test cases... magically!

Conditions TC 1 TC 2 TC 3 TC 4 TC 5 TC 6

Condition 1

Condition 2

Condition 3

Condition 4

Condition 5

Binary orthogonal arrays are easy !

1

1

1

1

1

1

1

1

1

1

0

0

0

0

0 0 0 0

0 0 0

0 0 0

0 0 0

000

100% certainty of finding all combinatorial defects

99,8% certainty of finding all combinatorial defects

Only yes/no options

32 Test Cases

6 Test Cases

Page 35: How to reduce your test cases... magically!

Non-Binary orthogonal arrays…

Page 36: How to reduce your test cases... magically!

Age: 3 possibilities

Civil status:5 possibilities

Children:6 possibilities

Properties:6 possibilities

Work:5 possibilities

Savings: 8 possibilities

Residence:3 possibilities

Ecological:10 possibilities

Wage:7 possibilities

Charity:8 possibilities

Page 37: How to reduce your test cases... magically!

Age: 3 possibilities

Civil status:5 possibilities

Children:6 possibilities

Properties:6 possibilities

Work:5 possibilities

Savings: 8 possibilities

Residence:3 possibilities

Ecological:10 possibilities

Wage:7 possibilities

Charity:8 possibilities

We need this* orthogonal array:* or larger

L 101

Page 38: How to reduce your test cases... magically!

Age: 3 possibilities

Civil status:5 possibilities

Children:6 possibilities

Properties:6 possibilities

Work:5 possibilities

Savings: 8 possibilities

Residence:3 possibilities

Ecological:10 possibilities

Wage:7 possibilities

Charity:8 possibilities

We need this* orthogonal array:* or larger

L 10182

Page 39: How to reduce your test cases... magically!

Age: 3 possibilities

Civil status:5 possibilities

Children:6 possibilities

Properties:6 possibilities

Work:5 possibilities

Savings: 8 possibilities

Residence:3 possibilities

Ecological:10 possibilities

Wage:7 possibilities

Charity:8 possibilities

We need this* orthogonal array:* or larger

L 10182 71

Page 40: How to reduce your test cases... magically!

Age: 3 possibilities

Civil status:5 possibilities

Children:6 possibilities

Properties:6 possibilities

Work:5 possibilities

Savings: 8 possibilities

Residence:3 possibilities

Ecological:10 possibilities

Wage:7 possibilities

Charity:8 possibilities

We need this* orthogonal array:* or larger

L 10182 71 62

Page 41: How to reduce your test cases... magically!

Age: 3 possibilities

Civil status:5 possibilities

Children:6 possibilities

Properties:6 possibilities

Work:5 possibilities

Savings: 8 possibilities

Residence:3 possibilities

Ecological:10 possibilities

Wage:7 possibilities

Charity:8 possibilities

We need this* orthogonal array:* or larger

L 10182 71 62 52

Page 42: How to reduce your test cases... magically!

Age: 3 possibilities

Civil status:5 possibilities

Children:6 possibilities

Properties:6 possibilities

Work:5 possibilities

Savings: 8 possibilities

Residence:3 possibilities

Ecological:10 possibilities

Wage:7 possibilities

Charity:8 possibilities

We need this* orthogonal array:* or larger

L 10182 71 62 52 32

Page 44: How to reduce your test cases... magically!
Page 45: How to reduce your test cases... magically!

James Bach

@jamesmarcusbach

www.satisfice.org

Page 46: How to reduce your test cases... magically!
Page 47: How to reduce your test cases... magically!

47© 2013 CTG, Inc.

5 x 3 x 3 x 5 x 6 x 7 x 6 x 8 x 8 x 10 = 36.288.000 test cases

Writing a test case: 4 minutesExecuting a test case: 1 minute

36.288.000 test cases x 5 minutes= 181.440.000 minutes of testing= 2016 man years of testing

Allpairs algorithm:= 97 test cases

97 test cases x 5 minutes= 485 minutes of testing= 1 man day of testing

1 man day versus 2016 man years ?

Page 48: How to reduce your test cases... magically!

99,8% is not 100%Different types of tests

Defect taxonomy

Page 49: How to reduce your test cases... magically!

49© 2013 CTG, Inc.

REDUCE

FOCUS