Be a legacy code Unit Test Ninja with Typemock Isolator

5,382 views

Published on

Roy Osherove teaches how to use Typemock Isolator to write unit tests for legacy code that cannot be changed.
23-11-2010

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
5,382
On SlideShare
0
From Embeds
0
Number of Embeds
3,649
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Be a legacy code Unit Test Ninja with Typemock Isolator

  1. 1. 1 Roy Osherove CTO, Typemock Unit Testing Legacy Code With Isolator @RoyOsherove
  2. 2. 2 Twitter : Ask @Typemock under #Legacy Asking Questions
  3. 3. 3 Answer Survey Giveaways: 2 Isolator Licenses
  4. 4. Our Application BlogEngine.NET  Download the code  Follow Along http://blogengine.codeplex.com/
  5. 5. What shall we test? Blog Post Manager PingTrackback.Send(..) PingTrackback Servers
  6. 6. Legacy Code Ahead  Lots of Dependencies  Unknown Beforehand  Many Rules Don’t Apply  Tests are longer, and harder to read  Better to start with integration tests 7
  7. 7. Demo Excavating Code with Isolator  Wishful Invocation  Get dependency exception  Choose Dependency from stack  FAKE dependency
  8. 8. Summary  Approach Legacy With Caution  Choose the right level of isolation  Use Broad Strokes when Faking Legacy  Maintainability  Readability  See tests fail and pass  trust 9
  9. 9. More Advice  Typemock Forums  http://forums.typemock.com/  Support staff  Blog.typemock.com 10
  10. 10. VS Versions • Supports vs 2005-2010 • Supports .NET 2.0 – 4.0 Fakes • Any Legacy Code • IntelliTest Suggestions 3rd party • Works with other profilers • Extensible IntelliTest • Extensible CThru
  11. 11. 12 Easy, Correct & Effective Unit Testing “Typemock - My testing tool of choice. Each time I use it, I rediscover its power, and I'm amazed. Great tool!” Jason C Divis, @CodingOfficer
  12. 12. 13 Twitter : Ask @Typemock Asking Questions
  13. 13. 14 Answer All Survey Questions after this webinar finished Giveaways: 2 Isolator Licenses
  14. 14. Thanks 15 Roy Osherove CTO, Typemock royo@typemock.com

×