We have a Java project and it will be executed in Azure Devops pipeline. Recently we configured Sonarcloud for Analysis and Code coverage, and the Analysis is happening and code coverage always shows as 0.0% but the test cases are executed during execution.
I have used PublishCodeCoverageResults task and came to know this will be used to publish coverage in Azure itself. But Which task in Azure has to be used for publishing in Sonarcloud ? Can someone provide inputs on the same ? Thanks!
This will ensure the JaCoCo XML report is created after your test execution – it’s possible you need to do no further configuration after this as long as the reports land in the default location. Coverage reports are imported during the sonar:sonar maven goal – no additional tasks required.
Out of curiosity – does your PublishCodeCoverageResults task already work (are coverage details being published to Azure?)