View
229
Download
0
Category
Tags:
Preview:
DESCRIPTION
Now that you have decided to integrate testing into your development process, you find that when one test breaks, it seems like they all break. You also find that with so many tests broken, identifying the source of failed tests is challenging. Another challenge is that occasionally, tests are just plain hard to write. In this session we will discuss patterns and techniques for writing tests that are more robust and provide better information. This includes techniques that you can apply to your design when writing new code to make testing easier, as well as tools for working with existing applications that do not have good test coverage.
Citation preview
TEST DRIVEN IS DRIVING ME INSANE!
Practical Test Patterns
Who?
Dennis BurtonSRT SolutionsDevelopUsing.net || DennisBurton.com@dburton
Feedback:http://speakerrate.com/dennisburtonhttp://speakerrate.com/events/131-codestock
The Primer
All 10 of my tests rock
Code changes seem to take longer
Long running tests
Tests take longer to set up
Test are fragile
Tests depend on specific (often production) data
Position Statement - Uncle Bob Martin
…it has become my position that TDD is a necessary discipline for professional developers. I consider it rather like sterile procedure for doctors. It's simply what you have to do to write professional code. (At least it's what I have to do.)
-ButUncleBob.com
What am I missing?
But, I already have some legacy code not under test
References
xUnit Test Patterns Working Effectivelywith
Legacy Code
Dummy – An object is required that shouldn’t be
Spy – Add the validation an object should have had
Stub – The state of an object is important to the test
Mock – behavior is what is really under test
Use Rhino or Moq Don’t tolerate test pain
Questions
Dennis BurtonSRT SolutionsDevelopUsing.net || DennisBurton.com@dburtonFeedback:http://speakerrate.com/dennisburtonhttp://speakerrate.com/events/131-codestock
Recommended