【问题标题】:Equivalent to TeamCity service messages in Azure DevOps (for custom test results)等效于 Azure DevOps 中的 TeamCity 服务消息(用于自定义测试结果)
【发布时间】:2020-10-01 15:19:06
【问题描述】:
【问题讨论】:
标签:
build
azure-devops
automated-tests
teamcity
【解决方案1】:
同意 JamesD 的观点,即 Azure Devops 中的 Logging Commands 等同于 TeamCity 中的 Service Messages。
但目前Logging Commands 不支持“报告测试”操作,这会有所不同。在 Azure Devops 中可以考虑将测试相关的信息记录到 TEXT 文件(CMD、Out-File 或 PS 的回显)或其他格式文件中,然后使用Upload log 或Upload summary 命令显示测试相关信息。
例如:
Write-Host "##vso[task.uploadsummary]filepath"
Write-Host "##vso[task.addattachment type=Distributedtask.Core.Summary;name=TestSummary;]$(System.DefaultWorkingDirectory)\filepath"