4. @drpicox
@drpicox
How many tests I need for A + B ?
A is a 32 bit integer
B is a 32 bit integer
That are 232 * 232 cases
THE ADDITION PROBLEM
4
TESTING — WHAT TO TEST?
18.446.744.073.709.551.616
1ms each it would take 600 million years
7. @drpicox
@drpicox
Feature:
The calculator adds two numbers
Acceptance Test:
Turn on the calculator
Write 2
Press the plus sign
Write 4
Press equal
The display should show 6
WHAT IS A TEST?
7
TESTING — WHAT IS A TEST?
8. @drpicox
@drpicox
Feature:
The calculator adds two numbers
Acceptance Test:
Turn on the calculator
Write 2
Press the plus sign
Write 4
Press equal
The display should show 6
AN AUTOMATIC TEST
8
TESTING — WHAT IS A TEST?
11. @drpicox
@drpicox
Feature:
The calculator adds two numbers
Acceptance Test:
Turn on the calculator
Write 2
Press the plus sign
Write 4
Press equal
The display should show 6
A MANUAL TEST
11
TESTING — WHAT IS A TEST?
13. @drpicox
@drpicox
TEST ANYTHING!
13
TESTING — WHAT TO TEST?
SERIOUS
BANKING
http://embed.plnkr.co/veOMnl
🃏
DO NOT
Do not waste time without millions of imaginary cases.
We cannot foresee all the possible kinds of bugs.
14. @drpicox
@drpicox
TEST SCENARIOS
14
TESTING — WHAT TO TEST?
Write short stories about your feature
Each story is like one theatre act
Describe the stage
Describe what happens
Describe how it ends
That reminds me something...
21. @drpicox
@drpicox
THE OTHER AXIS
21
TESTING — TYPES OF TEST — THE OTHER AXIS
Feature: Is it Friday yet?
Everybody wants to
know when it's Friday
Scenario: Sunday isn't Friday
Given today is Sunday
When I ask whether it's Friday yet
Then I should be told "Nope"
+legible
-legible legibility
DEVELOPER TEST ACCEPTANCE TEST
22. @drpicox
@drpicox
E2E
INTEGRATION
UNIT
THE TWO TEST AXIS
22
TESTING — TYPES OF TEST — THE OTHER AXIS
+legible
-legible
legibility
DEVELOPER TEST ACCEPTANCE TEST
UNIT TEST
E2E TEST
con
f
idence
-con
f
idence
+con
f
idence
INTEGRATED TEST
23. @drpicox
@drpicox
OBJECTIVE
23
TESTING — TYPES OF TEST — THE OTHER AXIS
+legible
-legible
legibility
DEVELOPER TEST ACCEPTANCE TEST
UNIT TEST
E2E TEST
con
f
idence
-con
f
idence
+con
f
idence
INTEGRATED TEST
Best compromise
Double Con
f
idence
It does what code says
Everyone on same page
The GOAL is
cover 100% of requirements
not cover 100% of code