Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Cucumber场景大纲及示例:无法创建场景运行器_Java_Testing_Junit_Cucumber - Fatal编程技术网

Java Cucumber场景大纲及示例:无法创建场景运行器

Java Cucumber场景大纲及示例:无法创建场景运行器,java,testing,junit,cucumber,Java,Testing,Junit,Cucumber,我开始了测试自动化的工作,目前我有一个小问题 我制作了小黄瓜场景: 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 n

我开始了测试自动化的工作,目前我有一个小问题

我制作了小黄瓜场景:

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    |
有人有同样的问题吗?我不知道是什么问题,因为如果我删除大纲关键字和示例列表,测试正在运行

我实现了所有步骤,没有大纲也可以,但是我有很多值,我不想为每个值实现步骤,这就是为什么我需要使用场景大纲


请帮我解决这个问题。

我发现了问题。我将cucumber junit包更新为最新版本,它没有向后兼容性

以下是Maven依赖项,它可以工作:


信息杯


我还有一篇文章写得很酷!非常感谢你的帮助!cucumber 2.x似乎已移动到
io.cucumber
组。
cucumber.runtime.CucumberException: Failed to create scenario runner
    ... 21 more