I have a C# project running on the Azure DevOps pipeline with integration with SonarQube. I’m using the classic mode of the pipeline with tasks without YML and configuring SonarQube in the “Prepare Analysis Configuration” task.
The test coverage is working correctly, but the number of unit tests is always showing zero, even though the project has several tests.
SonarQube won’t count your tests for you. That’s what the Nunit report is for. I see you’ve provided that parameter, but you’re pointing it to an OpenCover report? I’m fairly certain that if you look at your analysis logs, you’ll find that the attempt to read that report as an NUnit report is failing.