ステートメントカバレッジ (Statement Coverage) - CI/CD用語集の定義
ステートメントカバレッジは、テストスイート中に実行されたソース statement の数を報告します。
ステートメントカバレッジ (Statement Coverage) は、テスト中に実行されたコード内の個々の statement の割合です。ラインカバレッジと密接に関連していますが、物理的な行ではなく statement を数えます。
1 行に複数の statement が含まれる場合、ステートメントカバレッジはラインカバレッジと異なることがあります。ほとんどの reporter はそれらをほぼ等価として扱います。
CI での扱い
ステートメントカバレッジは基本的な指標です。どの条件や経路が実行されたかは考慮しないため、branch を含むコードでは完全さを過大評価します。
関連ガイド
Line Coverage - CI/CD Glossary DefinitionLine Coverage: Line coverage is the fraction of executable source lines that ran at least once during the tes…
Function Coverage - CI/CD Glossary DefinitionFunction Coverage: Function coverage is the percentage of defined functions or methods that were called at le…
Test Coverage - CI/CD Glossary DefinitionTest Coverage: Test coverage is the percentage of your code (lines, branches, or functions) that is executed…