You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are cases in our test infrastructure where we wish to call StepEventBus.getEventBus().clearStepFailures() and and continue with test execution flow.
Actually having thought about it, the example project I supplied for 4.1.6 was slightly incorrect as the behaviour I wanted to test is whether an exception thrown within another performable can be caught and reset by a parent. When I revised my project as can be seen here, it actually works - in that subsequent steps can be continued without an overall test suite failure outcome:
Calling StepEventBus.getEventBus().clearStepFailures() is not needed as we've caught the exception thrown by the performable in the catch block - something that was not possible in previous versions of Serenity discussed here so this is a big improvement! 👍 👍
We are unable to clear reporting which remains amber (not a problem in my case) regardless of whether we clearStepFailures or not.
As a further check I rolled the Serenity example project back to 3.6.22 which is the version we are still on within our client project. This does reproduce the original problem that I raised which is that it's not possible to catch or reset the step failures and the first failing test case causes a test suite failure outcome:
So it looks like the solution is to upgrade to Serenity version 4.1.6 on our project. However, there are other report aggregation performance problems we're wrestling with at the moment with that, that might well be the subject of a further PR soon 🤞 - stay tuned!)
What happened?
StepEventBus.getEventBus().clearStepFailures()
and and continue with test execution flow.What did you expect to happen?
I would expect that calling
StepEventBus.getEventBus().clearStepFailures()
would not cause the test to fail but it still does.Serenity BDD version
4.1.6 (latest)
JDK version
8->21
Execution environment
mac/linux
How to reproduce the bug.
mvn clean verify serenity:aggregate -Dtags=event_bus_test -f pom.xml
How can we make it happen?
Work on this myself and propose a PR (with Serenity BDD team guidance)
The text was updated successfully, but these errors were encountered: