locked
mstest "no tests to execute" in cmd RRS feed

  • Question

  • Hello all

    I got some unit tests that runs fine within vs2013, but when i use cmd "mstest /testcontainer:unittest.dll", i got

    Loading Unittest.dll
    Starting execution...
    No tests to execute.

    no idea why it's doing that, googled a lot, none helped.

    has anyone run into this, please help.

    machine info

    Win8.1 enterprise 64-bit, VMware

    Microsoft Visual Studio Premium 2013
    Version 12.0.40629.00 Update 5
    Microsoft .NET Framework
    Version 4.5.51650

    Obvious Q&A

    Path to exe/dll is correct.

    I tried running as administrator

    Thursday, July 30, 2015 10:09 PM

Answers

  • Hi Tyran11,

    Please refer the following command to execute unit test using mstest.exe in command line check this issue.

    mstest.exe /testcontainer:"E:\UnitTestProject2\UnitTestProject2\bin\Debug\UnitTestProject1"

    For more information, please see:

    https://msdn.microsoft.com/en-us/library/ms182489.aspx?f=255&MSPPError=-2147217396

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Tina-Shi Thursday, August 6, 2015 11:47 AM
    • Marked as answer by Tina-Shi Friday, August 7, 2015 12:06 PM
    Friday, July 31, 2015 10:41 AM
  • Hi Tyran11,

    Thanks for your reply.

    >>why is "configure" necessary? 

    If you are refer to that why you need to configure and install test controller and test agent?

    I know that it is not necessary that you configure and install test controller and test agent to run unit test from command line.

    Since installing and configuring test controller and test agent are used to run unit test remotely.

    So please try to run your unit test using mstest.exe in command line as I pervious provided reply check this issue.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Tina-Shi Thursday, August 6, 2015 11:47 AM
    • Marked as answer by Tina-Shi Friday, August 7, 2015 12:06 PM
    Monday, August 3, 2015 3:24 AM

All replies

  • Try install and configure Test Agents and Test Controllers.

    https://msdn.microsoft.com/en-us/library/dd648127.aspx

    Friday, July 31, 2015 2:23 AM
  • Hi Tyran11,

    Please refer the following command to execute unit test using mstest.exe in command line check this issue.

    mstest.exe /testcontainer:"E:\UnitTestProject2\UnitTestProject2\bin\Debug\UnitTestProject1"

    For more information, please see:

    https://msdn.microsoft.com/en-us/library/ms182489.aspx?f=255&MSPPError=-2147217396

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Tina-Shi Thursday, August 6, 2015 11:47 AM
    • Marked as answer by Tina-Shi Friday, August 7, 2015 12:06 PM
    Friday, July 31, 2015 10:41 AM
  • why is "configure" necessary? 
    Friday, July 31, 2015 9:07 PM
  • Hi Tyran11,

    Thanks for your reply.

    >>why is "configure" necessary? 

    If you are refer to that why you need to configure and install test controller and test agent?

    I know that it is not necessary that you configure and install test controller and test agent to run unit test from command line.

    Since installing and configuring test controller and test agent are used to run unit test remotely.

    So please try to run your unit test using mstest.exe in command line as I pervious provided reply check this issue.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by Tina-Shi Thursday, August 6, 2015 11:47 AM
    • Marked as answer by Tina-Shi Friday, August 7, 2015 12:06 PM
    Monday, August 3, 2015 3:24 AM