Hey we’ve started to convert some of our projects to use OpenCover, and we’re seeing better statistics being reported now. We hit an issue today though where suddenly our code coverage suddenly dropped dramatically. We haven’t changed anything, but from our Friday master scan to our Monday master scan we dropped From 24.9% coverage overall to 17.8%.
Has anything changed that could have contributed to this difference? It seems to once again affect the projects that still use the Visual Studio coverage more than others…
I’d need to understand more - have you changed the SQ version or upgraded the C# plugin? If you upgraded the C# plugin, what was the previous version and what’s the current one? Have you upgraded Visual Studio to a newer version?
This is when running it in Azure DevOps. I’ve checked all of the task versions in there and they’re all the same. We’re using SonarCloud, instead of SonarQube so that is why I was wondering if something could have changed on your end.
hi @StephenLarkin, the only thing that may have changed on SonarCloud is the plugin, and you can check the deployment data on https://sonarcloud.io/api/plugins/installed - it has an epoch timestamp - Tuesday, June 30, 2020 11:22:34.454 AM .
Okay, looking into our SonarCloud settings it seems like something cleared out our typescript settings from SonarCloud, so it no longer was picking up the coverage file for any of our typescript code.
I have since updated our yaml task to include the setting in the extra properties, so that for whatever reason it got cleared out of our sonarcloud settings it will not happen again.
Why did the Typescript coverage setting disappear from our SonarCloud settings?
Why has our C# coverage suddenly plummeted. It seems like it is no longer picking up the coverage results in the Visual Studio format that it used to retrieve automatically.
In the addition to adding the additional property, I also updated the Visual Studio tasks as it appears to support a different format now:
I’m not sure on this one, I’ll have to come back to you.
However, looking at our own config, we specify the path to the code coverage file explicitly.
To investigate further, we’d also need the verbose logs. Please add the sonar.verbose=true property at the BEGIN step and give us the logs of the BEGIN and END steps.
We use the test platform installer to install the latest version, but between those runs it’s still using the same version: Microsoft.TestPlatform 16.6.1