【发布时间】:2021-09-22 08:24:38
【问题描述】:
我目前正在为我的前端和 .Net CORE 开发 Angular 9。通过执行以下操作,我已经能够为后端项目实现差异覆盖:
在我的 azure-pipeline.yml 中
- task: DotNetCoreCLI@2
inputs:
command: test
projects: '**/*Tests/*.csproj'
arguments: '--configuration $(buildConfiguration) --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura'
displayName: 'Run backend endpoint tests'
然后我添加了 azurepipelines-coverage.yml 与以下内容:
coverage:
status: # Code coverage status will be posted to pull requests based on targets defined below.
comments: on # Off by default. When on, details about coverage for each file changed will be posted as a pull request comment.
diff: # Diff coverage is code coverage only for the lines changed in a pull request.
target: 60% # Set this to a desired percentage. Default is 70 percent
我想知道是否可以为我的 Angular 项目做同样的事情?我正在使用 jest 进行测试。
【问题讨论】:
标签: c# angular jestjs azure-pipelines test-coverage