带有示例的 Cucumber 场景大纲:无法创建场景运行器
Cucumber scenario outline with examples: Failed to create scenario runner
我开始从事测试自动化工作,目前遇到一个小问题。
我做了小黄瓜场景:
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.runtime.CucumberException: Failed to create scenario runner
... 21 more
有人遇到同样的问题吗?我不知道是什么问题,因为如果我删除大纲关键字和示例列表,测试是 运行...
我实施了所有步骤,没有大纲也能正常工作,但我有很多值,我不想为每个值实施步骤,这就是我需要使用场景大纲的原因
请帮我解决这个问题。
我发现了问题。我将 cucumber-junit 包更新到最新版本,但它没有向后兼容性。
这是有效的 Maven 依赖项:
<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>
我还有一篇文章 Cucumber testing guide
我开始从事测试自动化工作,目前遇到一个小问题。
我做了小黄瓜场景:
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.runtime.CucumberException: Failed to create scenario runner
... 21 more
有人遇到同样的问题吗?我不知道是什么问题,因为如果我删除大纲关键字和示例列表,测试是 运行...
我实施了所有步骤,没有大纲也能正常工作,但我有很多值,我不想为每个值实施步骤,这就是我需要使用场景大纲的原因
请帮我解决这个问题。
我发现了问题。我将 cucumber-junit 包更新到最新版本,但它没有向后兼容性。
这是有效的 Maven 依赖项:
<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>
我还有一篇文章 Cucumber testing guide