rubyselenium-webdrivercucumbercapybarasite-prism

Want to execute Background only once in Cucumber feature files for multiple scenarios


I Want to execute Background only once in each cucumber feature files for multiple scenarios. how can i do that in step files?

Feature: User can verify...........

Background: Given Enter test data for a specific logic

Scenario: Verify ......... 1 When A1 And B1 Then C1

Scenario: Verify ......... 2 When A2 And B2 Then C2

Scenario: Verify ......... 2 When A3 And B3 Then C3


Solution

  • Background is designed to run each time before each scenario. Its not good and standard as well to hack Background.