Dynamic scenarios with dynamic URL (Java solution)

Hi Team,
I need to hit different URLs as shown below
https://somdomain.com/v1/{value1}?apikey=somekey
https://somdomain.com/v1/{value2}?apikey=somekey
.
.
httpps://somdomain.com/v1/{valueN}?apikey=somekey

All these values (vaue1, value2 …valueN ) are from some properties file.

Each URL will have unique path param values , How to achieve this functionality with dynamic URLs/Scenarios. I need Java based program only (no Scala) ?

Hi @mrambabu,

Did you check the documentation about:

  • Method and URL, that explain request can take a gatling expression language value, meaning you can do something like http("My request").get("https://somdomain.com/v1/#{uriValue}").queryParam("apikey", "#{somekey}")
  • Session - Injecting data that allows you to inject any data in session to be consumed by the above expression.

Cheers!

@mrambabu Have you gone through:

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