【问题标题】:Why test assemblies are not filtering in VSTS azure build pipeline despite putting test assembly patterns?尽管放置了测试程序集模式,为什么测试程序集没有在 VSTS azure 构建管道中过滤?
【发布时间】:2019-04-23 15:12:26
【问题描述】:

这是我的测试组装模式(配置)

**\$(BuildConfiguration)\*test*.dll
!**\obj\**  
!**\$(BuildConfiguration)\*Integration*

触发构建后,这里是集成测试程序集的日志(这个文件必须过滤,应该在这里)

2019-04-23T13:10:33.6689787Z C:\VSTSAgent\A1\_work\1\s\myapp\myapp.Services.Test\bin\Release\myapp.Services.Test.dll
2019-04-23T13:10:33.6690018Z C:\VSTSAgent\A1\_work\1\s\myapp\myapp.Services.Integration.Test\bin\Release\myapp.Services.Integration.Test.dll

因为这个集成测试用例也在运行,我只想运行单元测试用例。

有什么想法吗?

【问题讨论】:

    标签: unit-testing build azure-devops azure-pipelines vstest.console.exe


    【解决方案1】:

    我找到了解决方案,这是我的最新配置,现在完全可以正常工作。

    **\$(BuildConfiguration)\*test*.dll
    !**\obj\**
    !**\myapp\*Integration*\**  
    !**\*Microsoft.Owin.Testing.dll*
    !**\$(BuildConfiguration)\*Integration.Test*.dll
    !**\$(BuildConfiguration)\*Microsoft.VisualStudio.TestPlatform*
    !**\$(BuildConfiguration)\*MSTest*    
    !**\$(BuildConfiguration)\*Microsoft.Owin.Testing.dll*
    !**\$(BuildConfiguration)\*Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll*
    

    如果您注意到包含此模式的排除路径的行;

    !**\myapp\*Integration*\**
    

    及以下模式匹配,不会包含在结果中。

    2019-04-23T13:10:33.6690018Z C:\VSTSAgent\A1\_work\1\s\myapp\myapp.Services.Integration.Test\bin\Release\myapp.Services.Integration.Test.dll
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-09-06
      • 1970-01-01
      • 2018-05-19
      • 1970-01-01
      • 2023-03-31
      • 1970-01-01
      • 2020-10-19
      相关资源
      最近更新 更多