0

我从 Itellij IDEA 运行这个。

我有必要的插件和驱动程序,但无法弄清楚为什么会出现此错误。

在此处输入图像描述

请在图片中找到代码

在此处输入图像描述

Exception in thread "main" cucumber.runtime.CucumberException: Error parsing feature file C:/Users/IBM_ADMIN/IdeaProjects/redbusservices/src/test/resources/feature/Login.feature
    at cucumber.runtime.FeatureBuilder.parse(FeatureBuilder.java:133)
    at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:104)
    at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54)
    at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34)
    at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:239)
    at cucumber.runtime.Runtime.run(Runtime.java:111)
    at cucumber.api.cli.Main.run(Main.java:36)
    at cucumber.api.cli.Main.main(Main.java:18)
Caused by: gherkin.lexer.LexingError: Lexing error on line 1: 'Feature : Scenarios for login into Redbus
4

1 回答 1

0

功能文件中 Feature 关键字后(或冒号前)有一个空格。请按如下所示将其删除,然后错误将消失。

Feature: Scenarios for login into Redbus
于 2018-06-28T07:40:14.853 回答