2. 19 April 2012
Discovered code I wrote caused customer crash
3. This isn’t about timeline
??/??/2011 Many tests failing
??/??/2011 Crash introduced, many tests still failing
29/12/2011 “Testing-only bug” fixed
12/02/2012 Product released with crash
19/04/2012 WinQual (crash reports) show bug
29/09/2012 Included in service pack
4. Objective
• Convince the value of integration tests
• Share my best practices
• Not teach you how to write integration
tests
18. Integration tests…
• Small-ish modules of code
• Black box tests
• Cross boundaries
• Probably use common utilities
• May use mocks
19. Benefits
• Increase confidence
• Increase test coverage
• Fast to write (leverage unit tests setup)
• Accelerate development (no UI)
Risks
• Duplication
• Maintainability
22. Don’t be afraid - test
• Tests increase confidence
– Unit for coverage
– Integration for interactions
– System for regressions
Editor's Notes
19 April, 2012. The truth was revealed. Code that I wrote caused customer crash.
Disbelief -> How could I understand, write, modify and test code, and still crash? How slip through months of testing?
Investigation -> Fix
You’ve see that talk before.
We fixed a bug that “only happened in our auto-test system”
We fixed a bug that “only happened in our auto-test system”
We fixed a bug that “only happened in our auto-test system”
You need something that tells you a bit about the external quality and a bit about the internal quality
Because you are limited in what you can test with end-to-end testing
From Growing object-oriented software, guided by tests
You need something that tells you a bit about the external quality and a bit about the internal quality
Because you are limited in what you can test with end-to-end testing
From Growing object-oriented software, guided by tests
We fixed a bug that “only happened in our auto-test system”
We fixed a bug that “only happened in our auto-test system”