在場景大綱中,如果有2個或更多場景,則所有功能步驟都將針對其他2個場景中的兩個場景執行。如何繞過黃瓜功能文件中的重複步驟執行?
但我只需要執行一個步驟之一即登錄步驟。
例如:
Scenario Outline: Acceptance page has <Application> logo appearing on top
Given I am signing up in <Application> #I want to run this step only once
And I navigate to "Dashboard" page # I want to run this step only once
Then I should see "header logo" exist
And I should see "footer" exist
And I should expect the following elements to be visible
| element |
| Legal |
| Privacy |
| Security |
| Cookies |
Examples:
| Application |
| Gmail |
在上述特徵文件,我想登錄應用僅一次,並驗證的步驟其餘部分。
當前對於每個驗證步驟,登錄事情都會一次又一次地發生。
請建議我如何運行登錄步驟一次,並可以檢查頁面上的多個項目。
難道你不需要運行'鑑於我在每個例子中註冊'?這與您的評論所說的只運行一次不兼容。 –
另外,你正在使用哪個Cucumber實現?它不能同時是cucumber-jvm和cucumberjs。 –
我想(或希望)你混淆註冊登錄。 – kiedysktos