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

current jgiven versions do not work well with multiple stages #213

Open
adrian-herscu opened this issue Nov 30, 2023 · 1 comment · May be fixed by #214
Open

current jgiven versions do not work well with multiple stages #213

adrian-herscu opened this issue Nov 30, 2023 · 1 comment · May be fixed by #214
Assignees
Labels
blocked Blocked due to some external issue enhancement New feature or request
Milestone

Comments

@adrian-herscu
Copy link
Collaborator

Current State
Scenario classes have to extend with many generic types:

extends ApplicationPerMethodWebSessionTest<TestConfiguration, GoogleFixtures<?>, GoogleActions<?>, GoogleVerifications<?>>

and additional stages can be added via annotated fields or direct calls.
Annotated fields do not work with TestNG parallel modes.
Direct calls require boilder-plate like:

    protected SomeElasticSearchVerifications<?> elasticSearchVerifications() {
        val s = addStage(SomeElasticSearchVerifications.class);
        s.beforeScenarioConfigurePolling();
        return s;

Note the direct call to beforeScenarioConfigurePolling -- all JGiven annotations are not activated when stages are directly called.

How to make it better
Reusing stages should be like this:

extends ApplicationPerMethodWebSessionTest<TestConfiguration>

and then calling steps:

given(SomeFixtures.class)
  .some_step();
when(SomeActions.class)...
then(SomeVerifications.class)...
@adrian-herscu adrian-herscu added the enhancement New feature or request label Nov 30, 2023
@adrian-herscu adrian-herscu self-assigned this Nov 30, 2023
@adrian-herscu adrian-herscu added the blocked Blocked due to some external issue label Dec 4, 2023
@adrian-herscu
Copy link
Collaborator Author

TNG/JGiven#1469

@adrian-herscu adrian-herscu added this to the 2.0.0 milestone Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked due to some external issue enhancement New feature or request
Projects
None yet
1 participant