Thursday, June 08, 2006

How to Setup nUnitAsp for Unit Testing

After months I finally set up my first working unit test using nUnitAsp. It is great because it has classes that mimic the ASP.net web controls.

I ran into a bug that was hard to reproduce. After a day or so of exploratory testing I reproduced it. I did not want to lose this knowledge to I decided to try to implement a testing suite to document it with a test. (See “Code the Unit Test First”)

After looking into and trying to implement several blends of unit testing frameworks, I chose, nUnitAsp which extends nUnit so that you can easily test web controls. I also installed TestDriven.net so I could more readily run tests from VS 2003.

This article was the guide that produced results for me, “Advanced Techniques with NUnitAsp” by Tim Stall. I only followed the simple example and then adapted it to reproducing my bug.

I downloaded nUnitAsp version 1.5.1. I ran the nUnit 2.2.0 installer included with it at \NUnitAsp-1.5.1\bin. I installed TestDriven.net-2.0.1605_Personal.

Now that I have coding the unit test first, I can fix the bug.

No comments: