Can not run a specific test using MSTest.exe, all tests from the same project run fine.
-
Tuesday, May 29, 2012 6:33 PM
have been running sucessfully all the unit tests from a project using below command.
c:\Users\mpuri\My Documents\Visual Studio 2010\Projects\Automation\Automation\bin\Debug>MSTest/testcontainer:Automation.dll
But having hard time to run specific test from the smae project, tried to execute the following way.
c:\Users\mpuri\My Documents\Visual Studio 2010\Projects\Automation\Automation\bin\Debug>MSTest/testcontainer:Automation.dll/test:testname
Please let me know in case i am missing something.
Thanks.
Manoj
- Edited by ManojPuri Tuesday, May 29, 2012 6:39 PM
All Replies
-
Thursday, May 31, 2012 4:21 AMModerator
Hi Manoj,
Thank you for posting in the MSDN forum.
Using /test:TestFilter to filter the tests to run. Note: this filter is applied to the full test method name (For example: FullNamespace.Classname.MethodName)
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
-
Thursday, May 31, 2012 1:37 PM
Jack thanks for the response, i tried with the filter you suggested. Still no luck.
c:\Users\mpuri\My Documents\Visual Studio 2010\Projects\QA-Automation\QA-Automat
ion\bin\Debug>MSTest/testcontainer:QA-Automation.dll/test:QA_Automation.Favorite.CreateMultiple.FavoriteMultipleCreate
Microsoft (R) Test Execution Command Line Tool Version 10.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
The given path's format is not supported.
For switch syntax, type "MSTest /help" -
Friday, June 01, 2012 2:12 AMModerator
Hi Manoj,
Glad to receive your reply.
Actually I try to repro this issue, it works well like the following screen shot.
To make sure that it is not related to your command line:
- Don’t forget the blank space before /Testcontainer and /test.
- You should check your full test method name, actually it is the “Top Level Tests” like the screen shot provided by me, so you could try to run all tests first like “ … Debug>MSTest/testcontainer:QA-Automation.dll”, then get the “Top Level Tests” for the specific test, then run it again.
Best Regards,
Jack Zhai [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by ManojPuri Friday, June 01, 2012 6:30 PM
-
Friday, June 01, 2012 6:34 PMThanks a lot, those two spaces made the difference.

