cucumber - 如何解决黄瓜中的“cucumber.runtime.CucumberException: gherkin.ParserException$CompositeParserException: Parser errors:”问题
问题描述
功能文件:
Feature: Claims Regression suit scenarios using BDD
@Test
Scenario: Log in to AUT as ClaimAssistant with valid credential.
Given Browser is launched successfully
步骤定义文件:
@Given("^Browser is launched successfully$")
public void Browser_is_launched_successfully() throws InterruptedException, IOException
{
System.setProperty("webdriver.chrome.driver", "U:\\Claims Jar\\ChromeDriver\\chromedriver_win32\\chromedriver.exe");
driver=new ChromeDriver();
driver.get("https://www.google.com");
driver.manage().window().maximize();
}
测试运行器类文件:
package Runner;
import org.junit.runner.RunWith;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(
features="Feature",
glue={"stepDefn"},
plugin = { "pretty", "html:target/cucumber-reports"},
tags="@CO_Login_Test_ClaimAssistant" ,
dryRun= true ,
monochrome = true
)public class TestRunner {}
解决方案
推荐阅读
- c# - Active Directory 对象已经存在,使用 SetPassword 和新对象 []{}
- bash - 如何将 ```zenity --password``` 输入到变量中?
- javascript - 使用 Typescript 从字符串中获取特定字符
- assembly - 多周期数据路径中固定的 RegWrite 控制信号的影响?
- python - 如何创建距离矩阵
- node.js - 为什么我无法从我的 Swift 代码和我的 node.js 云函数代码中获取我的 Plaid 链接令牌?
- jinja2 - 我最近安装了 superset 1.01 版,但在 SQL Lab 页面上看不到参数按钮。我以管理员角色登录
- ios - AdMob 广告停止展示
- javascript - 获取html表格的rowdata innerHTML输入值
- c - 语义版本控制:更改*应该*通过库函数分配的非透明结构