-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[🐛 Bug]: allure-reporter - setting a custom message in matcher options makes the test to be reported as broken instead of failed #13044
Comments
Sounds good. We need more details. How is the reporter supposed to guess that this stacktrace is an assert error and not a regular error? |
@BorisOsipov I guess the problem is indeed hard to solve if you want to support any third party assert library (maybe some sort of extension point that allows the user to override My point is that it should probably work in an "obvious" manner for first-party library combination of |
Thanks for reporting! We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers! |
Probably the best solution is to port https://github.com/allure-framework/allure-js/blob/dc06dbc09c64a256a573a43dbb7cedf15f27fb2b/packages/allure-js-commons/src/sdk/utils.ts#L5 to reporter. |
@BorisOsipov: I think that there's actually some sort of bug (or convention that does not work that great in this scenario) somewhere. Only the first line of error message ends up inside |
Have you read the Contributing Guidelines on issues?
WebdriverIO Version
latest
Node.js Version
latest
Mode
WDIO Testrunner
Which capabilities are you using?
No response
What happened?
If one sets a custom message in matcher options like so:
and this assertion fails, then allure reporter marks the test as "broken" (=uncaught exception) instead of failed (=assertion failure).
Workaround is manually adding a string "expect" to custom messages to trigger the
|| message.includes('expect')
condition from hereWhat is your expected behavior?
Failed assertions should always report test as failed.
How to reproduce the bug.
Relevant log output
Code of Conduct
Is there an existing issue for this?
The text was updated successfully, but these errors were encountered: