-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add soft assert support #227
Comments
What does soft assert support mean? |
A way to do multiple assertions within test then throw all the failed assertions in when the test ends. I'll add proper description of course, but a bit later |
@mgrybyk, I just made this https://github.com/alfonso-presa/soft-assert (because we need something similar for long and expensive cucumber tests) and I though it might cover your needs. It's assertion and test-harness library agnostic, so it might fit well. A little bit more verbose than having it built in the assertion library though. Sorry for the advertising.... edit: Also the focus of this issue if I understood correctly is for assertion failure to be kept until the end of the test unit, which in common frameworks is the |
Adding another request for a SoftAssert feature in webdriverio-expect. What a soft assert does is let the test continue even when the assertion fails. This way you get a very telling metric: How many assertions passed and how many failed. Not that 1 of 10 tests failed - which seems insignificant - while hiding the fact that the next 30 assertions in that test failed as well - which seems rather significant. Likewise if 1 assertion fails and 30 passed, it's likely going to be quick work to resolve. |
Given expect-webdriverio enhances the |
Fair enough. |
NUnit has Multiple Asserts. See https://docs.nunit.org/articles/nunit/writing-tests/assertions/multiple-asserts.html. It would be nice if Webdrive.IO has the same capability. "This is particularly useful for testing things like object initialization and UI appearance as well as certain kinds of integration testing." |
@circa1741 I think we all agreed that soft assertions would be a nice option. Please get involved and help make it reality 😉 |
Hi All, It is been 2 years since this request was raised. Is there any specific reason why this request never gets prioritized? |
@DivyangRaval as I mentioned already in my previous posts: get involved and help us implement this feature. |
Any update on soft assertion or alternative approach to achieve this? |
@PipulPant did you read the thread here? |
Big fan of multiple validation. |
It seems like there is some discussion going on in the |
Adding this post on the same for developers webdriverio-community/wdio-cucumberjs-json-reporter#255 |
Inspiration for a possible implementation can be found in vitest-dev/vitest#3509 |
@pavankumardmg interesting, it seems like |
No description provided.
The text was updated successfully, but these errors were encountered: