Note, we are able to successully build this Windows Phone 8 Project with Bamboo.
However, adding support for unit tests we get the following message: (We are at a loss as to what the problem actually is.)
java.lang.NullPointerException: Capability at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) at com.atlassian.bamboo.plugin.dotnet.tests.mstest.MSTestRunnerTaskType.execute(MSTestRunnerTaskType.java:84) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:181) 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)
We are able to run the tests successfully on the build machine from the command-line.
Try the solution here:
https://answers.atlassian.com/questions/11464815
...the trick is that the MSBuild Runner will append "MSTest.exe" to the path you provide in the Capability, so make sure you specify the path to mstest (with trailing backslash), but don't include MSTest.exe at the end.
So I found a work around solution where you manually call MSTest.exe and then parse the results.
1) Define custom server capability:
Capability Type: Executable Type: Command Label: MSTest Path: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe
2) Configure plan test job
3) Add Task > Script (*)
Inline Script Body: IF EXIST %1 DEL %1 Argument: ${bamboo.buildResultKey}-${bamboo.buildNumber}.trx
4) Add Task > Command
Executable: MSTest Argument: /testcontainer:[INSERT_YOUR_TEST.DLL] /resultsfile:${bamboo.buildResultKey}-${bamboo.buildNumber}.trx
5) Add Task > MSTest Parser
MSTest Test Results File/Directory: ${bamboo.buildResultKey}-${bamboo.buildNumber}.trx
* Tests will fail on re-run if the results file exists. This is optional but good defensive coding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are experiencing the same problem, is this work around the only way to fix this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
Hitting the same problem in VS 2012 trying to get the mstest runner task to work. I tried defining a capability:
MSTest.exe (Visual Studio) C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
Hitting the same problem in VS 2012 trying to get the mstest runner task to work. I tried defining a capability:
MSTest.exe (Visual Studio) C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are also experiencing this issue with unit tests for a MS project. Was there any update on this exception?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.