ラインカバレッジ (Line Coverage) - CI/CD用語集の定義
ラインカバレッジは、テスト中に実行されたソース行の数を、実行可能な行の総数で割ったものを数えます。
ラインカバレッジ (Line Coverage) は、テストスイート中に少なくとも一度実行された実行可能なソース行の割合です。最も一般的で報告が最も容易なカバレッジ指標です。
ラインカバレッジは読みやすい一方で粗いものです。条件分岐を含む 1 行は、そこを通る 1 つの経路しか実行されていなくてもカバー済みとして数えられ得ます。
CI での扱い
ラインカバレッジは、ほとんどの reporter が示すデフォルトの数値です。完全さの誤った感覚を避けるため、branch カバレッジと組み合わせてください。
関連ガイド
Branch Coverage - CI/CD Glossary DefinitionBranch Coverage: Branch coverage measures whether both the true and false outcomes of every decision point (i…
Statement Coverage - CI/CD Glossary DefinitionStatement Coverage: Statement coverage is the percentage of individual statements in the code that were execu…
Test Coverage - CI/CD Glossary DefinitionTest Coverage: Test coverage is the percentage of your code (lines, branches, or functions) that is executed…