Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make data initialization only execute once #2207

Closed
Lovelemon88 opened this issue Dec 6, 2022 · 1 comment
Closed

How to make data initialization only execute once #2207

Lovelemon88 opened this issue Dec 6, 2022 · 1 comment
Labels

Comments

@Lovelemon88
Copy link

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?

@ptrthomas
Copy link
Member

@Lovelemon88 please ask these kinds of questions on stack overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants