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

Adapt to using the Gherkin compiler and Pickles in the core #1309

Merged
merged 2 commits into from
Jul 26, 2018

Conversation

brasmusson
Copy link
Contributor

Summary

Adapt to using the Gherkin compiler and Pickles in the core

Details

Notable consequences:

  • Test Step does not know the Keyword of the step, therefore is the exception backtrace line for the step changed. Before:
  features/test.feature:3:in `Given this step is undefined'

After:

  features/test.feature:3:in `this step is undefined'
  • The backtrace line for the step that preceeds an After Step Hook is not added to the exception backtrace for After Step Hooks.
  • The Test Step for Test Cases from Scenario Outlines contains both lines from Pickle Step location which are printed in the exception backtrace. On the other hand does the exception backtrace not contain a line both for the outline step and the expanded outline step. Before:
       ./features/step_definitions/steps.rb:3:in `/^this step is pending$/'
      features/scenario_outline.feature:10:in `Given this step is pending'
      features/scenario_outline.feature:4:in `Given this step <type>']]>
     ./features/step_definitions/steps.rb:3:in `/^this step is pending$/'
      features/scenario_outline.feature:10:4:in `this step is pending']]>
  • The name of the Test Cases from Scenario Outlines is the name of the Pickle, which means that there will be placeholder expansion in names of Scenario Outline, but the Test Case name will not have any data from the Examples table name or the Examples table row.
  • The Cell data from the Examples table is not available to step definitions.
  • The formatter used the data from the GherkinSourceParsed event to get data from the Gherkin Ast needed for reporting.
  • Comments from the Feature Files are not included in the Json Formatter output (because it is hard or even impossible to correctly associate the comments and the Ast node the used intended they to be associated with).

Depends on cucumber/cucumber-ruby-core#156.

Motivation and Context

See cucumber/cucumber-ruby-core#156.

How Has This Been Tested?

The automated test suite has been updated to verify the new and changed behavior.

Types of changes

  • Refactor (code change that does not change external functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I've added tests for my code
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Notable consequences:
* Test Step does not know the Keyword of the step, therefore is the
  exception backtrace line for the step changed.
* The backtrace line for the step that preceeds an After Step Hook is
  not added to the exception backtrace for After Step Hooks.
* The Test Step for Test Cases from Scenario Outlines contains both
  lines from Pickle Step location which are printed in the exception
  backtrace. On the other hand does the exception backtrace not contain a
  line both for the outline step and the expanded outline step.
* The name of the Test Cases from Scenario Outlines is the name of the
  Pickle, which means that there will be placeholder expansion in names
  of Scenario Outline, but the Test Case name will not have any
  data from the Examples table name or the Examples table row.
* The Cell data from the Examples table is not available to step
  definitions.
* The formatter used the data from the GherkinSourceParsed event to get
  data from the Gherkin Ast needed for reporting.
* Comment from the Feature Files are not included in the Json Formatter
  output.
Also, the class StepArgument is only used in the Wire plugin, so move
it to Cucumber-Wire.
@brasmusson brasmusson force-pushed the use-pickles branch 2 times, most recently from 3042b22 to 486e4fe Compare July 26, 2018 14:03
@brasmusson brasmusson merged commit 486e4fe into master Jul 26, 2018
brasmusson added a commit that referenced this pull request Jul 26, 2018
…ore'

Also update Changelog.md and Gemfile.
@brasmusson brasmusson deleted the use-pickles branch July 26, 2018 14:21
@lock
Copy link

lock bot commented Jul 26, 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 Jul 26, 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.

1 participant