2017-10-11 33 views
0

黄瓜步不起作用:数据表的Arity不匹配。作品的IntelliJ和行家

When config API Client creates a **multiple** layers to **3** catalogs "**catalog_name**" 
     | PAR1 | layer_name1 | 
     | PAR2 | layer_name2 | 
     | PAR3 | layer_name3 | 

步骤定义:

@When("^config API Client creates a (multiple|single) layers to (\\d+) catalogs \"([^\"]*)\"$") 
public void configApiClientPushesMultipleConfig(String layers, int catalogNum, String catalogId, Map<LayerTypeEnum, String> layerTypesAndIds) throws Throwable { 

.... }

这工作完全当我通过intellij运行它,它在maven中出现此错误失败:

cucumber.runtime.CucumberException: Arity mismatch: Step Definition '...' with pattern [^config API Client creates a (multiple|single) layers to (\d+) catalogs "([^"]*)"$] is declared with 4 parameters. However, the gherkin step has 3 arguments [multiple, 3, catalog_name]. 
Step: When config API Client creates a multiple layers to 3 catalogs "catalog_name" 

我试过黄瓜JVM版本1.2.0,1.2.4,1.2.5

能否请您指点我在做什么错了,我怎样才能使它可行的行家 谢谢!

回答

0

传递给public void configApiClientPushesMultipleConfig()的参数个数(4个参数)不同于你的小黄瓜步骤(3)中的参数个数。所以你期望4个参数为你的方法,但你只提供你的黄瓜步骤3.

+0

有数据表必须被视为第四参数 – SeraphimaTW

0

因此,在我的项目中我使用cucable maven插件并行运行。将此插件版本从0.0.4更新到0.0.8可解决问题。

相关问题