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

Nested Steps #17

Closed
janschaefer opened this issue Sep 6, 2014 · 1 comment
Closed

Nested Steps #17

janschaefer opened this issue Sep 6, 2014 · 1 comment

Comments

@janschaefer
Copy link
Contributor

The idea of steps is the following. Often you want to hide certain details of a step, because they are not directly important for a certain scenario. For example:

when().I_fill_out_the_registration_form_with_valid_values();

will fill out the registration form with valid values, but the concrete values are not shown. If a developer is interested in the concrete values she can look into the implementation of the step. However, in the report these details are completely gone. Thus, if someone reads the report and he wants to know the values, he has to ask a developer.

Nested Steps

Nested steps are steps that happen within another step. For example, the above step could be defined as follows:

public SELF I_fill_out_the_registration_form_with_valid_values() {
    return I_enter_as_name("Franky")
        .and().I_enter_as_email_address("[email protected]")
        .and().I_enter_as_password("password1234")
        .and().I_enter_as_repeated_password("password1234");
}

The idea is now that in the generated report these sub-steps can be made visible somehow. For example by expanding the parent step. That way, the original scenario stays small, but the details can still be looked up.

Annotation

Nested steps should get an additional annotation @NestedSteps to indicate that the step contains sub-steps.

@janschaefer janschaefer modified the milestones: v0.4.0, v0.5.0 Sep 7, 2014
@janschaefer janschaefer modified the milestones: v0.6.0, v0.5.0 Sep 20, 2014
@janschaefer janschaefer modified the milestones: v0.6.0, v0.7.0 Dec 23, 2014
@janschaefer janschaefer removed this from the v0.7.0 milestone Feb 10, 2015
@janschaefer janschaefer changed the title Meta Steps Nested Steps Aug 8, 2015
albertofaci added a commit to albertofaci/JGiven that referenced this issue Dec 7, 2015
@janschaefer
Copy link
Contributor Author

Thank you for starting this long-wished feature :-). On a first glance it looks pretty good. I will give you more feedback as soon as possible.

@janschaefer janschaefer added this to the v0.10.0 milestone Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant