Azure Devops 'Publish Test Results' 应该有测试的输出 url
Azure Devops 'Publish Test Results' should have an output for the test url
对于 Azure DevOps 'Publish Test Results' pipeline,当任务是 运行 时,我得到如下输出:
2022-02-01T18:40:55.7299825Z ##[section]Starting: Publish Test Results **/e2eResults.xml
2022-02-01T18:40:55.7308111Z ==============================================================================
2022-02-01T18:40:55.7308433Z Task : Publish Test Results
2022-02-01T18:40:55.7308846Z Description : Publish test results to Azure Pipelines
2022-02-01T18:40:55.7309270Z Version : 2.198.0
2022-02-01T18:40:55.7309681Z Author : Microsoft Corporation
2022-02-01T18:40:55.7310042Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-test-results
2022-02-01T18:40:55.7310427Z ==============================================================================
2022-02-01T18:40:57.2361642Z [command]/usr/bin/dotnet --version
2022-02-01T18:40:57.2362016Z 5.0.404
2022-02-01T18:40:58.9100220Z Result Attachments will be stored in LogStore
2022-02-01T18:40:58.9582047Z Run Attachments will be stored in LogStore
2022-02-01T18:40:59.0471397Z ##[section]Async Command Start: Publish test results
2022-02-01T18:40:59.3342360Z Publishing test results to test run '1024564'.
2022-02-01T18:40:59.3377826Z TestResults To Publish 2, Test run id:1024564
2022-02-01T18:40:59.3419843Z Test results publishing 2, remaining: 0. Test run id: 1024564
2022-02-01T18:41:00.2260832Z Published Test Run : https://<test run URL here>
2022-02-01T18:41:00.7854816Z ##[section]Async Command End: Publish test results
2022-02-01T18:41:00.7857495Z ##[section]Finishing: Publish Test Results **/e2eResults.xml
如果测试 运行 url 可以由任务输出,那将非常有帮助,所以我可以在之后添加一些 bash/powershell 任务来发送电子邮件或 PR 评论说 'hey, here are the results of your test run'。是否已经有办法做到这一点,或者这是我必须请求的功能?
您可以向 azure-pipelines-tasks 存储库中的好人发送拉取请求,或者您可以添加一个任务以从上一个任务下载日志并从那里解析出 url。
我在一个非常相似但不重复的问题中提供了执行此操作的代码:
对于 Azure DevOps 'Publish Test Results' pipeline,当任务是 运行 时,我得到如下输出:
2022-02-01T18:40:55.7299825Z ##[section]Starting: Publish Test Results **/e2eResults.xml
2022-02-01T18:40:55.7308111Z ==============================================================================
2022-02-01T18:40:55.7308433Z Task : Publish Test Results
2022-02-01T18:40:55.7308846Z Description : Publish test results to Azure Pipelines
2022-02-01T18:40:55.7309270Z Version : 2.198.0
2022-02-01T18:40:55.7309681Z Author : Microsoft Corporation
2022-02-01T18:40:55.7310042Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-test-results
2022-02-01T18:40:55.7310427Z ==============================================================================
2022-02-01T18:40:57.2361642Z [command]/usr/bin/dotnet --version
2022-02-01T18:40:57.2362016Z 5.0.404
2022-02-01T18:40:58.9100220Z Result Attachments will be stored in LogStore
2022-02-01T18:40:58.9582047Z Run Attachments will be stored in LogStore
2022-02-01T18:40:59.0471397Z ##[section]Async Command Start: Publish test results
2022-02-01T18:40:59.3342360Z Publishing test results to test run '1024564'.
2022-02-01T18:40:59.3377826Z TestResults To Publish 2, Test run id:1024564
2022-02-01T18:40:59.3419843Z Test results publishing 2, remaining: 0. Test run id: 1024564
2022-02-01T18:41:00.2260832Z Published Test Run : https://<test run URL here>
2022-02-01T18:41:00.7854816Z ##[section]Async Command End: Publish test results
2022-02-01T18:41:00.7857495Z ##[section]Finishing: Publish Test Results **/e2eResults.xml
如果测试 运行 url 可以由任务输出,那将非常有帮助,所以我可以在之后添加一些 bash/powershell 任务来发送电子邮件或 PR 评论说 'hey, here are the results of your test run'。是否已经有办法做到这一点,或者这是我必须请求的功能?
您可以向 azure-pipelines-tasks 存储库中的好人发送拉取请求,或者您可以添加一个任务以从上一个任务下载日志并从那里解析出 url。
我在一个非常相似但不重复的问题中提供了执行此操作的代码: