java.lang.IllegalArgumentException : mstest.exe cannot be found
MSTest 2012 can not be used as an executable. The build fails with the following exception:
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:188) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:94) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:87) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:206) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:111) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52) at java.lang.Thread.run(Unknown Source)
Make sure that Bamboo is running as "Administrator" and not as "SYSTEM". Also, double check the path and other settings following the guidelines in this document: MSTest Runner.
Based on our research and checking through the source for the Bamboo .net plugin, it appears that the MSTest unlike other executables like the NUnit Runner and the MSBuild, can not be set as a capability. The MsTest capability is derived from the Visual Studio IDE itself. There is an option to use the MSBUILD outside of the Visual studio or if possible use Nunit Runner if an option. (Workaround ex. : Defining an msbuild target and running the mstest using a msbuild task.)
In case it's running on an agent, you need to create the file bamboo-capabilities.properties file in the <bamboo-agent-home>/bin directory and populate the file with the following:
system.builder.devenv.Visual+Studio+2012=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
The remote agent should be restarted for the capability to be picked up. Please replace the PATH as appropriate.