Nevin Mathai
Nevin Mathai

Reputation: 2396

RowTest in Visual Studio tests?

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.

Upvotes: 3

Views: 698

Answers (1)

Saxon Druce
Saxon Druce

Reputation: 17624

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.

Upvotes: 3

Related Questions