Code Coverage view not rendering linked css / js files in artifact
See original GitHub issueI’m creating a javascript test coverage report using the karma-coverage plugin. It generates an HTML coverage report based on the Istanbul and a Cobertura report file.
I’m using the output directory for the html report as the report directory in the “Publish Code Coverage Results” task.
My build artifact then contains the full contents of the html folder, as well as the Cobertura report.
Build Artifact:
When I navigate to the Code Coverage page for the build, I see the results of my tests, and I’m able to navigate through the results, I just don’t have any of the styling or scripts that are associated with the report.
Results:
Expected:
When I navigate to the coverage page in chrome, I get the following console error:
Blocked script execution in 'https://MYPROJECTHERE.visualstudio.com/_apis/Containers/321454/Code%20Coverage%20Report_2015/index.html' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:18
- Comments:31 (2 by maintainers)
Top Results From Across the Web
Code coverage report on build should not strip stylesheet tags ...
Now, the same coverage artifact displays without any of the included css styles. Looking at the frame source shows all the stylesheet tags...
Read more >Not able to render Code Coverage HTML results in the "Code ...
Run tests using above tool and generate .coverage file; Install CodeCoverage.exe from Nuget; PowerShell script to convert .coverage to .xml ...
Read more >Artifacts: Make it possible to view HTML files with relative links ...
This makes relative links between artifacts unusable when viewed directly on the web UI. This issue mainly affects HTML files/reports, where the ...
Read more >Extend online view of HTML artifacts to private projects - GitLab
Given my job run and generates code coverage reports - static files in HTML format (with JS and CSS), still can not view...
Read more >Code Coverage - Cypress Documentation
Let's look at the one file that has a "missed" line. It is the src/selectors/index.js file shown below. ... The source line not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates on this?
In the meantime, here is a little script that inlines the external CSS into the HTML pages generated by the coverage reporter. I run it as a post processing step in the build after the coverage has been collected.
https://gist.github.com/kohlikohl/ef77c751cfd3b731923ca74fec9443d5