Share a Codeception report
Codeception's HTML report is unusually good at the thing that matters: it shows the steps, in order, with the failing one expanded and the screenshot attached. It is a readable account of what the browser actually did.
And it lands in tests/_output/ on a CI worker that is about to be
destroyed.
Publish it
vendor/bin/codecept run acceptance --html || true
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 tests/_output/report.html \
--arg title "Acceptance — $BRANCH — build $BUILD_NUMBER" \
'{title: $title, html: $html}')"
Or drag tests/_output/ into the app, which
uploads the failure screenshots and page snapshots as assets and rewrites
the report's references to the uploaded copies — the step that decides
whether the published page shows the screenshot or an empty box.
|| true because a red suite is the run worth a link. One report id per
suite, PATCH per run: a stable URL with a revision history.