黃瓜版本: 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
我不確定為什么第一個輸入中的第一個引數“語言”單獨列印位置下給出的“tt”。我從第二個輸入中看不到這樣的問題。有什么幫助嗎?
uj5u.com熱心網友回復:
請檢查“test”和“tt”之間的分界線(即|)之間是否有任何特殊的隱藏字符

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/453400.html
