Ich habe die Gurkenfunktion wie unten. Ich möchte, dass der Hintergrund nur einmal ausgeführt wird, nicht für jede Zeile in den Beispielen. Wie mache ich das.Hintergrund nur einmal in Gurke ausgeführt werden
Feature: Massenimport von Portfolios über die Benutzeroberfläche
Background: Bulk import of portfolios and treaties
Given the user logs into “dev” environment as “User ” with password "Password1"
And the user Chooses to import a portfolio providing SQLServer as "10.10.10.10”
And the user chooses uploaded Anytime
And the user enters the filter criteria for “Client_EDM”
And the user expands the Edm
And the user expands the portfolios dropdown
And the user chooses the Name as "UK COM for v0.7"
And the user chooses the contract as ""
Scenario Outline: Import of portfolio
Given the user clicks on Import button
And the user specifies the ImportJobName as "<ImportName>"
And the user specifies the project "<EDM>"
And the user specifies the structure "<StructureName>"
And the user submits a portfolio for Import
Examples:
| EDM | ImportName | StructureName|
|Client1_EDM|EUFL_UK_Com_Import100|EUFLCom_Import101|
|Client2_EDM|EUFL_UK_Com_Import101|EUFLCom_Import101|
Tagging das Szenario Umriss als @attribute oder das Hinzufügen von @Before für jeden der Hintergrundschritt wird nicht mein Problem lösen .. Irgendwelche Vorschläge, wie es weiter gehen darüber, es zu tun.
ganze Idee von Hintergrund ist jedes Mal für jedes Szenario ausgeführt werden. Vielleicht macht es Sinn, diese Schritte in eine andere Datei zu trennen und sie zuerst auszuführen? Oder möchtest du @after Annotation verwenden und bereinigen, nachdem dein Test ausgeführt wurde? – Mikhail