Hanselminutes Podcast 169 - The Art of Unit Testing with Roy Osherove
My one-hundred-and-sixty-ninth podcast is up. In this show recorded in Norway, Roy Osherove educates Scott on best practices in Unit Testing techniques and the Art of Unit Testing.
Also, be sure to check out Roy's talk at the recent Norwegian Developer's Conference, they're quite excellent and worth your time.
Roy's Publisher has given Hanselminutes listeners a code until August 1st, 2009 for 37% off. The code is "hansel37" and it's good at http://www.manning.com and takes the price to US$25.19. Oddly in other ironic news, the book is (tonight at least) $26.39 on Amazon. Go figure.
Links from the Show
- Roy Osherove on Twitter
- The Art of Unit Testing Website
- The Art of Unit Testing (Amazon Link)
- Roy's Blog
- TypeMock
- Download: MP3 Full Show #169
- Play in your browser
Do also remember the complete archives are always up and they havePDF Transcripts, a little known feature that show up a few weeks after each show.
Telerik is a sponsor for this show!
Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET and Windows Forms. Enjoy the versatility of our new-generation Reporting Tool. Dive into our online community. Visit www.telerik.com.
As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)
Enjoy. Who knows what'll happen in the next show?
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
I like to think that the tests establish my contract for the thing I'm testing. If there's a test there, it's because some other code probably depends on the functionality working that way. If there's no test, it's because there's no guarantee about how the functionality will work (that behavior is "implementation dependent"). Over-specifying your conditions can make it harder to refactor your code later, which can lead to test maintenance nightmares. On the flipside, the presence of a test is a sign that people who are refactoring should tread lightly. It's OK to change the behavior, but they need to realize that their changes will have ramifications to other code.
Sometimes, negative test cases are very important. If you're writing a validator, you would want to know that it rejects bad input. You would also want to know that it accepts good input, so you're likely to have a large family of tests.
Also, I sometimes like to start with a simple test case, and sometimes the negative cases are easiest. To me, it feels like a progression from easy-to-understand (and easy-to-write) to more complicated and more corner-case-y.
Net result:
Book + eBook from Manning = ~$30
book from Amazon = ~$25
Roy
Too bad it's so short, Scott I bet you could talk to Roy about TDD for hours.
However I learned that Roy has some great opinions about the topic and he's not too religious at the same time.
@RoyOsherove: I definitely gotta buy your book!
I tried finding the webcasts you referred to of Roy examining the unit tests of various projects, but to no avail. There doesn't seem to be any reference to them on Roy's blog and they're not linked in the show notes.
Are they publicly available?
Nick
all the test reviews are available here
http://www.osherove.com/videos/category/test-review
Comments are closed.
This tool if it exists will sure be of use to folks like me who can read faster than go thru podcasts and prefer reading transcripts...
Thanks!