b3lowster
b3lowster

Reputation: 445

How to change uri path while repeating in gatling

I have a question regarding Gatling test framework and scala

Let's assume that I have such kind piece of code:

.repeat(100) {
      exec(
        http("get-user")
          .get("/users/1")
      )
    }

But what should I do whether I want to pass another {id} (not only /id/1) in uri path? Might be this question regarding scala programming?

UPDATE I have an end point /users/{id} (GET) So I want to test performance this endpoint in such way: /users/1, /users/2, /users/3 ... etc and seems I'm able to use for that .repeat(100) but I need to figure out how to cnahge {id} in the new iteration. Actually may be it's a wrong approach and I should make separated request for each {id}

Thx in advance

Upvotes: 0

Views: 178

Answers (1)

Stephane Landelle
Stephane Landelle

Reputation: 7038

Such a basic use case is of course demoed in the basic and advanced tutorials.

Upvotes: 1

Related Questions