Skip to content

feat: optional Allure helpers and an Allure report for every e2e run - #1

Merged
rucindrea merged 1 commit into
mainfrom
feat/allure-reporting
Nov 22, 2026
Merged

rucindrea merged 1 commit into
mainfrom
feat/allure-reporting

Conversation

@rucindrea

Copy link
Copy Markdown
Contributor

Adds Allure reporting in two parts.

1. @alttester/driver/allure, an optional entry point

It attaches AltTester material to the test that is running, in any runner with an Allure adapter (allure-vitest, allure-mocha, allure-jest, allure-playwright, @wdio/allure-reporter).

  • createLogRecorder(): a logger for AltDriver.connect({ enableLogging }) that keeps the last 500 lines in memory instead of printing them.
  • attachScreenshot, attachHighlightedScreenshot, attachHierarchy, attachLog: one item each.
  • attachFailureEvidence(driver, { log, object, hierarchy }): what a failed test needs. An item it can't collect (the app crashed, or the driver isn't connected) becomes a "not available" note, and the function never throws.

allure-js-commons is an optional peer dependency and stays external in the build. No other entry point imports it: the built index, protocol and node files don't reference it, so users who don't use Allure install nothing extra.

2. An Allure report for every e2e run

  • vitest.e2e.config.ts adds the allure-vitest reporter and empties allure-results/ at the start of each run.
  • test/e2e/allure.setup.ts attaches the game screenshot and the test file's driver log to every failed test.
  • e2e.yml builds the report after every run, passed or failed, and uploads it as the allure-report artifact (kept 7 days, the org maximum).
  • npm run report and npm run report:open do the same locally.

Checks

  • npm run typecheck, npm test (170 passed, 6 of them new for the helper) and npm run build.
  • I ran the real e2e config against a deliberately failing probe test on the fake server: the failed test had the screenshot note and the driver log in allure-results, the passed one had nothing attached, and npm run report built allure-report/.
  • The E2E job on this PR runs the real suite against the sample game, which shows the report step on a real run.

- @alttester/driver/allure: createLogRecorder, attachScreenshot, attachHighlightedScreenshot,
  attachHierarchy, attachLog and attachFailureEvidence. allure-js-commons is an optional peer
  dependency; no other entry point imports it.
- The e2e suite writes Allure results on every run. Failed tests get the game screenshot and
  the test file's driver log. CI builds the report whether the run passed or failed and uploads
  it as the allure-report artifact.
@rucindrea
rucindrea merged commit 0331e64 into main Nov 22, 2026
3 checks passed
@rucindrea
rucindrea deleted the feat/allure-reporting branch November 22, 2026 15:35
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.

1 participant