NUnit multiple TestFixture equivalent for MsTest

In NUnit we can run a test-fixture multiple times with varying parameters simply by specifying multiple [TestFixture] attributes, each one causing the class to be instantiated with the specified attribute parameter.

Here is an example:

public class MyTestClass
    public MyTestClass(string str)

So the fixture would be instantiated 3 times: with str="A", then str="B" and finally str="C".

I'm trying to find the equivalent for the Visual Studio testing tools but the [TestClass] attribute can be specified only once.

I've read the doc but found no clue.

I can think of a simple workaround by using inheritance but I'm sure there is a simpler way.


There is no real equivalent. Closest I think is the Data Driven unit test.

Need Your Help

OnUpdateMenuUI in C#?

c# menu

Is there any mechanism where I can get update notification when users try to open an menu item, like in MFC.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.