'Run Custom File Automatic Test In Azure Dev Ops

I have 6 unit test project but i wanna my pipeline just run some of this folder

for example

enter image description here

enter image description here

this yaml code run all tests but i dont want nop.data.tests ran in pipeline so can i just run all nop tests Except for nop.data



Solution 1:[1]

You can try to specify the patterns. See File matching patterns reference

For example :

- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\*test*.dll
      !**\nop.data.tests.dll
      !**\*TestAdapter.dll
      !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)'
    codeCoverageEnabled: true
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'
  continueOnError: true

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Andy Li-MSFT