Skip to content
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

Is there any method to realize soft assertion between steps? #2170

Closed
micropan111 opened this issue Jul 15, 2020 · 3 comments
Closed

Is there any method to realize soft assertion between steps? #2170

micropan111 opened this issue Jul 15, 2020 · 3 comments
Labels

Comments

@micropan111
Copy link

micropan111 commented Jul 15, 2020

For example:

Scenario: A Test Scenario
When test step1
And test step2
And test step3

If test step1 is failed, I want to continue run step2 and 3.
So I try to turn on soft assertion by: StepEventBus.getEventBus().softAssertsActive();
@before
public void initTest() {
StepEventBus.getEventBus().enableSoftAsserts();
}
But seems this is not worked, step2 and 3 are skipped after step1 failed

@wakaleo
Copy link
Member

wakaleo commented Jul 15, 2020

Soft asserts work within a step IIFC, not across steps.

@micropan111
Copy link
Author

Thank you, my testsuit run with "CucumberWithSerenity", If I need to let step2 continue running regardless step1 pass or fail, is there any other solution?

@wakaleo
Copy link
Member

wakaleo commented Jul 28, 2020

No, that's not currently supported.

@wakaleo wakaleo closed this as completed Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants