How do you run unit tests and publish test results in a pipeline? Answer: You use the DotNetCoreCLI@2 task with test command and publish results. Example (YAML): - task: DotNetCoreCLI@2 inputs: command: 'test' projects: '**/*Tests.csproj' publishTestResults: true Azure Pipelines will then display test results (passed, failed, duration) in the build summary.
How do you run unit tests and publish test results in a pipeline?
Answer:
You use the DotNetCoreCLI@2 task with test command and publish results.
Example (YAML):
- task: DotNetCoreCLI@2
inputs:
command: 'test'
projects: '**/*Tests.csproj'
publishTestResults: true
Azure Pipelines will then display test results (passed, failed, duration) in the build summary.