1
Roy Osherove
CTO, Typemock
Unit Testing
Legacy Code
With
Isolator
@RoyOsherove
2
Twitter : Ask @Typemock
under #Legacy
Asking Questions
3
Answer Survey
Giveaways:
2 Isolator Licenses
Our Application
BlogEngine.NET
 Download the code
 Follow Along
http://blogengine.codeplex.com/
What shall we test?
Blog Post Manager PingTrackback.Send(..)
PingTrackback
Servers
Legacy Code Ahead
 Lots of Dependencies
 Unknown Beforehand
 Many Rules Don’t Apply
 Tests are longer, and
harder to r...
Demo
Excavating Code with Isolator
 Wishful Invocation
 Get dependency exception
 Choose Dependency from stack
 FAKE d...
Summary
 Approach Legacy With Caution
 Choose the right level of isolation
 Use Broad Strokes when Faking Legacy
 Main...
More Advice
 Typemock Forums
 http://forums.typemock.com/
 Support staff
 Blog.typemock.com
10
VS Versions
• Supports vs
2005-2010
• Supports .NET
2.0 – 4.0
Fakes
• Any Legacy
Code
• IntelliTest
Suggestions
3rd party
...
12
Easy, Correct & Effective Unit Testing
“Typemock - My testing tool of choice. Each time I use it, I
rediscover its powe...
13
Twitter : Ask @Typemock
Asking Questions
14
Answer All Survey Questions
after this webinar finished
Giveaways:
2 Isolator Licenses
Thanks
15
Roy Osherove
CTO, Typemock
royo@typemock.com
Upcoming SlideShare
Loading in …5
×

Be a legacy code Unit Test Ninja with Typemock Isolator

5,263 views
5,187 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,263
On SlideShare
0
From Embeds
0
Number of Embeds
3,640
Actions
Shares
0
Downloads
8
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

×