In this feature file, the @setup Scenario will run twice due to there are two other scenarios outline use it Feature:
@setup Scenario:
def data = [{a: 1}, {a: 2}, {a: 3}] Scenario Outline: row
print 'a: ', a
Examples: | karate.setup().data |
Scenario Outline: test row
- print 'test a: ', a
Examples: | karate.setup().data |
how to make the Scenario with @setup only run once?
I want make the Scenario with @setup only run once.

oncekeyword in the Scenario Outline. This keyword can be used to ensure that a particular set of steps is only executed once in a given test run