<< back to blog

Plug data into your NUnit tests

software ~ squilbo

24 May, 2008

Today I found a cool feature in NUnit 2.5 Alpha 2 that I’ve been REALLY wanting. Basically, I wanted to be able to run tests multiple times, but with different data each time. This is now possible using the DataSource attribute.

In the case of Squilbo (a database query tool), each test is run once for each database engine the product supports. This is great, I only write the tests once and then run them against each database engine to make sure the features work universally. When I add support for Oracle, I can change one line of code and the tests will be run 3 times.

Image of Squilbo Unit Tests

You may also like...
Man makes nice software. Sells it. Makes $100,000 in 5 months
TODO.txt 2008 Ultimate Team Edition
Pretty Simple Software
Loose Coupling: Quote de jour
Cheap as Chips private Git hosting
Putting Git in the cloud with Amazon S3
Friendliest console installer EVER!
What Open Source stack do the gurus use?
Nice use of Google maps in registration
Generate State Machine diagrams from your POCO Entities

kick it on DotNetKicks.com
blog comments powered by Disqus