测试执行完成后,结果不会在Azure管道中发布

在Azure云中创建管道版本后触发测试自动化。测试执行完成后,无法以天蓝色看到测试结果。将错误日志视为TestResult.xml与“ NUnit”测试结果格式不匹配。

技术堆栈:C#,NUnit,Selenium,Azure

2019-11-11T07:48:53.6045046Z ##[section]Starting: UI: Publish Test Results **\*.xml
2019-11-11T07:48:53.6045046Z ==============================================================================
2019-11-11T07:48:53.6045046Z Task         : Publish Test Results
2019-11-11T07:48:53.6045046Z Description  : Publish test results to Azure Pipelines
2019-11-11T07:48:53.6045046Z Version      : 2.158.0
2019-11-11T07:48:53.6045046Z Author       : microsoft Corporation
2019-11-11T07:48:53.6045046Z Help         : [Learn more about this task](https://go.microsoft.com/fwlink/?LinkID=613742)
2019-11-11T07:48:53.6045046Z ==============================================================================
2019-11-11T07:48:54.3203486Z [command]"C:\Program Files\dotnet\dotnet.exe" --version
2019-11-11T07:48:54.4922262Z 2.2.108
2019-11-11T07:48:54.4922262Z [command]C:\Vsts\Agent-1\_work\_tasks\PublishTestResults_0b0f01ed-7dde-43ff-9cbb-e48954daf9b1\2.158.0\modules\TestResultsPublisher.exe @C:\Vsts\Agent-1\_work\_temp\b5ad22b0-0457-11ea-9e79-9db0871d9ecd.txt
2019-11-11T07:49:36.6438230Z ##[warning]Invalid results file. Make sure the result format of the file 'C:\TestAutomation\QA\TestResult.xml' matches 'NUnit' test results format.
2019-11-11T07:49:36.6438230Z ##[section]Async Command Start: Publish test results
2019-11-11T07:49:36.6438230Z ##[section]Async Command End: Publish test results
2019-11-11T07:49:36.6438230Z ##[section]Finishing: UI: Publish Test Results **\*.xml
conqueror_nannan 回答:测试执行完成后,结果不会在Azure管道中发布

不知道您是否正在使用nunit @ 3。这是nunit @ 3的已知问题。 VSTS当前不支持NUnit3格式。

您可以将其投票并跟踪here

当前,您可以尝试使用Nunit-v2-reslut-writer的变通办法,或者按照以上未解决的问题中的建议添加Powershell任务来运行转换脚本。

本文链接:https://www.f2er.com/3116314.html

大家都在问