I'm looking at the code coverage results from a recent run of all the tests in an org, and I'm not sure what all the colors represent.
The green and red seem fairly self explanatory:
- Green - covered by one or more test cases
- Red - not covered by any test cases
But what does the other color represent? I don't have the ability to describe that color, mustard maybe? Lets call it #5E5620.
Were those lines covered or not?
Note that all the test classes passed in the most recent run. So I don't think they represent failed test results.
Maybe something to do with partially covered lines? Although I'm not sure how that would work either. I don't believe the ApexCodeCoverage
can represent that. Also, how do you partially cover a line like sourceRecords.add(devObj);
?
For contrast, the developer console shows those lines as covered.
Investigation on the unknown color #5E5620 being somewhere between the known colors.
It gets a bit complicated with the alpha/opacity being applied in the editor and the grey background. But it does seem plausible that the unknown color is in between the two covered and uncovered colors.
I've raised this as an issue in the GitHub repo - Code coverage showing unknown color that isn't covered or uncovered
¯\_(ツ)_/¯
. The change log shows it in 45.7.0. I found it a bit fiddly to setup.