1
我有以下情形的輪廓黃瓜不讀場景輪廓數據
Background:
Given customer is in hot or not page
Scenario Outline: Hot article
And customer enters <name>
And submits
And customer clicks thumbs up
Then ensure the TBD
Examples:
| name |
| Elliot |
| Florian |
並按照分步實施 -
@And("customer enters <name>")
public void customer_enters_name(String name) throws Throwable {
// Express the Regexp above with the code you wish you had
Thread.sleep(10000);
}
但是,當我執行測試,然後我得到下面的錯誤 -
您可以使用以下代碼段實施缺失步驟:
@Given("^customer enters Elliot$")
public void customer_enters_Elliot() throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
@Given("^customer enters Florian$")
public void customer_enters_Florian() throws Throwable {
// Express the Regexp above with the code you wish you had
throw new PendingException();
}
我執行測試步驟是否錯誤?
嘗試使用「」(用引號括起)而不是 –
Bala
這個工作,你能標記你的評論作爲答案,我會接受它:) – Tarun