0

I am trying to run MSTest from command prompt and have added the folder that contains MSTest.exe in path variable. I have tried

MSTest /testcontainer: test.dll from the folder where test.dll reside

also tried giving full path

MSTest /testcontainer: C:\..\..\bin\Debug\test.dll but received

Invalid switch "test.dll" Invalid switch "c" respectively

I tried to run without adding MSTest.exe to path i.e. from the folder where MSTest.exe resides, but similar result. How do I make MSTest work from cmd? Is it missing something obvious?

Here is a similar question asked but my solution does not have any .testrunconfig file as stated there. Neither could I locate a file in my solution where applicationBaseDirectory is mentioned.

user1207289
  • 3,060
  • 6
  • 30
  • 66

1 Answers1

0

I am able to run test using vstest.console.exe instead of MSTest from command prompt from folder where Tests.dll is located. Mine is located at \bin\Debug in project folder.

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" Tests.dll

user1207289
  • 3,060
  • 6
  • 30
  • 66