cucumber-ruby: Running Scenario by line number from within Scenario doesn't work

Summary

I used to be able to run cucumber feature_file_name.feature:XX with XX being a line anywhere in the scenario (usually the line that failed last time, to easily re-run a failure) but now it only works if XX is the number of the “Scenario” heading line.

Expected Behavior

cucumber feature_file_name.feature:XX should run the Scenario, from the beginning, that contains line XX.

Current Behavior

The Scenario does not run, and the following output is produced.

0 scenarios
0 steps
0m0.000s

Steps to Reproduce (for bugs)

  1. Run any Scenario (with cucumber feature_file_name.feature:XX) from the command line, tagging the line number of any line within the scenario other than the “Scenario” heading

Your Environment

ruby 2.7.1 MacOS 10.15.6 cucumber-rails 2.1 cucumber 4.1.0

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 38 (34 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @BARK-PHOLLAND

This in theory is now fully fixed and released in v9.2.0 on rubygems now. A massive shoutout needs to go to @botandrose for doing 95% of the work, with a few minor refactors and reviews from myself.

To anyone else monitoring this issue. Can you place a 👍 if this now is fixed for you and a 👎 if it’s not fixed. Based on the emojis I see in the remainder of march I’ll mark this as closed as fixed or not.

@luke-hill From my brief experimentation, no, there has been further regression of the line number functionality. Every line number I tried resulted in 0 scenarios, and I tried line numbers for tags, features, scenarios, and steps.

Additionally, running :1 used to run all scenarios, now it runs zero.