【发布时间】:2018-03-17 17:53:50
【问题描述】:
我对 CI 很陌生(至少从全新的设置点开始)。我在 Rider 中创建了一个项目,使用默认版本的 NUnit,如果您选择“创建新的 NUnit 项目”,我现在正在尝试使用 travis-CI 为其设置自动构建。
我的项目和测试项目的目标 .NET 框架版本(在 Rider 的项目属性中确认)是 4.5。
我使用的 Nunit 版本是 Rider 提供的默认版本,3.5。
这是我的 .travis.yml 构建文件:
language: csharp
solution: .sln
install:
- nuget restore FindWordsWithConcatenations.sln
- nuget install NUnit.Runners -Version 3.5.0 -OutputDirectory testrunner
script:
- xbuild /p:Configuration=Debug ./FindWordsWithConcatenations.sln
- mono ./testrunner/NUnit.ConsoleRunner.3.5.0/tools/nunit-agent.exe ./TestFindWordsWithConcatenations/bin/Debug/TestFindWordsWithConcatenations.dll
我通过运行 nuget 命令在我自己的机器上确认测试运行程序路径应该是正确的,当我运行 nunit-agent(通过代理、agent-x86 或 agent-console)时,我收到以下错误(本地,并在服务器上):
Unhandled Exception: System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
at System.Guid..ctor(String g)
at NUnit.Agent.NUnitTestAgent.Main(String[] args)
我也尝试过不指定配置模式,指定Debug和Release的配置模式运行。
不幸的是,谷歌搜索/堆栈溢出的正常策略没有帮助,我在几个问题中看到了这个错误,但原因似乎与我的经历无关。
The last build of the pipeline is available to view here,到目前为止所有的构建都失败了,之前的构建可以看到here。
在此先感谢,如果有人知道这个问题的原因,或者我可以如何以不同的方式解决测试运行,我将非常感激。
【问题讨论】:
标签: c# mono nunit travis-ci nunit-3.0