How cs-coverage pload Handles Multiple Metrics?
When working with cs-coverage upload, it's important to understand how the tool processes different code coverage metrics. By design, the upload command accepts only one metric per upload operation. This means that if you need to provide multiple metrics - such as branch coverage, function coverage, or method coverage - you must run separate upload commands for each metric type.
Uploading Multiple Metrics
To upload several coverage metrics, simply repeat the cs-coverage upload command for each metric you want to provide. Each upload will be processed independently, allowing CodeScene to map the coverage values to the relevant parts of your codebase.
Important Exception: Line Coverage
There is one special case:
If you are uploading line coverage together with any other metric, you do not need a separate upload for line coverage.
Line coverage is automatically included whenever you upload another supported coverage metric.
In other words, when combining metrics, you only need to explicitly upload the non-line metric - line coverage will be handled for you behind the scenes.
Summary
✔️ One metric per upload
✔️ Multiple metrics = multiple uploads
✔️ Exception: If uploading line coverage + another metric → upload only the other metric
✔️ Line coverage is always uploaded implicitly in combined cases
This approach keeps uploads predictable and flexible while ensuring that CodeScene’s analysis receives all relevant coverage data.