Search code examples
c#.netvisual-studiocommand-linemstest

No tests to execute msTest


I'm trying to run .NET unit tests on the command line using MSTest

My command is

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe" /testcontainer:"full path of dll" /resultsfile:TestResults.trx

When run it returns

Starting execution...
No tests to execute.

The unit test runs perfectly fine in VS 2012 IDE.

What do I need to do to get it running on the cmd line please?


Solution

  • Try this:

    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MSTest.exe" /testcontainer:full path of dll /resultsfile:TestResults.trx
    

    Ie without the " " around your path to the dll