Create a http URL with param feeder from Json file

Gatling version: 3.11.2
Gatling flavor: java
Gatling build tool: maven

I post a new Topic :slight_smile:

I want to create a HTTP request, this URL :

I put the millistone & state param in json file, but after execution I got a wrong URL :


Code source of my Gatling simutation :

public class MyGatlingSimulation extends Simulation {

        String baseURL = ""; 

        // Define your HTTP protocol configuration
        HttpProtocolBuilder httpProtocol = http

        // Define your JSON feeder
        FeederBuilder<Object> feeder = jsonFile("data/data.json").circular();

        // Define your scenario
        ScenarioBuilder scenario = scenario("My Scenario")
                // Feed the JSON data to the request
                .exec(http("GET Request")

                        // Concatenate the base URL with params
                      .queryParam("milestone", "${milestone}")
                      .queryParam("state", "${state}")
                .exec(session -> {
                    System.out.println("SESSION : "+session.toString());
                    return session;
                }); // Check if response status is 200

        // Define your simulation setup



The JSON file :

    "state": "open"

My question: how can I put all the fields of the JSON file in the URL parameters ?

Thanks in advance

Please have a look at the Gatling 3.11 release note: Gatling upgrade from 3.10 to 3.11

Thanks slandelle :slight_smile:

I replaced โ€œ$โ€ by โ€œ#โ€ in the queryParam() and it works

Exactly :clap:

This is the correct syntax nowadays.