2

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

**\$(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

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

任何想法?

4

1 回答 1

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
于 2019-04-26T03:15:13.600 回答