简体   繁体   中英

Error with nunit task on bamboo (try to run it from nuget packages)

I got error running Bamboo plan with Nunit runner task:

29-Sep-2016 19:44:43    ------ Build started: Project: Swd.Core, Configuration: Release Any CPU ------
29-Sep-2016 19:44:43      Swd.Core -> C:\Bamboo_home\xml-data\build-dir\CUT-ST3-ST\bin\Swd.Core.dll
29-Sep-2016 19:44:43    ------ Build started: Project: CutwiseSeleniumTests (CutwiseSeleniumTests\CutwiseSeleniumTests), Configuration: Release Any CPU ------
29-Sep-2016 19:44:44      CutwiseSeleniumTests -> C:\Bamboo_home\xml-data\build-dir\CUT-ST3-ST\bin\cutwiseSeleniumTests.dll
29-Sep-2016 19:44:44    ========== Build: 2 succeeded or up-to-date, 0 failed, 0 skipped ==========
29-Sep-2016 19:44:44    Error occurred while running Task 'nunit(6)' of type com.atlassian.bamboo.plugin.dotnet:nunitRunner.
29-Sep-2016 19:44:44    java.lang.NullPointerException: Capability
29-Sep-2016 19:44:44            at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.plugin.dotnet.tests.nunit.NUnitRunnerTaskType.execute(NUnitRunnerTaskType.java:87)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$120(TaskExecutorImpl.java:269)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:202)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:269)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:108)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:74)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:214)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:139)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:130)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:129)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:136)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
29-Sep-2016 19:44:44            at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
29-Sep-2016 19:44:44            at java.lang.Thread.run(Thread.java:745)

I use Nunit3 packages and it all works fine on my local PC. Also I have local executable on agent with type Nunit runner and path:

${bamboo.build.working.directory}\\src\\packages\\NUnit.ConsoleRunner.3.4.1\\tools\\nunit3-console.exe

I've checked the agent and located the file on disk, so I have no other ideas how to solve the problem.

Bamboo still doesn't support NUnit 3 , follow the link to the issue tracking it.

There is already a StackOverflow answer on how to get it working, How to run NUnit Runner in Atlassian Bamboo with NUnit 3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM