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

[Core] Set scenario result as step finishes #1430

Merged
merged 2 commits into from
Aug 25, 2018

Conversation

mpkorstanje
Copy link
Contributor

The results of a step were set on the scenario after a test step
finished. This meant that the result of the step was not available in
its after hooks.

By adding the result of the step to the scenario in TestStep we ensure
that scenario always contains the most recent result. This removes the
need to pass the scenario results around.

Additionally:

  • Scenario has moved from cucumber.runtime.ScenarioImpl to
    cucumber.runner.Scenario and made package private. This prevents the
    implementation being used outside of the API. Users of
    ScenarioImpl.getError should use an event listener to create their
    reports.

  • TestStep.run no longer requires a language parameter. With Gherkin v5
    the language is not used anywhere.

Fixes #1429
Fixes #1427

The results of a step were set on the scenario after a test step
finished. This meant that the result of the step was not available in
its after hooks.

By adding the result of the step to the scenario in TestStep we ensure
that scenario always contains the most recent result. This removes the
need to pass the scenario results around.

Additionally:

 * Scenario has moved from cucumber.runtime.ScenarioImpl to
 cucumber.runner.Scenario and made package private. This prevents the
 implementation being used outside of the API. Users of
 ScenarioImpl.getError should use an event listener to create their
 reports.

 * TestStep.run no longer requires a language parameter. With Gherkin v5
 the language is not used anywhere.
@mpkorstanje mpkorstanje changed the title Set scenario result step finishes Set scenario result as step finishes Aug 4, 2018
@mpkorstanje mpkorstanje changed the title Set scenario result as step finishes [Core] Set scenario result as step finishes Aug 4, 2018
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 85.399% when pulling cae2d65 on set-scenario-result-step-finishes into b341e5e on master.

@mpkorstanje mpkorstanje merged commit 1b0680b into master Aug 25, 2018
@mpkorstanje mpkorstanje deleted the set-scenario-result-step-finishes branch August 25, 2018 10:46
@lock
Copy link

lock bot commented Aug 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if step has failed Scenario result is not yet set when afterStep hook runs
2 participants