黄瓜示例输入接收不正确
Cucumber example inputs are received incorrectly
黄瓜版本:11.0
遇到第一个示例输入参数与其他列值一起使用的奇怪问题。
**Feature:** Some feature
@foo
**Scenario Outline:** Testing.
Given Send Request and Validate response <language> <location> <address>
**Examples:**
| language | location | address |
| test | tt | foo |
| test pp | mm | boo |
@Given("^Given Send Request and Validate response (.*) (.*) (.*)$")
public void Send_Request_and_Validate_response(String language, String location, String address) throws Throwable {
System.out.println("The language is " + language);
System.out.println("The location is " + location);
预期:-
The language is test
The location is tt
The language is test pp
The location is mm
实际:-
The language is test tt
The location is foo
The language is test pp
The location is mm
我不确定为什么第一个输入中的第一个参数 'language' 单独打印在位置下给出的 'tt'。我从第二个输入中看不到这样的问题。有帮助吗?
请检查“test”和“tt”之间的分界线(即|)之间是否有特殊隐藏字符
黄瓜版本:11.0
遇到第一个示例输入参数与其他列值一起使用的奇怪问题。
**Feature:** Some feature
@foo
**Scenario Outline:** Testing.
Given Send Request and Validate response <language> <location> <address>
**Examples:**
| language | location | address |
| test | tt | foo |
| test pp | mm | boo |
@Given("^Given Send Request and Validate response (.*) (.*) (.*)$")
public void Send_Request_and_Validate_response(String language, String location, String address) throws Throwable {
System.out.println("The language is " + language);
System.out.println("The location is " + location);
预期:-
The language is test
The location is tt
The language is test pp
The location is mm
实际:-
The language is test tt
The location is foo
The language is test pp
The location is mm
我不确定为什么第一个输入中的第一个参数 'language' 单独打印在位置下给出的 'tt'。我从第二个输入中看不到这样的问题。有帮助吗?
请检查“test”和“tt”之间的分界线(即|)之间是否有特殊隐藏字符