I wonder if it may be that your forward slashes in the file name are confusing MSTest. Have you tried "\" instead of "/"?
On Tue, Jun 13, 2017 at 6:10 PM Meet vadaria <[email protected]> wrote: > HI, > I am trying to use MSTest plugin to do unit test on .Net project. My build > is failing when i added MSTest build step. I am getting an error as below: > *Error:* > >> [PricingAPI_Test] $ "C:\Program Files (x86)\Microsoft Visual Studio >> 14.0\Common7\IDE\MSTest.exe" /resultsfile:testResults.trx >> /testcontainer:D:/a-slave/workspace/PricingAPI_Test/PricingAPI/PricingAPI.Tests.dll >> %1 is not a valid Win32 application >> FATAL: MSTest command execution failed >> java.io.IOException: Cannot run program "C:\Program Files (x86)\Microsoft >> Visual Studio 14.0\Common7\IDE\MSTest.exe" (in directory >> "D:\a-slave\workspace\PricingAPI_Test"): CreateProcess error=193, %1 is not >> a valid Win32 application >> at java.lang.ProcessBuilder.start(Unknown Source) >> at hudson.Proc$LocalProc.<init>(Proc.java:245) >> at hudson.Proc$LocalProc.<init>(Proc.java:214) >> at hudson.Launcher$LocalLauncher.launch(Launcher.java:850) >> at hudson.Launcher$ProcStarter.start(Launcher.java:384) >> at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1195) >> at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1160) >> at hudson.remoting.UserRequest.perform(UserRequest.java:153) >> at hudson.remoting.UserRequest.perform(UserRequest.java:50) >> at hudson.remoting.Request$2.run(Request.java:336) >> at >> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) >> at java.util.concurrent.FutureTask.run(Unknown Source) >> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) >> at hudson.remoting.Engine$1$1.run(Engine.java:94) >> at java.lang.Thread.run(Unknown Source) >> at ......remote call to JNLP4-connect connection from >> 10.250.4.225/10.250.4.225:1741(Native Method) >> at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545) >> at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) >> at hudson.remoting.Channel.call(Channel.java:830) >> at hudson.Launcher$RemoteLauncher.launch(Launcher.java:959) >> at hudson.Launcher$ProcStarter.start(Launcher.java:384) >> at hudson.Launcher$ProcStarter.join(Launcher.java:395) >> at org.jenkinsci.plugins.MsTestBuilder.perform(MsTestBuilder.java:244) >> at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) >> at >> hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) >> at hudson.model.Build$BuildExecution.build(Build.java:206) >> at hudson.model.Build$BuildExecution.doRun(Build.java:163) >> at >> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) >> at hudson.model.Run.execute(Run.java:1735) >> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) >> at hudson.model.ResourceController.execute(ResourceController.java:97) >> at hudson.model.Executor.run(Executor.java:405) >> Caused by: java.io.IOException: CreateProcess error=193, %1 is not a >> valid Win32 application >> at java.lang.ProcessImpl.create(Native Method) >> at java.lang.ProcessImpl.<init>(Unknown Source) >> at java.lang.ProcessImpl.start(Unknown Source) >> at java.lang.ProcessBuilder.start(Unknown Source) >> at hudson.Proc$LocalProc.<init>(Proc.java:245) >> at hudson.Proc$LocalProc.<init>(Proc.java:214) >> at hudson.Launcher$LocalLauncher.launch(Launcher.java:850) >> at hudson.Launcher$ProcStarter.start(Launcher.java:384) >> at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1195) >> at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1160) >> at hudson.remoting.UserRequest.perform(UserRequest.java:153) >> at hudson.remoting.UserRequest.perform(UserRequest.java:50) >> at hudson.remoting.Request$2.run(Request.java:336) >> at >> hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) >> at java.util.concurrent.FutureTask.run(Unknown Source) >> at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) >> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) >> at hudson.remoting.Engine$1$1.run(Engine.java:94) >> at java.lang.Thread.run(Unknown Source) >> Build step 'Run unit tests with MSTest' marked build as failure >> Finished: FAILURE > > > -------------------- > > can someone please help me to understand this error and how to resolve this. > I tried many things, I couldn't find any solution. When i looked online, it's > saying because of space in the service path, it's giving error "*error=193, > %1 is not a valid Win32 application*" but i don't find any solution. can > someone please explain how to use MSTest with Jenkins > > > Thanks, > > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/09f0847a-5326-4615-840e-fd3ef75d0d34%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/09f0847a-5326-4615-840e-fd3ef75d0d34%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF3DKAZk%2BGp3yj_E0hY4G62xhfH7cbtsPNf6wcy_1nC6A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
