Cucumber scenario outline with examples: Failed to create scenario runner

8.3k views Asked by At

I'm started work on test automation and at the moment I have a small problem.

I made the Gherkin Scenario:

Feature: Post Draft

  Scenario: Successful Login with Valid Credentials
    Given User go to Admin Page
    Then User enters UserName and Password

  Scenario Outline: Successful creation post draft
    Given User navigate to pages list
    Then User open page with ID <postsIds> for editing
    Then User navigate to Advertising tab
    Then User check custom ads code radio button
    And Insert custom advertising code
    Then User save post
    And See that custom ads code is appears

    Examples:
      | postsIds |
      | 61591    |
      | 62231    |
      | 61827    |
      | 63300    |
      | 62023    |
      | 62231    |

And When I trying to execute this scenario I'm got the error:

cucumber.runtime.CucumberException: Failed to create scenario runner
    ... 21 more

Have someone the same problem? I have no idea what the problem, because if I delete Outline keyword and Examples list, test is running...

I implemented all steps, and it's works without Outline, but I have a lot of values and I don't want to implement steps for each value, that why I need to use Scenario Outline

Please, help me to resolve this issue.

1

There are 1 answers

2
Dmytro Medvid On BEST ANSWER

I found the problem. I updated cucumber-junit package to latest version and it's haven't backward compatibility.

Here is Maven dependencies, that works:

<dependencies>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-picocontainer</artifactId>
        <version>1.1.8</version>
    </dependency>
    <dependency>
        <groupId>info.cukes</groupId>
        <artifactId>cucumber-junit</artifactId>
        <version>1.1.8</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
    </dependency>
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-server</artifactId>
        <version>2.42.2</version>
    </dependency>
</dependencies>

GHERKIN: SCENARIO OUTLINES

Also I have an article with Cucumber testing guide