CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Darrell Norton's Blog [MVP]

Fill in description here...

.NET Test Driven Development

Test Driven Development  |  Refactoring

Test Driven Development
Books

Lessons Learned in Software Testing by Cem Kaner, James Bach, and Bret Pettichord.
Pragmatic Unit Testing in C# by the Pragmatic Programmers Andy Hunt and Dave Thomas, the preview chapters (one, two) look good.
Managing the Testing Process by Rex Black – highly recommended by John Robbins.
Test Driven Development: A Practical Guide by Dave Astels, we've got this at work and it is very good although the examples are in Java.
Test Driven Development: By Example by Kent Beck.  My comment: can we please move away from the stupid money example.
Test-Driven Development in Microsoft® .NET by James Newkirk, a developer on the NUnit project. Awesome book. (get all the code from the TDD workspace on GotDotNet)

Software

csUnit - open source testing framework
NUnit - open source testing framework
mbUnit - open source testing framework - lots of interesting features!
ZaneBug - unit testing which includes interesting enhancements for performance metrics, etc.

.TEST - commercial automated unit testing software
HarnessIt - commercial testing framework
Unite.NET - commercial unit and integration test software
X-Unity - commercial testing framework

NUnitAddin - Visual Studio add-in, currently has command-line interface (I hear Jamie Cansdale is working on a GUI with red/green bars)
NUnitASP - test web sites by interacting programmatically with the controls on the web page.  Now supports authentication as well as several other new features!  Also see my NUnitAsp Tips and Best Practices.
NUnitForms - allows you to test Windows Forms in a manner similar to NUnitAsp (you get to interact with the form elements programmatically). It even includes a recorder application!
RUnit - runs NUnit test harnesses in ASP.NET.
TestRunner for NUnit - an NUnit add-in for Visual Studio .NET.  See blog post.
VSNUnit - an NUnit add-in for Visual Studio .NET.  See blog post.

Mock Objects

DotNetMock
EasyMock.NET
MockObjects
NMock
POCMock

Web sites / columns

Applying Patterns to Software Testing - Brian Marick
Bret Pettichord's Publications on testing
Brian Marick's writings on software testing
Cem Kaner's articles on testing
James Bach's articles
ObjectMentor's Test Driven Development articles
TestDriven.com web site, general purpose portal that includes various languages, testing tools, and articles.
testingReflections - a hub for Software Testing knowledge and information

Test Driven Development Column Dave Astels
Test Driven Development Yahoo! group
Pages on the c2 wiki:

Blogs

Antony Marcano has a software testing focused blog.
Benjamin Mitchell has an excellent XP and Agile category including lots of TDD
Brian Marick's blog is all about testing
James Newkirk, lead developer on NUnit and now Microsoft employee, has an excellent TDD blog.
Jamie Cansdale, creator of the TestDriven.NET addin for Visual Studio, has a blog.
Jay Kimble has a TDD category
Jens Winter has a TDD category
Jonathan Cogley has a TDD category
Jonathan de Halleux - the creator of mbUnit
Roy Osherove has a Test Driven category
Siva Rama Krishna has a blog devoted to software testing
Steve Eichert has a TDD category
See my Test Driven Development category

Unit Testing articles

Adventures in C#: Using NUnit - Ron Jeffries
Advanced Unit Testing: Parts 1, 2, 3, 4, 5 - Marc Clifton
An Initial Investigation of Test Driven Development in Industry - Laurie Williams and Boby George
Best Practices: Test Driven Development
Charles' Six Rules of Unit Testing - Charles Miller
Contractual Test Driven Development: Combining Test Driven Development and Design By Contract - Dave Chaplin
csUnit Tutorials - a group of related tutorials on csUnit, including one on how to port from NUnit
Developing Automated Tests using NUnit2 with VB.NET - Dave Chaplin
Effective Unit Testing - Tim Burns
Endo-Testing: Unit Testing with Mock Objects - Tim Mackinnon, Steve Freeman, Philip Craig
Debugging .NET with NUnit - Paul Kimmel
Fun with Unit Tests-Testing Abstract Classes - Roy Osherove
Interview: XP Pioneer Stumps for Test-Driven Development - Jon Udell on InfoWorld
Introduction to Test-driven Development with NUnit and the NUnit Add-in - Roy Osherove
An Introduction to Test-Driven Development (TDD) – code examples are in C# and Delphi using csUnit.

An Introduction to Test-Driven Development (TDD) using Visual Basic.net – code examples in VB.NET using csUnit. NUnitAsp articleMelwyn D'Souza and Sarvesh Damle
NUnit V.2 For People Who Can't Cook - Markus Kalina, not the latest version of NUnit
Perform Code Coverage Analysis with .NET to Ensure Thorough Application Testing - James McCaffrey
Putting Test Driven Development into Practice - Jimmy Nilsson
TDD with NUnit and C# - PowerPoint presentation by Jonathan Cogley
Test Driven Analysis and Design - Jason Gorman
Test Before You Leap Into Development - Jon Udell on InfoWorld
Test-Driven C# : Improve the Design and Flexibility of Your Project with Extreme Programming Techniques - Will Stott and James W. Newkirk
Test Driven Development - ObjectMentor's write-up on TDD
Test Driven Development - Scott Ambler, chap 11 of his Agile Database Techniques book
Test Driven Development and Acceptance Testing - James Grenning
Test-Driven Development, A Conversation with Martin Fowler, Part V - Bill Venners on Artima.com
Test Driven Development and Web Services - Peter Provost, uses NUnit
Test Driven Development in .NET - Peter Provost, uses NUnit
Test Driven Development in Enterprise Integration Projects - Gregor Hohpe and Wendy Istvanick
Test Driven Development using NUnit - Jason Gorman
Test First Guidelines - Sean Shubin
Testing ASP.NET Applications with NUnitASP and NUnit - Justin Gehtland
Testing for Programmers - Brian Marick, very very good!
Unit Testing and Test-First Development - on MSDN
Unit Testing Database Code - Richard Dallaway
Unit Testing in .NET - Charlie Poole, 79 PowerPoint slides
Unit Testing in .NET - Justin Gehtland
When Do You Stop Unit Testing? - Gordon Weakliem
Work Guidelines: Test Driven Development
Working backwards - James Newkirk, Robert C. Martin
Write Unit Tests - Nick Smith in Visual Studio Magazine
Writing Automated Browser Tests using NUnit and IE - Dave Chaplin
 

Refactoring
Books

Refactoring: Improving the Design of Existing Code by Martin Fowler – excellent
Refactoring Workbook by William Wake – very good
Refactoring to Patterns by Joshua Kerievesky – forthcoming book, see the web site

Software

C# Refactoring Tool – $110 for 1-9 licenses, $99 for 10 or more
C# Refactory – $99 first license, $50 each additional, 30 for $549
dotEasy – currently free
FlyWheel – $449
Resharper – use a username and password of eapuser, pricing not set
Visual Studio – will include refactoring in the Whidbey release, due in 2005

Web Sites

Agile .NET Development – Refactoring - by Jason Gorman, C# tutorial on refactoring
Fowler Refactoring Example - by Dave Veeneman, a C# translation of the 'Starting Point' example in Chapter 1 of Fowler's Refactoring book
Refactoring Home page – a portal on refactoring maintained by Martin Fowler
Refactoring Yahoo! group
Refactoring with Martin Fowler – Artima interview by Bill Venners
The Process of Database Refactoring – by Scott Ambler
Refactoring Refactoring – article by Robert X. Cringely that questions refactoring
Pages on the c2 wiki:

 

Have I missed anything?  If so, leave me a link in the comments and I'll update this page on a regular basis.  Also, I will start to leave comments on the article to give you more of an idea of what the article contains (to add value, you know).  If you want to add a brief synopsis, just leave it in the comments.



Comments

TrackBack said:

Darrell Norten has organized a good resource set for Unit Testing, Test
Driven Development and Refactoring....
# March 3, 2005 2:30 PM

Sarika said:

Hi Darrell,

This is indeed a nice collection of information about TDD. I enjoyed the discussion about organising the Test project for NUnit.

I have a question for you. I am organizing my testing project so that the solution has 2 projects, the project to be tested and the project that has the tests.

The project that I need to test is a VB 6.0 project that I am migrating to VB.NET. It has some modules in it. I was wondering how I could test the functions in the modules, with the set-up that I have. The way I am doing it now, the functions in the modules are not being recognized in my testing project, although I have added a reference to the project. I think this is because the module is visible only in the namespace in which it was declared.

Thanks in advance.

Sarika
# March 4, 2005 2:10 PM

Darrell said:

Sarika - this is not going to be a good answer, but you could wrap the VB6 executable in .NET using COM Interop. That way you could test the external interface from .NET and use those tests to test your new .NET code.
# March 9, 2005 5:50 AM

Sarika said:

Hmm...I do not quite understand that. But here is what I did. I know it is not a very good solution, but it works and I thought it was okay for a start.

I added the module to be tested to my NUnitTest project. Now the Test class that tests this module sees what it needs to. The only problem is that I need to make sure that the changes made to the local module's code are copied to my original module code.

What do you think?
# March 9, 2005 8:51 AM

Darrell said:

Sarika - I see what you are saying now. If it is a namespace issue, change the default namespace in your test project and change the namespace for the test classes to match that of the modules, and see if that works.
# March 9, 2005 9:43 AM

Sarika said:

This is going to be a lengthy post Darrell. Please bear with me.

I did as you told, but it did not work. Let me explain in detail what I did and maybe you will spot my blunder.

My VS.NET solution contains 2 projects: the code project and the project created to test this code. Both are VB.NET projects. Now when I tried to create a class to test a module in the code project, I got errors saying "method name" not declared. Hence I thought it was a namespace issue and so my earlier posts.

Anyways, as per your suggestion, I defined the code module within a Namespace declaration say Namespace A. Now obviously I got access errors in my code project since they did not know of this namespace. To fix that I added a Imports CodeProjectName.A statement wherever I was using the module functions. After doing this typing CodeProjectName.A. would pop the list of the Public vars/methods in this module.

Then I compiled my code project, renamed the EXE to a DLL. Changed the default namespace of the test project to CodeProjectName. Also tried changing this to CodeProjectName.A Added a ref to this DLL in my test project. Then in the test class for the module I added the appropriate Imports statement. However the functions in the module are still not being recognised. Infact typing CodeProjectName.A. does not pop up the box w/ Items from the module.

Have I missed something here?

I also tried adding the reference of this Namespace in my project wide imports for the Test Project. Edited the project file to add a reference to this namespace.

Yet no Luck!

Many thanks for your help.
# March 10, 2005 12:22 PM

Darrell said:

If your code project produces an EXE, you cannot reference it using Visual Studio. This is a Visual Studio limitation. If you want to continue to use Visual Studio, move the code you want to test into a DLL (library project) and then add a Winforms or Console app (the EXE project) that makes a call to your code project. You'll end up with 3 projects:

1. EXE - a launcher app that only calls the code project
2. Code - the modules you want to test
3. Test - the tests for #2.

Hope this helps.
# March 14, 2005 7:56 AM

TrackBack said:

Darrell Norten has organized a good resource set for Unit Testing, Test Driven Development and Refactoring. Go check it out here....
# March 17, 2005 10:36 PM

Darrell Norton's Blog [MVP] said:

Last time we left off at the XP practices. In the second edition, Kent Beck doubles the original 12 practices...
# May 2, 2005 7:41 AM

Darrell Norton's Blog [MVP] said:

When doing Test-Driven Development with NUnit, you can add an application config file by adding a file...
# May 13, 2005 8:42 AM

Raymond Lewallen said:

This is a list of resources (websites and books mostly) that I have read/do read/participate in on the...
# June 9, 2005 7:16 PM

Fire in the Hole said:

Over the last year at work, my development team has had a lot of success in implementing new tools. ...
# June 28, 2005 9:08 PM

Raymond Lewallen said:

This is a short list of resources (websites and books mostly) that I
have
read/do read/participate...
# October 25, 2005 11:48 PM

Luca Tarrini said:

# March 23, 2006 10:46 AM

mm53bar said:

# March 28, 2006 12:38 AM

mm53bar said:

# March 28, 2006 12:45 AM

Fire In The Hole said:

# March 28, 2006 1:15 AM

mattonsoftware.com said:

The following links to .NET resources have been collated over time with the assistance of colleagues. ...
# May 6, 2006 4:37 AM

thefactoryfactory said:

# July 26, 2006 1:20 PM

buy tramadol said:

news

# March 29, 2007 12:56 AM
Check out Devlicio.us!