简体   繁体   English

在Bamboo上执行nunit任务时出错(尝试从nuget包中运行它)

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

I got error running Bamboo plan with Nunit runner task: 我在使用NunitRunner任务运行Bamboo计划时出错:

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. 我使用Nunit3软件包,并且在我的本地PC上都可以正常工作。 Also I have local executable on agent with type Nunit runner and path: 我在代理上也有本地可执行文件,类型为NunitRunner和路径:

${bamboo.build.working.directory}\\src\\packages\\NUnit.ConsoleRunner.3.4.1\\tools\\nunit3-console.exe $ {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. Bamboo仍然不支持NUnit 3 ,请通过链接跟踪问题。

There is already a StackOverflow answer on how to get it working, How to run NUnit Runner in Atlassian Bamboo with NUnit 3 已经有关于如何使其工作的StackOverflow答案,如何使用NUnit 3在Atlassian Bamboo中运行NUnit Runner

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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