@Documented
@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface NestedSteps
Nested steps are useful if you want to group certain steps together under a new description. This allows you to give a larger scenario more structure and make it better readable
@NestedSteps public NestedStage I_fill_out_the_registration_form_with_valid_values() { return I_enter_a_name( "Franky" ) .and().I_enter_a_password( "password1234" ) .and().I_enter_a_repeated_password( "password1234" ); }The resulting console report will look as follows:
Given I fill out the registration form with valid values I enter a name Franky And I enter a email address [email protected] And I enter a password password1234 And I enter a repeated password password1234In the HTML report nested steps can be expanded and collapsed