Codecov : coverage and complexity rate
Asked Answered
A

0

6

I'm testing a project and I use Codecov to publish the coverage rate of my tests. Codecov uses the report generated by Jacoco and so far it works fine. Codecov doesn't display only the coverage rates, but also the complexity rates of the tests.

I have two questions about this complexity rate, I couldn't find answers for in the documentation:

  1. What is exactly the complexity rate and how does Codecov measure it?

  2. The project under test is a maven multi-module project. When I activate the report-aggregate-goal of the jacoco plugin in my POM, in order to aggregate the reports of each module, as a result no complexity is displayed on codecov:

enter image description here

But when I don't activate the plugin, then the complexity is calculated: enter image description here

Why is it so?

A1 answered 29/7, 2019 at 17:5 Comment(3)
From my own experience using Jacoco with Codecov, it appears that the complexity Codecov uses is in fact the Jacoco complexity. (i.e. it is calculating the coverage of the branches in your code).Distressful
In Codecov community the Codecov CEO explained: "Complexity coverage, sometimes also called Branch coverage, refers to Cyclomatic Complexity of the code. Some languages and test frameworks, like Java / Jacoco, have Cycolmatic Complexity out of the box, in which case we ingest that data."Punic
I'm encountering the same issue with the complexity gone when using aggregated jacoco-reports. Are you found a solution for this?Hunan

© 2022 - 2024 — McMap. All rights reserved.