How to execute sequense of services at same time.

Hi, I am new to Gatling i need a small favour to execute sequense of services at same time, The flow should be like this webservice1 --> After it is done grab the Id and call the webservice2--> grab the anotherId and call the webservice3. I kindly requesting please suggest how to write script and help me out. Thanks in advance :slight_smile:

Hi There,

You’ve gotta at least come up with a construct and post your code here if you are facing problems. But I think it’s very hard to write gatling code for a couple of hypothetical webservices for you because I don’t know about “your” webservice. Please refer to the docs to get started and get back with any specific errors/questions that you need help with.


Hi mahesh,
I have attached the code.So, I should be getting a ‘Id’ and some values when I execute this code. when i use this id as a parameter in next page, that page shall execute. So what i want finally is this id should reflect as a parameter in the next page.

class RegistrationInt extends Simulation {

val httpConf = http
.acceptEncodingHeader(“gzip, deflate”)
.userAgentHeader(“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20100101 Firefox/16.0”)

val headers_10 = Map(“Content-Type” → “multipart/form-data”)
val scn = scenario(“Registration”)
.formParam(“username”, “Test”)
.formParam(“data[id]”, “56432”)
.formParam(“data[locale]”, “en_IE”)
.formParam(“data[campaignId]”, “TEST009”))

setUp(scn.inject(rampUsers(50) over (10 seconds))).protocols(httpConf)



Something like this?

.formParam(“form1”, “form1”)

.check(regex(""“option value=”(.*)">span""").saveAs(“gotIt”)))

.formParam(“form2”, “form2”)

.formParam(“getfromsession”, session => session.get(“gotIt”).as[String])
.check(regex(""“option value=”(.*)">span2""").saveAs(“gotIt2”)))

…val scn = scenario(“TestSimulation”)
.group(“group1”) {


In this situations how can I get only id in all response values from first page ? and also how can I pass as a parameter that id in next page? can you please elaborate your explanation if possible?? or some refer links?

thanks in advance,

I’m sorry but you’ve gotta do the regex yourself. Only you know your application well and I don’t think I can provide any more explanation hypothetically :frowning:


Hi Mahesh,

Another doubt, Currently in Gatling reports, we are getting <800ms, 800ms – 1200ms, > 1200ms etc and we can change in the configuration file of gatling. The two parameters "lowerBound" and "higherBound". But, there is a way to change them per script instead of in the config file ?