Jenkins MSTestRunner plugin cannot start mstest.exe

I configured the Jenkins MSTestRunner plugin to use the following path to the MSTest executable: 'C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ Common7 \ IDE \ mstest.exe'. However, although this path is correct, assembly is not performed as follows:

cmd.exe /C "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\mstest.exe" "/resultsfile:/resultsfile testresults" /testcontainer:Project.Tests/bin/Debug/Project.Tests.dll && exit %%ERRORLEVEL%% 'C:\Program' is not recognized as an internal or external command, operable program or batch file. 

What is the problem, I thought it would be the usual way to configure the MSTestRunner plugin, since mstest.exe is installed under Visual Studio, which is usually installed again in the "C: \ Program Files (X86)" folder? How do I get around this?

+1
source share
2 answers

We received confirmation from the plugin author that MSTestRunner 0.2.0 does not handle spaces in the MSTest paths. I worked on this issue, instead creating the “Run Windows Batch Command” build step in Jenkins, which directly calls mstest.exe, where I surrounded the mstest.exe path with double quotes:

 "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe" /testcontainer:Project.Tests\bin\Debug\Project.Tests.dll /resultsfile:testresults.trx 
+4
source

It was established that my question was 2 times.

  • Writing files from a local dir workspace
  • You must configure mstest in the global tools, and then select this instance at build time.
+1
source

Source: https://habr.com/ru/post/979348/


All Articles