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
I understand that StepEventBus.getEventBus().getBaseStepListener().getTestFailureCause().getOriginalCause() will give me ultimately what caused it to fail, but the test will still fail. I find it irksome that I cannot use this type of verification within a test. I have tried using Serenity.throwExceptionsImmediately() based on wandering through the issues for this project, and the Googles, but I cannot seem to find a workaround.
The text was updated successfully, but these errors were encountered:
parraline5750
changed the title
Assert that a Step throws a specific exception aka bypass StepInterceptor temporarily
[Question] Assert that a Step throws a specific exception aka bypass StepInterceptor temporarily
May 28, 2021
Forgive a stupid question. Is it possible within the realm of how the StepInterceptor works, to achieve the following within a JUnit test using :
assertThatThrownBy(() -> someSerenityStepAnnotatedMethod()).isInstanceOf(ElementNotInteractableException.class);
I understand that StepEventBus.getEventBus().getBaseStepListener().getTestFailureCause().getOriginalCause() will give me ultimately what caused it to fail, but the test will still fail. I find it irksome that I cannot use this type of verification within a test. I have tried using Serenity.throwExceptionsImmediately() based on wandering through the issues for this project, and the Googles, but I cannot seem to find a workaround.
The text was updated successfully, but these errors were encountered: