Update wdio-allure-reporter for Allure 3#14719
Update wdio-allure-reporter for Allure 3#14719christian-bromann merged 8 commits intowebdriverio:mainfrom
Conversation
d7f62d4 to
726b4be
Compare
christian-bromann
left a comment
There was a problem hiding this comment.
This is awesome, one little nit
epszaw
left a comment
There was a problem hiding this comment.
The reporter does work, but there are some important moment we need to solve before merge:
- 🔴 runtime methods in hooks (
before,afteretc.) don't work - 🔴 it seems testplan doesn't work; I created
testplan.jsonfile manually, and used test'sfullNameas a selector, but when I run tests – wdio skips all of them:
| } from 'allure-js-commons' | ||
| import { events } from '../constants.js' | ||
|
|
||
| // @ts-ignore |
There was a problem hiding this comment.
Do we need the comment here?
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| process.emit(event as any, msg) | ||
|
|
||
| // @ts-ignore |
There was a problem hiding this comment.
Do we need the comment here?
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Can't we make the argument just an optional one?
addStep(title: string, attachment?: { /* ... */ })There was a problem hiding this comment.
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 { |
| } | ||
| } | ||
|
|
||
| get hasPendingSuite(): boolean { |
There was a problem hiding this comment.
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
a58c5da to
2a2a52e
Compare
|
@epszaw thanks for reviewing this, do you seen any remaining issues that need to be addressed? |
create-wdio
eslint-plugin-wdio
@wdio/allure-reporter
@wdio/appium-service
@wdio/browser-runner
@wdio/browserstack-service
@wdio/cli
@wdio/concise-reporter
@wdio/config
@wdio/cucumber-framework
@wdio/dot-reporter
@wdio/firefox-profile-service
@wdio/globals
@wdio/jasmine-framework
@wdio/json-reporter
@wdio/junit-reporter
@wdio/lighthouse-service
@wdio/local-runner
@wdio/logger
@wdio/mocha-framework
@wdio/protocols
@wdio/repl
@wdio/reporter
@wdio/runner
@wdio/sauce-service
@wdio/shared-store-service
@wdio/smoke-test-cjs-service
@wdio/smoke-test-reporter
@wdio/smoke-test-service
@wdio/spec-reporter
@wdio/static-server-service
@wdio/sumologic-reporter
@wdio/testingbot-service
@wdio/types
@wdio/utils
@wdio/webdriver-mock-service
@wdio/xvfb
webdriver
webdriverio
commit: |
Co-authored-by: Dmitry Baev <baev.dm@gmail.com>
de86b74 to
10fef25
Compare
I don't, at least at this moment :) |
epszaw
left a comment
There was a problem hiding this comment.
✅ 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 |
There was a problem hiding this comment.
This section actually tells nothing. Remove it
|
|
||
| #### Environment Variable | ||
|
|
||
| You can also specify the test plan path via environment variable: |
There was a problem hiding this comment.
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_PATHenvironment variable – the reporter automatically loads the test plan file and run tests which match the selectors.
|
@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 :) |
|
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. We are looking forward to more contributions from you in the future 🙌 Have a nice day, |
Updated
wdio-allure-reporterto ensure full compatibility withAllure 3andallure-js-commonsTypes of changes
Checklist
Backport Request
//: # (The current
mainbranch 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 thev8branch.)v9and doesn't need to be back-ported#XXXXXFurther comments
Reviewers: @webdriverio/project-committers