azure - 是否可以通过变量访问Azure Pipelines中任务中的测试执行结果?

标签 azure azure-devops yaml azure-pipelines pipeline

我正在 Azure Pipelines 中运行下面的任务,我需要访问由于在另一个任务中运行此任务而导致的测试通过和失败的百分比。

这可以做到吗?我可以通过变量访问这个结果吗?

- task: DotNetCoreCLI@2
  displayName: Execute Tests
  inputs:
    command: 'test'
    projects: '**\BaseProject.dll'
    workingDirectory: '$(System.DefaultWorkingDirectory)'

请问有人可以帮助我吗?谢谢。

最佳答案

我发现解决这个问题的方法是在测试项目结构中添加生成包含我需要的信息的 xml。使用生成的 xml,我可以通过 Powershell 任务访问它,然后根据需要保存变量。

关于azure - 是否可以通过变量访问Azure Pipelines中任务中的测试执行结果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73795157/

相关文章:

Powershell 脚本完成但退出并显示错误代码 1

azure-devops - 从 azure pipeline.yml 将变量组参数传递到模板时出现问题

google-app-engine - AppEngine : Reading values/settings from app. yaml

asp.net - 将 Orchard 与现有 Azure 项目集成

powershell - Azure DevOps发布管道-在括号内使用Powershell和管道变量

azure-devops - 如何从 Azure Devops 运行 .Net Core 2.1、编译的 MsTest 单元测试程序集?

go - 如何获取OpenAPI服务器值

c# - 小 Sprite 宇宙 : How to copy a property value of edge as vertex property inside a repeat command

python - 无法通过 Azure Databricks 中的 PyPi 安装 python 包

c# - Azure cspkg上传速度