Skip to content

Finish HTML Report Portal conversion and fix publish blockers - #1

Merged
joneja09 merged 5 commits into
masterfrom
cursor/html-portal-enhancements-3ba8
Aug 26, 2026
Merged

Finish HTML Report Portal conversion and fix publish blockers#1
joneja09 merged 5 commits into
masterfrom
cursor/html-portal-enhancements-3ba8

Conversation

@joneja09

@joneja09 joneja09 commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Why this exists

feature/convert-to-html-portal started turning the Postman/Newman extension into a generic HTML viewer, but the rename was incomplete. Several issues would have prevented it from working on current Azure DevOps agents or with non-Postman HTML.

This PR lands that conversion on master and the enhancements needed to make it usable.

Blockers that were still in the conversion branch

  • Node 10 only. Hosted agents warn/fail on EOL Node 10 (UploadPostmanHtmlReport issue Nodejs dependant version update maciejmaciejewski/azure-pipelines-postman#25 upstream). The task now declares Node16 and Node20_1.
  • Summary attachment type mismatch. The task wrote report.summary while the tab looked for portal.summary, so the build tab would never find reports.
  • Generic HTML crashed the task. checkIfSuccessful() assumed Newman HTML Extra (Failed Tests N) and threw when that text was missing.
  • Original Postman task GUID + Finastra ID were still wired into supportsTasks / OUR_TASK_IDS, so this extension would collide with (or hide behind) the Postman one.
  • In-place HTML rewrite. Cheerio always mutated pipeline artifacts, which is wrong for generic reports and can OOM on large files.

Enhancements included

  • New task id 4d9a74ab-346a-4549-936a-6a3d3ad77227 so this extension does not conflict with Postman Report.
  • reportDir accepts a single HTML file or a directory (recursive .html/.htm).
  • Optional redactSecrets (off by default). When on, Bearer tokens and nested secret keys are masked, including password / access_token inside JSON — without rewriting originals (copies go to the agent temp dir).
  • Optional failOnEmpty (on by default).
  • Tab UI: sandboxed iframe, viewport-based height, authenticated download, fixed JSX error string, missing-report null deref, and release jobs that publish more than one summary.
  • CI on Node 20 (GitHub Actions + Azure Pipelines). Marketplace publish steps that pointed at a missing service connection were removed from packaging.
  • Unit tests for file discovery, naming, Newman success detection, and redaction (npm test in tasks/UploadPortalHtmlReport).
  • Pinned azure-devops-ui@2.165.1 and committed lockfiles. A caret range installed 2.278 on GitHub Actions, which requires webpack 5 (this.getOptions).

Usage

- task: UploadPortalHtmlReport@1
  condition: succeededOrFailed()
  inputs:
    reportDir: '$(System.DefaultWorkingDirectory)/reports'
    tabName: 'Test Reports'

Reports should be self-contained HTML. Companion CSS/JS folders (for example Playwright’s full playwright-report/) are not published as a static site.

Intentionally not in this PR

These are still worth doing later, but they are larger product/architecture changes:

  • Publishing a full static report folder (CSS/JS/images) so Playwright/Cypress multi-file reports render completely
  • Webpack 5 / azure-devops-ui upgrade (current UI kit is pinned to 2.165.1 so webpack 4 still builds)
  • Zip-all download of every report in a tab
  • Passing/failing the pipeline based on HTML report status

Testing

  • 13 unit tests passing
  • Smoke-ran the task locally against fixtures (4 reports published, Newman fail marked unsuccessful)
  • npm run build succeeds for the extension tab with azure-devops-ui@2.165.1
  • Could not verify the Azure DevOps build/release tab in a live org (no ADO org in this environment)
Open in Web Open in Cursor 

joneja09 and others added 5 commits January 10, 2022 22:08
The convert-to-html-portal branch was still Postman-specific: Node 10
only, a summary attachment type mismatch, and success detection that
threw on generic HTML. This completes the generic viewer, adds Node
16/20 handlers, and covers the task helpers with unit tests.

Co-authored-by: Jeff Jones <joneja09@users.noreply.github.com>
CI installed azure-devops-ui 2.278 via the caret range, which requires
the webpack 5 loader API (this.getOptions). Lock exact versions and
commit package-lock files so npm ci stays on a compatible tree.

Co-authored-by: Jeff Jones <joneja09@users.noreply.github.com>
@joneja09
joneja09 marked this pull request as ready for review August 26, 2026 14:01
@joneja09
joneja09 merged commit a8dfe87 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