Inline report assets, zip download, and fail on failed tests - #6
Merged
Conversation
Coverage-style HTML folders did not render in the pipeline tab because only the HTML files were uploaded. Local CSS/JS/images are now inlined, a zip of the original directory is attached for Download all, and failOnFailedReports can fail the task after publish. Co-authored-by: Jeff Jones <joneja09@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Follow-up to #1. These were the next product features after the generic HTML portal actually published.
Inline local assets (
inlineAssets, default on)When
reportDiris a folder, local stylesheets, scripts, and images (includingurl()in CSS) are embedded into each HTML file before upload. Coverage reports (JaCoCo, Istanbul) and similar multi-file HTML then render in the pipeline tab instead of showing unstyled markup.Remote URLs and missing files are left alone. ES modules that
importother files are not fully inlined (a warning is issued). Playwright/Cypress apps thatfetch()extra JSON at runtime still need a self-contained export; the original folder is available as a zip.Zip of the report folder (
publishArchive, default on)If
reportDiris a directory, the task attacheshtml-reports.zip(portal.archive) and the tab shows Download all.node_modulesis omitted. Archives over 50 MB are skipped with a warning.Fail the task on failed reports (
failOnFailedReports, default off)After publishing, the task can fail when a report looks unsuccessful:
Failed Tests N"unexpected": NReports are still uploaded either way. Use this together with
condition: succeededOrFailed()on the upload step.Tab UX
srcdoc)index.htmlis listed first in a directorySummary JSON is now
{ version: 2, reports, archive }. The tab still reads the legacy array format from #1.Testing
failOnFailedReports=true: attachment published, task result Failednpm run buildsucceedsCould not click through a live Azure DevOps build tab in this environment.