Have confgured both the "MSTest" and "VSTest.Console" executables under "Server Capabilities" and get the same result:
java.lang.IllegalArgumentException: mstest.exe cannot be found at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88) at com.atlassian.bamboo.plugin.dotnet.tests.mstest.MSTestRunnerTaskType.execute(MSTestRunnerTaskType.java:87) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:216) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:98) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:75) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:181) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:101) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:108) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:55) at java.lang.Thread.run(Unknown Source)
Have verified that the executables exist at their configured paths in "Server Capabilities", and that I can run the tests from a command prompt. Have also checked that the Bamboo service is running as a local user, not Local System.
I have found questions from many others having the same issue, and have not been able to find a suitable answer (having to resort to running scripts that call out to MSTest is not what i would consider an acceptable solution). Would really appreciate a proper solution to this issue, as it should be a straightforward process to set up, and one that I thought would be quite common for .NET developers.
Community moderators have prevented the ability to post new answers.
Hello Mark,
Thank you for your question.
MSTest.exe gets appended to the Path you include in the Server Capability created.
final File msTestExe = new File(capability.getValue(), "MSTest.exe"; Preconditions.checkArgument(msTestExe.exists(), msTestExe.getAbsolutePath() + " cannot be found"
Could you please update the capability from:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe
to:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
Hi,
I have the correct path as suggested in this post but I am still getting this error.
The code has been developed in Visual Studio 2017 but the executable available for MSTest task is Visual Studio 2013. Can this be a problem and would this lead to the same error?
Thanks,
Vijeta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, that worked, but for the benefit of others, I thought it worth mentioning a couple of other points:
Thanks again for your help in understanding how this works - it would be nice if the documentation was a little clearer on this, but at least I have a working solution now and hopefully others benefit from it too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.