taverntesting/tavern

Is there a way to have the stage repeated multiple times, like in a loop

bharatid opened this issue · 3 comments

Is there a way to have the stage repeated multiple times, like in a loop

Want to call the same stage multiple times. Is there a way to do that?

Sorry, closed it inadvertently

There isn't a way to do that, you can either use a YAML anchor to repeat the stage in the test like this

stages:
  - &to_repeat
    name: stage to repeat
    request:
     ...

  - <<: *to_repeat

  - <<: *to_repeat

Or use the retry mechanism if you want a stage repeated 'until it passes'