【发布时间】:2018-07-02 20:23:50
【问题描述】:
我正在使用示例输入电子邮件,但是当我运行 junit runner 文件时,它给了我错误:
" Failed to create scenario runner"
我的 Junit 跑步者代码:
package Runner;
import org.junit.runner.RunWith;
import cucumber.api.junit.Cucumber;
import cucumber.api.junit.Cucumber.Options;
@RunWith(Cucumber.class)
@Options(features="Features",glue={"stepdefinition"})
public class GmailRunner {
}
这是我的功能文件:
Feature: Smoke test of Gmail
@GmailSignin
Scenario Outline: Click on Sign in
Given Open chrome
When I go to gmail and click on Sign in
When I enter "<emailid>"
Then I click on next
Examples:
| emailid |
| sarveshsingh.03 |
我正在使用 Cucumber-junit-1.1.2 和 junit-4.11
请帮忙
【问题讨论】:
-
您可以尝试升级您的 cucumber-junit 吗?
-
先生,我在阅读了 3.0.2 的一些解决方案后尝试了该方法,但它也不适用于该方法
-
检查您的 pom.xml 并查看依赖项是否正确
-
好的,先生,但我正在使用java项目,我是否还必须在java项目中添加依赖项???
标签: selenium automation cucumber bdd