假設我有一個測試像下面(使用黃瓜) -異步步驟與黃瓜(和/或柑橘)執行
Scenario: Login successfully to Facebook
Given the user test exists
And user name and password is entered
When the login form is submitted
Then I expose a HTTP-Rest service to validate the user name and password
When I receive a validation success message
Then display the welcome message to the user
在這裏,當"the login form is submitted"
被調用時,它請求提交給一個HTTP REST服務這將使用"I expose a HTTP-Rest service to validate the user name and password"
將用戶名和密碼傳遞給另一個HTTP休息服務(將由Citrus Framework公開),這將驗證數據併發送成功響應。因此步定義爲"the login form is submitted"
和"I expose a HTTP-Rest service to validate the user name and password
「應異步執行
能否請你幫我 - 我怎麼能做到這一點用黃瓜(或/和柑橘)
注意:我不使用任何stub
應用程序公開HTTP Rest服務爲"I expose a HTTP-Rest service to validate the user name and password
「;我試圖使用Citrus
框架公開服務。
步驟定義是用java編寫的。
如果您在提交登錄表單之後再調用'Thread.sleep',該怎麼辦? – alayor
你好,直到執行完「登錄表單被提交」的時候,黃瓜纔會執行「我公開一個HTTP-Rest服務來驗證用戶名和密碼」。 我正在尋找能夠同時執行這些步驟的東西。 – Bappa