views:

111

answers:

2

Is there something similar to mbUnit's RowTest in Visual studio tests. I wanted to have the ability to perform the same test using different input data and expected results.

Wanted to avoid using testing frameworks since I'm need very little and simple tests at the moment.

A: 

Wanted to avoid using testing frameworks since I'm need very little and simple tests at the moment.

...

I wanted to have the ability to perform the same test using different input data and expected results.

At this point, you're not really doing "very little and simple tests" any more. Get yourself a testing framework.

Anon.
A: 

You can apply a [DataSource] attribute to have the test run multiple times based on rows in the data source (which can be a database table, query, xml file, csv file).

There are details here:

http://msdn.microsoft.com/en-us/library/ms182527(VS.80).aspx

If you go to the Test List Editor and select one of your tests, then in the properties window select the Data Connection String property and then click the ... button, it opens a wizard which can set up the [DataSource] attribute for you.

Saxon Druce