【问题标题】:Can test-results in azure-devops pipelines be filtered by TestCategory?azure-devops 管道中的测试结果可以被 TestCategory 过滤吗?
【发布时间】:2020-01-24 17:54:07
【问题描述】:

我有一个在 Azure Devops 上运行的管道,它为 C# 解决方案构建和运行测试。我们将 MsTest 用于测试运行程序,并使用 TestCategory 属性对不同的测试进行分类。例如,我们可能有:

[TestClass]
[TestCategory("UnitTests")]
[TestCategory("SomeFeature"]
public class SomeTestsForSomeFeatureTests
{
    Some test-code...
}

[TestClass]
[TestCategory("IntegrationTests")]
[TestCategory("SomeFeature"]
public class SomeIntegrationTestsForSomeFeatureTests
{
    Some test-code...
}

有没有办法按 TestCategory 对 Azure Devops Pipelines 中的测试结果进行分组?

可以按 Test Run、Test File、Priorty、Owner 或 None 对测试结果进行分组,但我还没有找到按 TestCategory 分组的方法。

我知道可以设置管道以通过 TestCategory 运行测试,但这不是我所追求的。相反,我希望能够在我的解决方案中获得一部分测试结果。理想情况下,我希望能够链接到我选择的 TestCategory 中的测试结果。

【问题讨论】:

    标签: azure-devops azure-pipelines


    【解决方案1】:

    目前似乎不支持在测试结果 UI 中按测试类别分组。你可以去developer community 推荐一个功能。

    您也可以尝试为此开发自定义扩展。你可以查看here获取关于如何创建扩展的官方文档。

    【讨论】:

      猜你喜欢
      • 2020-06-09
      • 2020-03-11
      • 2019-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多