Skip to content

Update wdio-allure-reporter for Allure 3#14719

Merged
christian-bromann merged 8 commits intowebdriverio:mainfrom
todti:allure-reporter-update
Sep 27, 2025
Merged

Update wdio-allure-reporter for Allure 3#14719
christian-bromann merged 8 commits intowebdriverio:mainfrom
todti:allure-reporter-update

Conversation

@todti
Copy link
Contributor

@todti todti commented Aug 24, 2025

Updated wdio-allure-reporter to ensure full compatibility with Allure 3 and allure-js-commons

image

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

//: # (The current main branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against the v8 branch.)

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #XXXXX

Further comments

Reviewers: @webdriverio/project-committers

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 24, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@todti todti force-pushed the allure-reporter-update branch 8 times, most recently from d7f62d4 to 726b4be Compare September 3, 2025 19:20
@todti todti marked this pull request as ready for review September 3, 2025 19:21
@todti todti changed the title Update allure-reporter for Allure 3 Update wdio-allure-reporter for Allure 3 Sep 3, 2025
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, one little nit

Copy link
Contributor

@epszaw epszaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reporter does work, but there are some important moment we need to solve before merge:

  • 🔴 runtime methods in hooks (before, after etc.) don't work
  • 🔴 it seems testplan doesn't work; I created testplan.json file manually, and used test's fullName as a selector, but when I run tests – wdio skips all of them:
image

} from 'allure-js-commons'
import { events } from '../constants.js'

// @ts-ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the comment here?

// eslint-disable-next-line @typescript-eslint/no-explicit-any
process.emit(event as any, msg)

// @ts-ignore
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the comment here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, we can use any instead of never to avoid the comment

type = 'text/plain'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}: any = {},
attachment: { content: string, name?: string, type?: ContentType } | undefined = undefined,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we make the argument just an optional one?

addStep(title: string, attachment?: { /* ... */ })

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think to use the same type here as for the plain attachment, i.g. Buffer | string?

return undefined
}

export function loadTestPlan(): LoadedTestPlan | null {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we use our utility?

}
}

get hasPendingSuite(): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and next functions look pretty the same. Let's create a utility method which accepts start and end message types, and then re-use the method inside these

@todti todti force-pushed the allure-reporter-update branch from a58c5da to 2a2a52e Compare September 16, 2025 15:03
@christian-bromann
Copy link
Member

@epszaw thanks for reviewing this, do you seen any remaining issues that need to be addressed?

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 21, 2025

Open in StackBlitz

create-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/create-wdio@14719

eslint-plugin-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/eslint-plugin-wdio@14719

@wdio/allure-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/allure-reporter@14719

@wdio/appium-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/appium-service@14719

@wdio/browser-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browser-runner@14719

@wdio/browserstack-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browserstack-service@14719

@wdio/cli

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cli@14719

@wdio/concise-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/concise-reporter@14719

@wdio/config

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/config@14719

@wdio/cucumber-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cucumber-framework@14719

@wdio/dot-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/dot-reporter@14719

@wdio/firefox-profile-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/firefox-profile-service@14719

@wdio/globals

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/globals@14719

@wdio/jasmine-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/jasmine-framework@14719

@wdio/json-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/json-reporter@14719

@wdio/junit-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/junit-reporter@14719

@wdio/lighthouse-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/lighthouse-service@14719

@wdio/local-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/local-runner@14719

@wdio/logger

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/logger@14719

@wdio/mocha-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/mocha-framework@14719

@wdio/protocols

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/protocols@14719

@wdio/repl

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/repl@14719

@wdio/reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/reporter@14719

@wdio/runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/runner@14719

@wdio/sauce-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sauce-service@14719

@wdio/shared-store-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/shared-store-service@14719

@wdio/smoke-test-cjs-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-cjs-service@14719

@wdio/smoke-test-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-reporter@14719

@wdio/smoke-test-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-service@14719

@wdio/spec-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/spec-reporter@14719

@wdio/static-server-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/static-server-service@14719

@wdio/sumologic-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sumologic-reporter@14719

@wdio/testingbot-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/testingbot-service@14719

@wdio/types

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/types@14719

@wdio/utils

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/utils@14719

@wdio/webdriver-mock-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/webdriver-mock-service@14719

@wdio/xvfb

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/xvfb@14719

webdriver

npm i https://pkg.pr.new/webdriverio/webdriverio/webdriver@14719

webdriverio

npm i https://pkg.pr.new/webdriverio/webdriverio@14719

commit: 586184e

@todti todti force-pushed the allure-reporter-update branch from de86b74 to 10fef25 Compare September 23, 2025 21:51
@todti todti requested a review from epszaw September 23, 2025 21:51
@epszaw
Copy link
Contributor

epszaw commented Sep 24, 2025

@epszaw thanks for reviewing this, do you seen any remaining issues that need to be addressed?

I don't, at least at this moment :)

Copy link
Contributor

@epszaw epszaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Test plan feature does work correctly now
✅ Step parameters work too
✅ Runtime methods in hooks work as well

It seems everything works well now. At least, issues we haven't discovered yet can be fixed after release once will be appeared.

Thank you for such a great job!

ALLURE_TESTPLAN_PATH=/path/to/your/testplan.json
```

#### Reporter Options
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section actually tells nothing. Remove it


#### Environment Variable

You can also specify the test plan path via environment variable:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see another option to enable test plan, so we can add similar text somewhere at the beginning of the test plan section:

The test plan support can be enabled by providing ALLURE_TESTPLAN_PATH environment variable – the reporter automatically loads the test plan file and run tests which match the selectors.

@epszaw
Copy link
Contributor

epszaw commented Sep 24, 2025

@christian-bromann I had tested the reporter once more after the changes and didn't find critical issues, so there's an approval from my side :)

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 thanks a ton @todti and @epszaw for reviewing!

@christian-bromann christian-bromann merged commit 484ac35 into webdriverio:main Sep 27, 2025
90 of 93 checks passed
@christian-bromann christian-bromann added the PR: New Feature 🚀 PRs that contain new features label Sep 27, 2025
@wdio-bot
Copy link
Contributor

Hey todti 👋

Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution.

We've sent you an email with further instructions on how to claim your expenses from our development fund.
Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at expense@webdriver.io or in the contributing channel on Discord.

We are looking forward to more contributions from you in the future 🙌

Have a nice day,
The WebdriverIO Team 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants