Have you ever bumped into a wall with your automated tests? Many developers bump into various roadblocks and hurdles when writing test code. Are your test methods starting to fail because the code-under-test uses the current date and time? Are your automated integration tests failing because the database they integrate with keeps changing? Do you have an explosion of test methods, with the ratio of test code to code-under-test way too high? Is your effort to refactor and improve code overwhelmed by the time it takes to rewrite all those failing unit tests? This presentation is about clearing away Agile testing obstacles, avoiding common pitfalls, and staying away from dangerous practices.
16. Principles
1. Unit Test
Developer Tests
“Intention Checking”
Excella Consulting
17. Principles
2. Automate
• Always running
• Can't be bargained with
• Can't be reasoned with
• Tests don't feel pity or
remorse or fear
• Absolutely will not stop,
ever, until you deliver a
quality software product.
Excella Consulting
18. Principles
2. Automate
• CI Server
• Per Commit
• Overnight Functional
• Smoke Testing
• Stability Testing
• Performance/Load
• Automate Deployments
• Project “Dashboard”
Excella Consulting
19. Principles
3. Zero Configuration*
I can run your tests,
You can run mine.
* One-time configuration is okay
Excella Consulting
20. Principles
4. Fast
All tests run
time efficiently
Excella Consulting
39. In Test Code, Do Repeat Yourself ... Do Repeat Yourself
Test Code Is Different
• Avoid Inheritance Reuse
• Use “Context” Helpers
• Repetition Is Better Than
Coupling
Excella Consulting