Skip to Content
DocumentationCore ConceptsChanged Code Coverage

Changed Code Coverage

Changed code coverage allows you to focus on the test coverage of your code changes.

Calculation Logic

  1. Use git diff to get added lines and deleted lines for each file
  2. Traverse through the file’s coverage data, checking if added lines are covered in all dimensions
  3. Calculate the changed code coverage for a single file. Formula: (number of added lines - number of uncovered lines) / number of added lines
💡
Tip

Many of the added lines do not belong to any of the branches, functions, or statements categories, but they are included in the calculation and are considered covered by default.

View Our Example

simple