question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to run specific examples from scenarios by file name and line number

See original GitHub issue

Hi @jan-molak, there seems to be an issue when running specific examples or scenarios by file name & line number in the latest version of protractor-cucumber-framework.

This is our current setup:

    "cucumber": "^5.0.3",
    "protractor": "^7.0.0",
    "protractor-cucumber-framework": "^6.1.1",

After upgrading protractor-cucumber-framework to 8.2.11 we’re seeing the following issue:

Steps to reproduce:

  • Having a feature with 2 or more examples, e.g.:
1. Feature: Dummy feature
2.  Scenario Outline: Dummy feature
3.    Given I load some website
4.    When I do action number <param>
5.    Then something happens
6. 
7.    Examples:
8.      | param |
9.      | 1     |
10.     | 2     |
  • In your config from protractor.conf.js file, specify specs to run as specs: ['features/dummy.feature:10']
  • Execute npx protractor protractor.conf.js

Expected result:

  • Only example from line 10 is executed

Actual result:

  • All examples are executed

After some investigation, this seems to be related to serenity, as we were able to reproduce the issue with the protractor-cucumber-framework-demo from serenity-js project.

Could you review this, please? This is a complete blocker for us.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
jan-molakcommented, Feb 8, 2022

You’re welcome, thanks for confirming.

However, we’re now seeing some failures in after hook coming from serenity-js

Could you please try to fork https://github.com/serenity-js/protractor-cucumber-framework-demo/ and try to reproduce the issue?

1reaction
jan-molakcommented, Feb 3, 2022

@WarioNeila86 - can you please update to protractor-cucumber-framework version 8.3.0 and let me know the results on your end? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running Scenario by line number from within ... - GitHub
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...
Read more >
cucumber: how to run specific scenario from a feature file
Use the --name REGEXP command line argument to run only the scenarios that match the regular expression REGEXP:
Read more >
Run specific scenarios - Cli - Cucumber - Relish
You can choose to run a specific scenario using the file:line format, or you can pass in a file with a list of...
Read more >
How to Run Cucumber Test from Command Line / Terminal
If we want to run single Scenario from the cmd, this is how we specify : mvn test -Dcucumber.options="feature file path" + "line...
Read more >
Tutorial — behave 1.2.6 documentation - Read the Docs
Feature: showing off behave Scenario: run a simple test Given we have ... filename and line: The file name (or “<string>”) and line...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found