mercredi 27 février 2019

Why Steps with parenthesis doesn't match in Groovy/Java Code when using Katalon/Cucumber?

Setting up:

The feature file does not allow to modify and it shows below.

Feature: create news
  Scenario: company check the news
    Given Java has a news with number (100)

Step definition in Katalon / Groovy Code / Cucumber :

@Given("(.*) has a news with number ((\\d+))")
def check_user__with_news_number(String name, String num){

}

I had tried to use (something) but the katalon does not recognized it

error: Step Java has a news with number (100) does not have a matching glue code

Katalon Studio Version: 6.0.4 Build: 1

Groovy Compiler version 2.4.7

Java 8

Also: I had checked those issues already but the problem still is there

https://github.com/cucumber/cucumber/issues/107

https://docs.cucumber.io/cucumber/cucumber-expressions/#escaping

https://github.com/cucumber/cucumber/issues/103

Aucun commentaire:

Enregistrer un commentaire