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.

EDIT: after this question, we decided to add the option to
karate.setupOnce()that achieves this in a more elegant way: https://github.com/karatelabs/karate/issues/2210Here is your solution. You can run it and see for yourself.