Where is mstest.exe located?

I need to run mstest from the command line - where in the world is this exe located? Can someone give me a hint?

Edit: I only have Visual Studio 2010 installed

+49
testing mstest
Mar 03 '10 at 22:25
source share
9 answers
for %x in (mstest.exe) do @echo.%~dp$PATH:x 

from the command line, Visual Studio is your friend. For me it's in

 C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\ 
+75
Mar 03 '10 at 22:29
source share

Type of

 where mstest.exe 

at the command line of Visual Studio ...

+28
Feb 10 '12 at 10:16
source share

I stumbled upon this post because I am trying to automate some web tests.

You can run> mstest / TestContainer: some.webtest from the visual studio command line, of course, but if you click this in a batch file, then the default command line does not have visual studio tools.

You can search for mstest.exe, but this location may not be the same on the machine, so it is unreasonable for hard code in c: \

Rani Miller replied that God sent me (thanks!) - he offered %VS90COMNTOOLS%\..\IDE\MSTest.exe

But this will not work if you have VS 2010. Just replace 90 with 100. My batch file, which I can schedule as a task for nightly launch, looks like this:

 SET SOURCEe=c:\myTestProjectFolder\ CD %SOURCE% "%VS100COMNTOOLS%..\IDE\mstest.exe" /TestContainer:some.webtest 
+9
Oct 14 '10 at 23:53
source share

Since Visual Studio 2012 (at least the express version) MsTest.exe is called vstest.console.exe and can be found in

C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ Common7 \ IDE \ CommonExtensions \ Microsoft \ TestWindow \ vstest.console.exe

+6
Nov 14 '13 at 20:59
source share

If you cannot find it, try searching as follows:

 %VS90COMNTOOLS%\..\IDE\MSTest.exe 
+5
Mar 03 '10 at 22:29
source share

My automated test scripts use:

 "%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" 

The full command I use is:

 "%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /testcontainer:[PathToTestDll] /resultsfile:[TrxOutputPath] 
+2
Mar 03 '10 at 22:30
source share
 "%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE 
+1
Mar 03 '10 at 22:29
source share

If you run a visual studio command command before running your scripts, which should be done in most situations, you can run% VSINSTALLDIR \ Common7 \ IDE \ mstest - this means that you can move with the version of VS, and you don’t have to react to director changes, if users install them in a different directory.

+1
Mar 04 '10 at 17:38
source share

C: \ Program Files \ Microsoft Visual Studio 9.0 \ Common7 \ IDE

If people knew that Windows could search for files ...

You can simply open the Visual Studio command prompt to include this directory in PATH. Take a look at the entry in the "Visual Studio 2008 Command Prompt" menu.

0
Mar 03 '10 at 22:29
source share



All Articles