|
|
YOUR FEEDBACK
|
TOP MICROSOFT .NET LINKS Tools
Automatic Integration with CruiseControl.NET, NAnt, and NUnit
How to implement the the concept of regression testing during implementation
By: Donald King
Nov. 12, 2005 05:15 PM
Digg This!
Page 2 of 2
« previous page
What Is a Successful Build? Following the tenets of Test Driven Development (TDD), we need to write our test first. It will go in the BaseRobotTest class and look something like this: When we compile the solution it fails because we have not yet implemented the MoveBackward() method. Our next step is to write code that will pass compilation: The last step is to write the code that will make the test pass: My code compiles fine, but when I was implementing the logic for my robot I made an error and my coordinates are incremented and decremented incorrectly. I also became careless and decided to check back in my code without determining if my test runs properly. The continuous integration server recognized the modification to source and started a new build. Of course it failed unit testing and promptly reported a broken build (see Figure 3). The continuous integration server has done its job! Since I received instant feedback I not only know I was the developer who broke the build, but I also know what changed and can more easily find the issue in order to correct it. Here is the new implementation that compiles and passes the unit testing: This time I ran the tests to ensure they passed before checking in my source files. Now when I check in the source, CruiseControl.NET reports a successful build! (Note: TDD is a very in-depth subject and this article cannot possibly do it justice. A great resource on the subject is the book Test Driven Development in Microsoft.NET by James W. Newkirk and Alexei A. Vorontsov, available from Microsoft Press.)
Summary Page 2 of 2 « previous page
MICROSOFT .NET LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING NEWS FROM THE WIRES
|
|||||||||||||||||||||||||||||||||||||||