Condition Coverage with 0 or - (dash)

Hello all =)

I face a problem today with 3 repos, the problem is the condition coverage of all have a 0.0 or a dash. I dont know why :(.

Others repo are ok, i think the problem is because the code is too small (few line)

  • Version 7.5 Community

  • Steps to reproduce
    -> get a small repo (few lines of code) and put the quality with 80.0 of coverage.


Welcome to the Community!

This is not about the size of your repo, or about your Quality Gate conditions.

Let’s take a closer look at the ‘-’ projects. I’ve drawn some boxes of my own on a section of your screenshot:

Both of these projects only have XML in them. AFAIK, code coverage isn’t possible for these projects. So instead of showing 0% (which implies that there could be a higher number) it just shows ‘-’, which you can happily read as “Not Applicable”.

In the other project you have both Java and XML, so coverage > 0 is possible. It looks like you probably need to generate a test coverage report and feed it into anlaysis.