1
在我的特點,我有:如何在場景大綱示例中加入一個值(空手道框架)?
* def loc = responseHeaders['location'][10]
* def id = loc.substring(loc.lastIndexOf('/') + 1)
而且我想在方案概述實例使用ID:
Scenario Outline: fkdfslqknfd
Given url 'foo.com'
And path <bar>
When method get
......
Examples:
|bar |
|(id)|
|"id"|
|'id'|
|id |> The last example is ok.
而不是接收'foo.com/13'
但(假定該ID是13)我有'foo.com/id'
。我嘗試了#,但它不起作用。我怎樣才能取代這個ID?我需要測試此字符串格式的ID。謝謝
感謝您的快速回復。這個問題不在動態示例中。我沒有解釋清楚。我事先知道我會有多少例子。我只需要把字符串形式的ID。而不是像這裏寫下13這樣的例子: | bar | |(13)| |「13」| | '13'| | 13 |我需要把id放在「」和「'這裏例如: | bar | |(id)| |「id」| |'id'| | id |但不是url/13我有url/id – nirind