Share a Cucumber HTML report
Cucumber reports exist to be read by people who don't run the suite. That is the whole premise of BDD: the scenarios are written in the language of the business so the business can check them. Then CI takes the report, zips it, and puts it behind a login the business doesn't have.
The mismatch is the problem, not the format. @cucumber/html-formatter
already produces exactly the right artifact — one self-contained file,
the run's messages embedded, a bundled React app rendering the feature
tree. It needs a URL, not a build system.
Publish it with one curl
npx cucumber-js --format html:cucumber-report.html
curl -fsS -X PATCH \
"https://commareports.com/api/v1/reports/$COMMA_REPORT_ID" \
-H "Authorization: Bearer $COMMA_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html cucumber-report.html \
--arg title "Acceptance — $(git rev-parse --short HEAD)" \
'{title: $title, html: $html}')"
PATCH on a saved report id instead of POST means every run appends a
revision at the same URL. The link in the team channel is written
once and never goes stale. Use a scoped token —
reports:write is all this needs.
For cucumber-jvm, the same file comes out of
@CucumberOptions(plugin = "html:target/cucumber-report.html"); for
Behave or SpecFlow, point the curl at whatever single HTML file the
reporter wrote. Nothing here is JS-specific.