question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PublishCodeCoverageResults can't find its own html report when the agent is installed to a dir with a space in the name

See original GitHub issue

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: PublishCodeCoverageResults@1

Environment

  • Server - Azure Pipelines

  • Agent - Hosted or Private:

      - Self hosted agent: vsts-agent-win-x64-2.168.2
    
    • Windows Server 2019 (1809)

Issue Description

Task is configured to process a cobertura-coverage.xml produced by jest

        - task: PublishCodeCoverageResults@1
          inputs:
            codeCoverageTool: 'Cobertura'
            summaryFileLocation: './coverage/cobertura-coverage.xml'
            failIfCoverageEmpty: true

On execution, the task processes this and writes the report to a new (unexpected?) directory

Writing report file 'D:\Azure\index.htm'

This and other output files representing the source files are written correctly. The cobertura-coverage.xml is uploaded as an artifact.

However the task then states

Generated code coverage html report: D:\Azure Agent\vsts-agent-win-x64-2.168.2\_work\_temp\cchtml

and generates a warning

##[warning]Directory not found: 'D:\Azure Agent\vsts-agent-win-x64-2.168.2\_work\_temp\cchtml

There is nothing in that _temp directory.

If I specifically set reportDirectory to 'D:\Azure' within the task it complains

[warning]Ignoring coverage report directory with Html content as we are auto-generating Html content

https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-code-coverage-results?view=azure-devops doesn’t document the reportDirectory option aside to say it’s optional.

Have I come across a bug or is my configuration wrong?

Many thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
DaniilShmelevcommented, Nov 30, 2020

Hi @DevRCRun, we’ve fixed this issue, but it may take a few weeks until the changes are deployed. We’ll let you know once they’re available.

1reaction
ShreyasRmsftcommented, Nov 20, 2020

@adamconnelly yes. We will try and patch this immediately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get error when using task 'PublishCodeCoverageResults@1 ...
Situation : It works normal when we using cloud build agent. But It returns error in publishing test report when we use the...
Read more >
Publish code coverage results v1 task - Microsoft Learn
The publish code coverage results task generates and publishes the HTML report, which is a set of HTML files that are linked from...
Read more >
How to publish an HTML report in Azure Devops that is ...
Howerver, You can publish the html report to azure devops server as build artifacts by using publish build artifacts task in your pipeline....
Read more >
Gcovr User Guide — gcovr 5.0 documentation
Thus, gcovr can be viewed as a command-line alternative to the lcov utility, which runs gcov and generates an HTML-formatted report.
Read more >
Generate Code Coverage Reports with ReportGenerator in ...
Another really nice feature of modern Azure DevOps is that its builds are stored as text files ... Of course you can't just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found