Comments (5)
Failed assertions should always report test as failed.
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?
Keep in mind that your solution should work with any assert library, even if we don't have invented it yet 😊
from webdriverio.
@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 getTestStatus
?).
My point is that it should probably work in an "obvious" manner for first-party library combination of expect-webdriverio
+ @wdio/allure-reporter
, or be somehow mentioned in docs.
from webdriverio.
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!
from webdriverio.
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.
from webdriverio.
@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 test.error.message
that gets passed to getTestStatus
(the rest is inside test.error.stack
only), and since custom message gets prepended to the original expect result with a newline, the actual whole message never gets inspected by getTestStatus
. Would get "solved" if one reorders if (test.error.message) {
and if (test.error.stack) {
, but I do not know further implications of that.
from webdriverio.
Related Issues (20)
- [🐛 Bug]: Chromedriver binary override no longer works HOT 3
- [💡 Feature]: [spec-reporter] Do not report a failed test as a failure if it passed on a subsequent retry HOT 3
- [🐛 Bug]: App getting stuck after Launch HOT 1
- [🐛 Bug]: `browser.mock` not working locally with Firefox 126 HOT 2
- [🐛 Bug]: ERROR webdriver: Failed downloading chromedriver v125.0.6422.141: Download failed: server returned code 404 HOT 3
- [🐛 Bug]: Spec CLI arg breakable on Windows HOT 6
- [🐛 Bug]: Error installing @wdio/cli during project initialization HOT 2
- [🐛 Bug]: <@wdio/config:ConfigParser: Failed loading configuration file in CircleCi> HOT 1
- [🐛 Bug]: Error: There isn't any active suite! HOT 2
- [🐛 Bug]: Inconsistency with driver.lock HOT 3
- [🐛 Bug]: ts-node performs type check regardless of configuration HOT 1
- [📖 Docs]: <title> Fix mock.restore docs HOT 1
- [💡 Feature]: Improve `browser.mock` by enabling partial responses HOT 1
- [🐛 Bug]: scrollIntoView does not scroll to the center of the viewport when used inside an iframe. HOT 1
- [🐛 Bug]: Jasmine and the JUnit reporter output empty spec files since v8.15.9 due to suite file property not including path HOT 1
- [🐛 Bug]: moz:debuggerAddress does not accept boolean value HOT 1
- [🐛 Bug]: <Scenarios with duplicated steps not failing> HOT 1
- [🐛 Bug]: WebdriverIO security vulnerability in dependency on puppeteer-core HOT 2
- [🐛 Bug]: V9 - TSC fails on Windows machine HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webdriverio.