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
Currently @Hidden-annotated methods are executed like normal step methods, but just do not appear in the report. This causes problems when the hidden method is not returning the stage instance as required for step methods and then an exception is thrown in previous step methods.
Example:
given().something()
.and().a_step_throwing_an_exception();
String value = given().giveMeSomeValue();
As JGiven captures the exception in the 2nd step and tries to execute the following methods in a skipped-mode so that they can appear in the report, value will be null, because JGiven executes the giveMeSomeValue method in skipped-mode. If value is then used in further steps as an argument, it will appear as null in the report.
There are two possible solutions to this problem:
Execute hidden methods in skipped mode. This might have the problem that these methods might throw exceptions themselves if previous steps already failed.
Whenever hitting a hidden method just stop trying to further execute the scenario in skipped mode and just finish the scenario. This has the problem that following steps will not appear in the report as skipped.
Make the behavior configurable
The text was updated successfully, but these errors were encountered:
Currently
@Hidden
-annotated methods are executed like normal step methods, but just do not appear in the report. This causes problems when the hidden method is not returning the stage instance as required for step methods and then an exception is thrown in previous step methods.Example:
As JGiven captures the exception in the 2nd step and tries to execute the following methods in a skipped-mode so that they can appear in the report,
value
will benull
, because JGiven executes thegiveMeSomeValue
method in skipped-mode. Ifvalue
is then used in further steps as an argument, it will appear asnull
in the report.There are two possible solutions to this problem:
The text was updated successfully, but these errors were encountered: