篇首语:本文由编程笔记#小编为大家整理,主要介绍了vsts xunit vstest.console.exe失败,返回码为:1相关的知识,希望对你有一定的参考价值。
仅在测试失败时,通过VSTS构建(私有托管代理)运行XUnit测试时出现问题:
2018-08-23T09:44:00.1110631Z ##[warning]Vstest failed with error. Check logs for failures. There might be failed tests.
2018-08-23T09:44:00.1111003Z ##[debug]Processed: ##vso[task.issue type=warning;]Vstest failed with error. Check logs for failures. There might be failed tests.
2018-08-23T09:44:00.1111532Z ##[debug]Agent.Version=2.138.6
2018-08-23T09:44:00.1111747Z ##[debug]Release.ReleaseUri=undefined
2018-08-23T09:44:00.1111982Z ##[debug]Release.ReleaseId=undefined
2018-08-23T09:44:00.1112201Z ##[debug]Build.BuildUri=vstfs:///Build/Build/3003
2018-08-23T09:44:00.1112402Z ##[debug]Build.Buildid=3003
2018-08-23T09:44:00.1112593Z ##[debug]Agent.Version=2.138.6
2018-08-23T09:44:00.1113027Z ##[debug]telemetry area: TestExecution feature: TestExecutionTask data: {"builduri":"vstfs:///Build/Build/3003","buildid":"3003","areacode":"ExecuteVsTest","result":"C:VSTSAgentsAgentJ\_work\_toolVsTest15.8.0x64 ools
et451Common7IDEExtensionsTestPlatformvstest.console.exe failed with return code: 1","tracepoint":1005,"isusererror":true}
2018-08-23T09:44:00.1379570Z ##[debug]Processed: ##vso[telemetry.publish area=TestExecution;feature=TestExecutionTask;]{"builduri":"vstfs:///Build/Build/3003","buildid":"3003","areacode":"ExecuteVsTest","result":"C:VSTSAgentsAgentJ\_work\_toolVsTest15.8.0x64 ools
et451Common7IDEExtensionsTestPlatformvstest.console.exe failed with return code: 1","tracepoint":1005,"isusererror":true}
2018-08-23T09:44:00.1386171Z ##[error]Error: C:VSTSAgentsAgentJ\_work\_toolVsTest15.8.0x64 ools
et451Common7IDEExtensionsTestPlatformvstest.console.exe failed with return code: 1
第一行是警告,告知有一个测试失败=>它没关系最后一行是一个错误,使任务停止构建链。
我不知道为什么会这样做以及如何避免这种行为。我希望能够在这一步之后继续我的构建链,我不认为检查“继续出错”是一个解决方案。
Task configuration :
- 类型:Visual Studio测试
- 使用以下选择测试:测试装配
- 测试平台版本:由工具安装程序安装(我有一个Visual Studio Test Platform安装程序任务)
- 隔离运行测试:检查
- 代码覆盖率已启用:已选中(但构建报告中未显示任何内容)
- 继续出错:未经检查