【发布时间】:2017-10-11 17:52:31
【问题描述】:
我正在尝试使用 Teamcity 构建服务器构建运行单元测试。我得到了我的项目来构建,并且还安装了 NUnit。但是当我尝试运行单元测试时,出现以下错误。
Starting: D:\Ntapps\TeamCity\BuildAgent2\work\5abc171d155702d0\packages\NUnit.ConsoleRunner.3.6.0\tools\nunit3-console.exe D:\Ntapps\TeamCity\BuildAgent2\temp\buildTmp\dppSJMLyACKKGB7l1dAWbvFo9bLR6TcR.nunit --result=D:\Ntapps\TeamCity\BuildAgent2\temp\buildTmp\dppSJMLyACKKGB7l1dAWbvFo9bLR6TcR.nunit.xml --noheader
in directory: D:\Ntapps\TeamCity\BuildAgent2\work\5abc171d155702d0\AMDV\AMDV.App.IntegrationTests\bin\Debug
Runtime Environment
OS Version: Microsoft Windows NT 6.3.9600.0
CLR Version: 4.0.30319.42000
Test Files
D:\Ntapps\TeamCity\BuildAgent2\temp\buildTmp\dppSJMLyACKKGB7l1dAWbvFo9bLR6TcR.nunit
System.ArgumentException: Version string portion was too short or too long.
at System.Version.VersionResult.SetFailure(ParseFailureKind failure, String argument)
at System.Version.TryParseVersion(String version, VersionResult& result)
at System.Version.Parse(String input)
at System.Version..ctor(String version)
at NUnit.Engine.Services.RuntimeFrameworkService.ApplyImageData(TestPackage package)
at NUnit.Engine.Services.RuntimeFrameworkService.ApplyImageData(TestPackage package)
at NUnit.Engine.Services.RuntimeFrameworkService.ApplyImageData(TestPackage package)
at NUnit.Engine.Services.RuntimeFrameworkService.SelectRuntimeFramework(TestPackage package)
at NUnit.Engine.Runners.MasterTestRunner.InitializePackage()
at NUnit.Engine.TestEngine.GetRunner(TestPackage package)
at NUnit.ConsoleRunner.ConsoleRunner.RunTests(TestPackage package, TestFilter filter)
at NUnit.ConsoleRunner.Program.Main(String[] args)
Process exited with code -100
Publishing artifacts
Process exited with code -100
Step NUnit failed
我尝试在谷歌上搜索,但这没有帮助,而且我不知道在哪里找。
【问题讨论】:
-
这是 NUnit-Console 中的一个错误,但很可能是由 TC 传递给 NUnit 的一些奇怪的东西触发的。您能否按照此链接中的说明检索文件
dppSJMLyACKKGB7l1dAWbvFo9bLR6TcR.nunit- 并将其添加到您的问题中? confluence.jetbrains.com/display/TCD10/… -
您还需要指定您正在使用的 NUnit 的版本(包括框架和运行器)。说它是 TC 提供的,意味着与 NUnit 相关的任何人都无法真正回答您,因为我们不知道那个版本是什么——而且它也可能取决于 TC 版本。
-
@Charlie 我有以下版本: - 在 teamcity 上:NUnit.Console 版本 3.6.0 - 在项目中:Nunit 版本 3.8.1 我可能还需要安装其他东西吗?
-
测试程序集的目标是什么运行时?
-
我发现了问题,它在我的测试中