I want to continue executing my scenarios even if some fail in between in the cucumber report it should show it as a failure but should not stop the execution.
I tried using soft assertion class and using this
SoftAssertion sa = new SoftAssertion();
if (response.getStatusCode() == 200) {
Sytem.out.println("pAASED")
} else {
sa.fail("this is the failure");
}
but suppose I have two scenarios and for the first one the response is not 200 it is going to else block and failing the scenario
java.lang.AssertionError: this is the failure
at org.junit.Assert.fail(Assert.java:88)
it is not even going for the second scenario. Can someone help how can I achieve the expected result(i.e it should continue the execution irrespective of one getting failed)