Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net vsts xunit vstest.console.exe失败,返回代码:1_.net_Asp.net Web Api_Frameworks_Azure Devops_Xunit - Fatal编程技术网

.net vsts xunit vstest.console.exe失败,返回代码:1

.net vsts xunit vstest.console.exe失败,返回代码:1,.net,asp.net-web-api,frameworks,azure-devops,xunit,.net,Asp.net Web Api,Frameworks,Azure Devops,Xunit,我在通过VSTS build(私有托管代理)运行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;]Vst

我在通过VSTS build(私有托管代理)运行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测试
  • 使用以下选项选择测试:测试程序集
  • 测试平台版本:由工具安装程序安装(我有一个VisualStudio测试平台安装程序任务)
  • 隔离运行测试:选中
  • 已启用代码覆盖率:已选中(但生成报告中未显示任何内容)
  • 错误时继续:未选中
如果您不想选中VsTest任务中的“出错时继续”选项,请在下一个任务的控制选项选项卡中选择“即使上一个任务失败,除非已取消生成”选项,如下屏幕截图所示。