0
我想用TeamCity構建服務器來構建一個運行單元測試。我讓我的項目建立,並且還安裝了NUnit。但是當我嘗試運行單元測試時,出現以下錯誤。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
我試着用谷歌搜索這個,但這並沒有幫助,我不知道在哪裏看。
I followed this tutorial to setup.
這是NUnit控制檯中的一個錯誤,但可能由TC傳入NUnit的奇怪事件觸發。你能否按照這個鏈接的指示檢索文件'dppSJMLyACKKGB7l1dAWbvFo9bLR6TcR.nunit'並將它添加到你的問題中? https://confluence.jetbrains.com/display/TCD10/Getting+Started+with+NUnit#GettingStartedwithNUnit-DebuggingNUnittests – Chris
您還需要指定您正在使用的NUnit版本(包括框架和runner)。說TC是由TC提供的,意味着沒有任何與NUnit相關的人可以真正回答你,因爲我們不知道該版本是什麼 - 它也可能取決於TC版本。 – Charlie
@Charlie我有以下版本: - 關於teamcity:NUnit.Console版本3.6.0 - 在項目中:Nunit版本3.8.1 我還需要安裝別的東西嗎? – kevingoos