Test ID should be used when running MSTest.exe with /unique switch

The MSDN document MSTest.exe Command-Line Options describes the usage of MSTest. It has a /unique switch. If you follow the demo in the document to use /unique switch, you might get the error message “Test MethodTest1 is not unique. It maps to more than one test.”.

In Visual Studio, a test method has an ID. To get the test ID, you can

  1. Select a test in the Test View window.
  2. Press F4 to open the Property Window.
  3. Find the ID field in the Property Window.

For unit test, the test ID is made up of namespace.class.testmethod. For coded web test, the ID is made up of namespace.class. When MSTest.exe is run with /unique switch, test ID should be passed to /test switch. For example: MSTest  /testcontainer:TestProject1.dll /test:TestProject1.Class1Test.TestMethod1 /unique.

4 comments:

Anonymous April 12, 2009 at 8:24 PM

Helpful topic Thanks!

Anonymous September 28, 2010 at 11:28 AM

this is helpful. THanks

e cigarette November 23, 2010 at 8:03 PM

Thank you for posts.They are so helpful to me and I learn much from these posts.Love you site.keep on posting.Regards.

fdhty April 23, 2013 at 6:52 PM

I know someone in the world is waiting for me, although I've no idea of who he is. But I feel happy every day for this Buy Xbox Live Points, If a woman is not sexy, she needs emotion; if she is not emotional, she needs reason Cheap Minecraft Gift Code, in this world, only those men who really feel happy can give women happiness Ultimate Game Card.

When every love comes to the end, if you look back, u will find flowers and sorrows, but it's always beautiful 4story Luna, there is no rehearsal in the life, once missing, it will be lost forever 4story Gold, never frown, even when you are sad, because you never know who is falling in love with your smile 4story Luna.