谷歌搜索此错误消息无果而终
features/manage_hand_evaluator.feature:在features/manage_hand_evaluator.feature:21处出现解析错误。找到了需要以下其中之一的示例: comment、py_string、row、scenario、scenario_outline、step、tag。(当前状态:步骤)。(Gherkin::Parser::ParseError)
这是我的示例设置部分(目前没有其他场景,只有"Feature:“部分之后的这个场景)
..。
Scenario: Evaluating for current
我正在使用Cuke4Nuke的0.3.1版本,在用英语以外的语言定义我的特性文件时遇到了问题。谷歌并没有带来任何解决方案,所以我的问题很简单: Cuke4Nuke是否支持用英语以外的其他语言定义功能?
我尝试使用GitHub的Cucumber存储库中的示例。下面是一个不起作用的特性示例:
# language: no
Egenskap: Summering
For å unngå at firmaet går konkurs
Må regnskapsførerere bruke en regnemaskin for å legge sammen tall
Scenario: to t
我正在尝试创建一个与以下内容匹配的正则表达式:
Given I'm a user
Given I am a user
Given Dylan is a user
这就是我的步骤定义:
@Given("^(?:(I)'m|(I) am|(.+) is) a user$")
public void aUserExists(String username) throws Throwable {
}
它与我所需要的匹配,但似乎Cucumber试图将非捕获组中的每个捕获组分配给一个参数,而我希望它只分配一个:
cucumber.runtime.CucumberExcep
我正在尝试将Cucumber与Test Rail集成。所以我有一个Cucumber Ruby自动化设置。
我希望能够将Cucumber Gherkin步骤从功能文件作为变量传递到自动化中。
这是因为我想将Cucumber Gherkin步骤作为HTTP POST发送到测试管理系统中。
小黄瓜功能文件示例:
Scenario: login scenario
Given I am on webpage
When I login
Then I should see that I am logged in
步骤定义代码:
Given(/^I am on webpage$/) d
我想要同样的Gherkin判决(带附庸者和不附庸者):
Gherkin与参数:
When a 'notify' message is sent to the green box with the properties.
|type|message|
|error|The error message|
没有参数的Gherkin:
When a 'notify' message is sent to the green box with the properties.
爪哇(黄瓜):
@When("^a '(.*)' message is
I am unable to parse my feature file in cucumber while running i am getting following error, i am creating a BDD test framework to do API testing using cumber feature file concept
io.cucumber.core.gherkin.FeatureParserException:未能解析资源at: file:///D:/NodeApiTesting/APITestingNode/src/test/resources/fu
我有下面的场景大纲
@Example
Scenario Outline:
Given that I have gone to the Google page
When I add <animal> to the search box
And click the Search Button
Then "<term>" should be mentioned in the results
Examples:
| animal |
我不确定这个话题最近是否已经被讨论过了,但是我真的很沮丧自己在网上搜索,尝试了几个指南和修复。我做了那么多事情,我实在说不出我已经做了什么:
所以我试着在Windows1064位上运行卡拉巴斯-安卓系统,我遵循了上的步骤,安装了ruby,Ant和DevKit。当我现在尝试使用以下方法运行测试时:
calabash-android run app-release.apk
我得到了这样的输出:
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured ou
从Cucumber-JVM 2.X迁移到Cucumber-JVM 5.5.0之后,我面临着使用正则表达式和可选捕获组的现有步骤防御系统的问题。
对于Version2.x,当gherkin步骤中没有可选文本时,步骤定义方法获得空值。
对于5.5.0版本,如果我没有在gherkin步骤中提供可选文本,那么我就会出现异常。
场景
Scenario: cucumber expression vs regular expression
And text aaaa text2
And text text2
GlueCode
@Given("^text(?: (.+))? text2$
如果我的特征定义中有这样一个子句:
Then I can see the "/relative-url-path" page
Cucumber将采用这种方法:
@When("^I can see the \"([^\"]*)\" page$")
public void I_open_the_page(String arg1) {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
如果我确实想用
我在新的syntaxe ()中使用Cucumber-JVM4.x.x
我在d和écran之间有一个撇号,所以gherkin句子与我的java (黄瓜)不匹配。
@Et("Je sauvegarde une capture d'écran dans {string}")
我的Gherkin档案是:
# language: fr
@bonjour
Fonctionnalité: bonjour (Fonction pour valider l environnement.)
Plan du Scénario: Function to validate the envir
在我的黄瓜应用程序中有以下步骤定义:
@Then("Client {string} just received {int} {string}")
@Then("Client {string} just received {int} messages, a {string} and a {string}")
public void clientJustReceivedRequestReject(String session, int numMessages, String message, String... additionalMessages) throws
我正在将我的cucumber版本从旧的info.cukes更新到最新的io.cucumber (v6.8.1),现在我在java.lang.IllegalArgumentException at BuiltInParameterTransformer.java:114上的一些测试失败了 如何在新的cucumber中传递字符串列表作为参数? 我读过this answer,但它对我不起作用。你可以在下面找到一个例子来重现我的问题: Scenario Outline: Testing lists of strings
When Great test <first> <
我正在使用Intellij IDEA。我在项目中编写了2个java类和1个特性黄瓜文件。特征结构是:
Feature: First test
with Cucumber
Scenario: Testing
Given file.xml from ext
When take project path
Then run test
此外,我还用jUnit为RunTest编写了一个Cucumber.class java类:
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
impo
我刚刚安装了IntelliJ的社区版和黄瓜集成。当我尝试运行一个特性时,我得到了下面的错误。我该如何解决这个问题?我有cucumber-core 4.7.2和gherkin 7.0.4。 Feature: OrangeHRM Login
Scenario: Logo presence on OrangeHRM home page
Given I launch chrome browser
When I open orangeHRM homepage
Then I verify that the logo present on page
And close
我用java编写,并使用黄瓜和eclipse搜索具有以下要求的类似IP的字符串
应该接受四位数字序列,在这些句点中,数字序列定义如下:任何单数,如果第一个字符为非零,则任何两位字符,一个后面跟着一个零,一个或两个后面跟着任何数字。
通过在Stepdefs.java文件中编写适当的正则表达式,这就是我所写的
@When("^test_ip_address ((?:(\\d)|(1[0-2]\\d)|([1-9]\\d))\\.){3}(?:(\\d)|([1-9]\\d)|(1[0-2]\\d))$")
public void test_ip_address(String ar
这绝对让我恼火得要死,我该怎么办?
Guard is now watching at '/home/pma/Sites/somesite.com'
Starting Spork for RSpec & Cucumber
/home/pma/.rvm/gems/ruby-1.9.2-p180/gems/spork-0.9.0.rc9/lib/spork/test_framework/rspec.rb:2: warning: already initialized constant DEFAULT_PORT
/home/pma/.rvm/gems/ruby-1.9.2-p
大家好,
我在功能文件上执行了以下步骤
When I log in with invalid credentials
在stepsDefinition类中
@When("^I log in with (wrong|invalid) credentials$")
public void login(){
}
我想使用正则表达式在我的功能步骤中使用错误或无效的单词,但是我得到了这个错误
with pattern [^I log in with (.*) credentials$] is declared with 0 parameters. However, the gherki
我需要一点帮助。我如何解决这个问题?
当我调用cucumber时,会得到以下错误:
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic
on/) to get coloured output on Windows
WARNING: cannot load such file -- 2.2/gherkin_lexer_en
Couldn't load 2.2/gherkin_lexer_en
The $LOAD_PATH was:
lib
C:/Ruby22/lib/ruby
当我尝试安装cucumber 0.93时,这个错误被触发。我需要安装这个特定的版本。
trabajo@fernando-Inspiron-1545:~/cucumber-rspec$ gem install cucumber -v 0.9.3
Building native extensions. This could take a while...
ERROR: Error installing cucumber:
ERROR: Failed to build gem native extension.
/home/trabajo/.rvm/rubies/ruby-1.