Skip to content

Inline report assets, zip download, and fail on failed tests - #6

Merged
joneja09 merged 1 commit into
masterfrom
cursor/report-folder-archive-3ba8
Aug 26, 2026
Merged

Inline report assets, zip download, and fail on failed tests#6
joneja09 merged 1 commit into
masterfrom
cursor/report-folder-archive-3ba8

Conversation

@joneja09

Copy link
Copy Markdown
Owner

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 reportDir is a folder, local stylesheets, scripts, and images (including url() 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 import other files are not fully inlined (a warning is issued). Playwright/Cypress apps that fetch() 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 reportDir is a directory, the task attaches html-reports.zip (portal.archive) and the tab shows Download all. node_modules is 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:

  • Newman HTML Extra Failed Tests N
  • Playwright "unexpected": N

Reports are still uploaded either way. Use this together with condition: succeededOrFailed() on the upload step.

Tab UX

  • Reports load in a blob-URL iframe (better for large inlined HTML than srcdoc)
  • A single report is expanded automatically
  • index.html is listed first in a directory

Summary JSON is now { version: 2, reports, archive }. The tab still reads the legacy array format from #1.

Testing

  • 20 unit tests (inlining, zip, summary v2, Playwright failure detection)
  • Smoke-ran a CSS/JS site: assets inlined, zip attached
  • Smoke-ran Newman fail HTML with failOnFailedReports=true: attachment published, task result Failed
  • npm run build succeeds

Could not click through a live Azure DevOps build tab in this environment.

Open in Web Open in Cursor 

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>
@joneja09
joneja09 marked this pull request as ready for review August 26, 2026 14:11
@joneja09
joneja09 merged commit d3d7d70 into master Aug 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants