Olivier
Olivier

Reputation: 445

Karate : repeat a request

I want to repeat 6 times a post request of a scenario:

Given url <url>
And path 'toto'
And header Authorization = 'Bearer ' + <token>
And request processData.signer1
When method post
Then status 201

I have seen the "repeat" method in the documentation, but I have the impression that it is not suitable for my case

Thanks

Upvotes: 1

Views: 847

Answers (1)

Peter Thomas
Peter Thomas

Reputation: 58058

Use 2 feature files. Then you can do this:

* karate.repeat(3, () => karate.call('called.feature'))

Upvotes: 2

Related Questions