Ability to fail tests if minimum coverage not met
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- csharp
- 領域
- build-system, cli, testing-qa
調査の方向性
この issue では、カバレッジ拡張機能、コマンドラインオプション、MSBuild プロパティ、TestingPlatformCommandLineArguments が関連するエントリポイントとして挙げられています。まず、カバレッジ設定がどのように受け付けられ、ビルド結果がどのように報告されるかを追跡してください。コマンドラインおよびテストプロジェクト単位について、示されている形式で設定可能なしきい値を指定でき、カバレッジがその値を下回った場合にビルドが失敗すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Add the ability to fail the build if a minimum level of coverage is not achieved.
Background and Motivation
Playing around with an existing xunit v3 project to have it use Microsoft Testing Platform, and as part of that work to maintain code coverage I've needed to drop coverlet to instead use the coverage extension.
A missing feature by comparison compared to coverlet is the ability to fail the build if a minimum code threshold isn't met.
In coverlet this is achieved via an MSBuild property in one of two formats:
<!-- Fail if line, method or branch coverage is less than 70 -->
<Threshold>70</Threshold>
<!-- Fail if line, method or branch coverage is less than 70, 75 and 50 respectively -->
<Threshold>70,75,50</Threshold>
Proposed Feature
Add a new feature that can be controlled through the command-line, for example:
--coverage-threshold 75
This could then be customised on a per-test-project basis:
<TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --coverage-threshold 42</TestingPlatformCommandLineArguments>
Alternative Designs
None proposed.
- 主要言語
- C#
- スター
- 125
- フォーク
- 17
- 平均マージ
- 1時間 17分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/codecoverage のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
microsoft/codecoverage#246 · コメント 6 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
microsoft/codecoverage#237 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
microsoft/codecoverage#234 · コメント 1 件 · リアクション 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
microsoft/codecoverage#233 · リアクション 2 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
microsoft/codecoverage#232 · コメント 6 件 ·
microsoft/codecoverage の issue をすべて見る
似ている issue
-
type/automation type/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
t/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
ci-failure-cause test-failure
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area:auth FE mvp P3
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
klasolsson81/jobbliggaren#1788 ·