How can I store a feeder value in a variable to reuse it

0

I have a feeder containing some data, for example:

name jack jim jomana

And I want to send a request that simulate the name search action

1- user start to enter the fisrt letter of the name

2- then the 3 other letters

so the requests that I want to send : get ( https/bla/bla/search?q=here I want only the first letter of the name)

get ( https/bla/bla/search?q=here I want only the 3 first letters of the name)

I know that substring(start,end) works well but my problem how can I apply it on “${name}” because when I do “${name}”.substring(0,1) => in this situation “${name}” doesn’t retrive name value “jack”

Infos: I m using scala with gatling

when I do “${name}”.substring(0,1) => in this situation “${name}” doesn’t retrive name value “jack”

Either transform your data directly on your feeder: Gatling - Feeders

Or use the Session API: Gatling - Session API

You can’t use Gatling Expression Language for this.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.