Download - Convincing your PM to let you fix bugs
![Page 1: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/1.jpg)
Convincing your PMto let you fix bugs
Garret Fick
![Page 2: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/2.jpg)
19 April 2012
Discovered code I wrote caused customer crash
![Page 3: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/3.jpg)
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
![Page 4: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/4.jpg)
Objective
• Convince the value of integration tests• Share my best practices
• Not teach you how to write integration tests
![Page 5: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/5.jpg)
LACK OF CONFIDENCEWhere did it go?
![Page 6: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/6.jpg)
What you need to know
![Page 7: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/7.jpg)
What you need to know
Automated tests were failing
![Page 8: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/8.jpg)
What you need to know
A fix was found
![Page 9: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/9.jpg)
The fix was a one-line fix
![Page 10: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/10.jpg)
Fix not included in the release
![Page 11: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/11.jpg)
We were okay to exclude because…
• We didn’t know it would crash• We didn’t feel confident to fix
![Page 12: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/12.jpg)
NOTCONFIDENT?
IT IS YOURCODE!
![Page 13: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/13.jpg)
Testing and quality
Unit System
External quality
Confi
denc
e
Internal quality
![Page 14: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/14.jpg)
Unknown coveragegives a
confidence gap
Confidence gap
Unit Integration System
Exte
rnal
qua
lity
Confi
denc
e
Inte
rnal
qua
lity
![Page 15: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/15.jpg)
A confidence gap means…
Fix not included in the release
![Page 16: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/16.jpg)
Fixing the confidence gap may mean…
Fix included in the release
![Page 17: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/17.jpg)
USING INTEGRATION TESTSTo fill the confidence gap
![Page 18: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/18.jpg)
Integration tests…
• Small-ish modules of code• Black box tests• Cross boundaries• Probably use common utilities• May use mocks
![Page 19: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/19.jpg)
Benefits
Risks
• Increase confidence• Increase test coverage• Fast to write (leverage unit tests setup)• Accelerate development (no UI)
• Duplication• Maintainability
![Page 20: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/20.jpg)
LAST REMARKS
![Page 21: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/21.jpg)
19 April 2012
Don’t let it happen to you
![Page 22: Convincing your PM to let you fix bugs](https://reader034.vdocuments.us/reader034/viewer/2022052619/555d3d11d8b42ad8698b521c/html5/thumbnails/22.jpg)
Don’t be afraid - test
• Tests increase confidence– Unit for coverage– Integration for interactions– System for regressions