This project has moved and is read-only. For the latest updates, please go here.

Multiple data testing in mstest

Sep 24, 2012 at 12:52 PM

Hi I want to have ability to us in my unit tests ability to do it for all combinations of my input data

For example I have 5 colors, 3 shapes and 10 skins And want to perform my unit test for all combinations (with single result for each combintation)

Something like 

[TestMethod]

[DataSource(int[] Colors, int[] Shapes, int[] Skins)]

//or

[DataSource(<Connected to Colors.xls>)]

[DataSource(<Connected to Shapes.xls>)]

[DataSource(<Connected to Skins.xls>)]

public MyUnitTest(int color, int shape, int skin)

{

Test(color, shape, skin)

}