.net - 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:\\VSTSAgents\\AgentJ\\_work\\_tool\\VsTest\\15.8.0\\x64\\tools\\net451\\Common7\\IDE\\Extensions\\TestPlatform\\vstest.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:\\VSTSAgents\\AgentJ\\_work\\_tool\\VsTest\\15.8.0\\x64\\tools\\net451\\Common7\\IDE\\Extensions\\TestPlatform\\vstest.console.exe failed with return code: 1","tracepoint":1005,"isusererror":true}
2018-08-23T09:44:00.1386171Z ##[error]Error: C:\VSTSAgents\AgentJ\_work\_tool\VsTest\15.8.0\x64\tools\net451\Common7\IDE\Extensions\TestPlatform\vstest.console.exe failed with return code: 1
第一行是一个警告,告诉有一个测试失败 => 没关系 最后一行是一个错误,使任务停止构建链。
我不知道它为什么这样做以及如何避免这种行为。我希望能够在这一步之后继续我的构建链,我不认为检查“继续出错”是一个解决方案。
任务配置:
- 类型:Visual Studio 测试
- 使用以下方法选择测试:测试程序集
- 测试平台版本:由工具安装程序安装(我有一个 Visual Studio 测试平台安装程序任务)
- 单独运行测试:检查
- 启用代码覆盖率:选中(但构建报告中没有出现任何内容)
- 继续出错:未选中
解决方案
推荐阅读
- python - 了解 matplotlib set_bad 颜色图
- reactjs - 对象不支持 IE 11 上的属性或方法“包含”
- php - CORS 预检请求被拒绝
- python - 如何将 xml 动态转换为 csv
- javascript - 我有一组索引和品种,我想列出可能的排列
- wix - Wix 工具集 - 如何使用二进制文件
- detect - iOS14 - CMMotionActivityManager startActivityUpdatesToQueue 不工作
- node.js - Async callback was not invoked jest/supertest - simple endpoint
- r - 在 R 中的内核上循环的 SVM 回归错误
- java - Is Java thread a daemon 'if and only if' the creating thread is a daemon?