黄瓜步骤
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
你能否告诉我我做错了什么以及如何让它对maven起作用 谢谢!
答案 0 :(得分:0)
传递给public的config(4 args)的数量无效configApiClientPushesMultipleConfig()与小黄瓜步骤(3)中的参数数量不同。所以你希望你的方法有4个参数,但是你只在你的小黄瓜步骤中提供了3.
答案 1 :(得分:0)
所以,在我的项目中,我正在使用cucable maven插件进行并行运行。将此插件版本从0.0.4更新为0.0.8可解决此问题。