Sunday, June 1, 2008

Test Driven Development

From: Desert Code Camp 2008
Speaker: Saul Mora (from Go Daddy)

Notes:

Read Pragmatic Unit Testing in C# with NUnit by Andy Hunt and David Thomas.

5 objectives in Test Driven Development:

Test what hasn't been tested.
Boundary Conditions
Inverse Relationships (objects that refer to each other)
Error conditions
Performance

Tools: For SQL Server - tsqlunit

The guys who created NUnit are apparently working on another project called Gallium (although I'm sure I've misspelled it because I can't find it in my searches) and they are also working for Microsoft. This note needs more info/editing.

Test Runners: TestDriven.net and Resharper UnitRun are both unit test runners.

Another book: Test Driven Development by Kent Beck

References: Agile Data

Project patterns is to have a DLL (in a project) with the tests with references to the unit test DLL(s), mock DLL(s) and the tested project and all tests live here.

The [Setup]/[Teardown] attribute on functions in the unit test get done one for all the tests in that class. Can just as easily use the class' constructor and destructor/dispose methods to achieve the same.

No comments:

Post a Comment