Похоже, что я должен указать файлы runsettings, а config включить и исключить в конвейере, проблемы будут решены.
<Configuration>
<CodeCoverage>
<!-- Match assembly file paths: -->
<ModulePaths>
<Include>
<ModulePath>.*FunctionApp*.dll</ModulePath>
<!--<ModulePath>.*\.exe$</ModulePath>-->
</Include>
<Exclude>
<ModulePath>.*AutoGenerated.dll</ModulePath>
<ModulePath>.*Tests.dll</ModulePath>
</Exclude>
</ModulePaths>
<!-- We recommend you do not change the following values: -->
<UseVerifiableInstrumentation>True</UseVerifiableInstrumentation>
<AllowLowIntegrityProcesses>True</AllowLowIntegrityProcesses>
<CollectFromChildProcesses>True</CollectFromChildProcesses>
<CollectAspDotNet>False</CollectAspDotNet>
</CodeCoverage>
</Configuration>
, а в конвейере указать настройки
steps:
- task: VSTest@2
displayName: 'VsTest - testAssemblies'
inputs:
runSettingsFile: src/...../CodeCoverage.runsettings