code_coverage
Differences
This shows you the differences between two versions of the page.
| code_coverage [2025/09/10 06:57] – created plida | code_coverage [2025/09/10 07:01] (current) – plida | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| * condition coverage; | * condition coverage; | ||
| * line coverage. | * line coverage. | ||
| + | |||
| + | ==== Using code coverage in CI/CD ==== | ||
| + | |||
| + | Why use code coverage in CI/CD at all? It is an automatic test quality control, which is quite fast (compared to mutation testing). It also makes the process more transparent for the team, and it is an automatic way to drop the build if the code coverage is too low. | ||
| + | |||
| ==== Best practices ==== | ==== Best practices ==== | ||
| Line 21: | Line 26: | ||
| - Use [[mutation_testing|mutation testing]] and code coverage together. Good code coverage does not equal good tests. | - Use [[mutation_testing|mutation testing]] and code coverage together. Good code coverage does not equal good tests. | ||
| - 100% coverage does not guarantee good code quality, you do not have to chase after it. | - 100% coverage does not guarantee good code quality, you do not have to chase after it. | ||
| + | - Use code coverage as a signal, not a goal. | ||
| + | - Launch coverage for all CI branches, not just main. | ||
| + | - Include coverage logs with pull requests. | ||
| + | |||
| + | |||
code_coverage.1757487447.txt.gz · Last modified: by plida
