Test-Driven Development in Microsoft .NET (Microsoft Professional) 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
About the Author
James W. Newkirk, coauthor of Enterprise Solution Patterns in .NET and Extreme Programming in Practice, led the development of NUnit 2.0. He’s currently the development lead for the Microsoft Platform Architecture Guidance team, which provides guidance and reusable assets to enterprise customers through the Patterns & Practices reference series.
Alexei A. Vorontsov has been developing software in a variety of environments—from scientific and mathematical applications to enterprise systems—for more than eight years. He specializes in developing, testing, and managing large distributed software solutions—applying agile development methods for more pragmatic, cost-efficient results.
- Publisher : Microsoft Press; 1st edition (April 14, 2004)
- Language : English
- Paperback : 304 pages
- ISBN-10 : 0735619484
- ISBN-13 : 978-0735619487
- Item Weight : 2.2 pounds
- Dimensions : 7.38 x 1 x 9 inches
- Best Sellers Rank: #3,967,792 in Books (See Top 100 in Books)
- Customer Reviews:
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
This book does try to cover virgin territory with testing apps that use databases and web interfaces - but it really falls apart at the Web GUI interface level (not to be confused with the Web services interface level, which the book covers well). The techniques recommended in the book essentially try to simulate a web GUI interface with nUnit versus actually using an existing web GUI interface. With one Web form, maybe this isn't too much duplication, but with a large Web app, this is just silly - plus it never tests the actual Web client, so the test results are obviously incomplete. The authors neglect how easy it is to truly test a Web GUI interface - with java based tools (JWebUnit & HttpUnit) which build on top of xUnit, and which work fine on any web app (including asp.net) dot net programmers will need a little understanding of java syntax to use these tools, but java and c# and so nearly identical syntactically for the subset needed, that this is not much of an issue. I hope native ports of these tools to the dot net world are coming soon, but you can live without them and still test Web GUIs easily enough with a little java knowledge, and the authors are remiss in neglecting this.
Plus the blurb on Amazon about the book promised a Windows Form based example - and this is NOT in the book at all!
The book is split into two parts; Part I is an overview of Test-Driven Development, and Part II covers using TDD to develop an example application.
Chapter 1 frames the entire discussion with an overview of Test-Driven Development concepts, including some straightforward guidelines for design. I thought it was laid out in very logical fashion.
Chapter 2 throws you right into the process it's a classic stack example, found in many other TDD books. What I liked most about it though, was that the chapter began with discussing HOW you start figuring out WHAT tests to write as you develop an application.
Chapter 3 covers another critical concept of TDD Refactoring. (What's Refactoring? You askread chapter 3 ;) ). Again, the authors walk you through a short yet concise primer using the Sieve of Eratosthenes implemented in C#. They introduce the algorithm and then discuss it in light of code refactoring techniques as implemented originally in Martin Fowler's Refactoring: Improving the Design of Existing Code.
Chapter 4 is the introduction of the example application that will be the focus of the remainder of the book. It lays out the scenario, project features and constraints of the fictitious project.
Chapter 5 covers an area that I've found generates a ton of interest when developers start thinking about TDD, namely data access. I really appreciated the practical approach that the authors took when writing the implementation chapters for the example application. I found the tests surrounding entities and relationships and the resulting explanations to be very good.
Chapter 6 covers how you create tests when implementing Web Services. In the process, the service interface pattern is discussed along with refactoring Web Services. The authors attempt to lead you through a "thought framework" for creating tests through each of the implementation chapters.
Chapters 7, 8, and 9 make a shift from programmer testing to customer testing and cover differing aspects of customer or acceptance testing. This group of chapters starts with an overview of acceptance testing and techniques. The middle chapter deals with driving development up through the implemented layers from a user or customer perspective. Chapter 9 rounds out the discussion by focusing on handling faults and how acceptance testing allows you to tighten things up.
Chapter 10 leads us back to the programmer testing side by dealing with transactions. Following this, Chapter 11 introduces the reader to Service-level refactoring, leading you through the thought process behind different techniques. The story winds down in Chapter 12 with applying the process of TDD to implementing a web client.
All in all, while I'd have like to have seen a both a simpler example and always more "real world" tips and tricks, I can tell you from my own experience that finding that balance is extremely difficult. I believe the authors have made a significant attempt at striking the "real world" / simplicity balance and that the resulting outcome is an excellent resource for learning TDD. When that is combined with the level of effort the authors are putting in to maintaining the code and forums at their GotDotNet workspace, this makes Test-Driven Development in Microsoft .NET an excellent choice for your library.
This procedure helps to insure that problems are found early and corrected while they are still small.
This book first discusses TDD from a conceptual point of view then gives a TDD example using a realistic application.
Top reviews from other countries
I would also recommend Roy Osherove's "The Art of Unit Testing", his web site with video examples, and "Working Effectively with Legacy Code" by Michael Feathers.