CodeCoverage Results in Azure DevOps

MrmvanKilsdonk 0 Reputation points
2025-02-05T15:22:27.54+00:00

I updated the PublishCodeCoverageResults@1 Azure DevOps pipeline task to version @2 and encountered an issue. Your help is welcome.

After updating the task, the pipeline build output returns: "No source directories supplied for 'JaCoCo' coverage file." The files in the code coverage report in Azure DevOps are not clickable. However, Azure DevOps returns the correct line coverage percentage and lines. The code coverage reports look okay while the pipeline is still running.

This is what my task looks like:

    - task: PublishCodeCoverageResults@2
      inputs:               
        summaryFileLocation: '**/coverage.scripts.myModule.xml'
        pathToSources: '$(build.sourcesdirectory)'
      condition: and(in(variables['Agent.JobStatus'], 'Succeeded', 'SucceededWithIssues', 'Failed'), eq(variables.pwsh, 'True'))
Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. VarunTha 14,850 Reputation points Microsoft External Staff Moderator
    2025-02-05T17:16:07.2166667+00:00

    Hi MrmvanKilsdonk,
    Thank you for reaching out to us on the Microsoft Q&A forum.

    Azure DevOps is currently not supported in the Q&A forums.

    I recommend initiating a new discussion through the Developer Community

    Moderators are readily available there to assist you and provide guidance.

    Please don't forget to Accept answer and close this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.