Usman Ismail
Usman Ismail

Reputation: 18679

Gatling processing or formatting feeder data?

In gatling how would I read data from a feeder and format it before it's fed to the exec statement? I want something like the following. Where I inject the value of queryData from the feeder but apply the formatData function on the input before passing the string into the get function. T

val scn = scenario("QueryRun")
    .repeat(10) {
        feed(queries)
        .exec(http("${queryname}").get("/test?input=" + formatData("${queryData}") ))
        .pause(200 milliseconds)
}

he formatted data may not preserve the ${queryData} string so I cannot just return a string from formatData with the queryData parameter in there.

Upvotes: 1

Views: 661

Answers (1)

Stephane Landelle
Stephane Landelle

Reputation: 7038

Feeder API provides a convert operation. Please read the documentation.

Upvotes: 1

Related Questions