Hi,
I’m using Gatling 3.2.1 and having problems calling a method with a list as parameter.
The list is saved as “IdsLettresRecrutement” from a previous call and then used in the body of the next call.
The method is called correctly but the list is parameters is always null.
val obtenirLettreRecrutementAProduire = http("Obtention des lettres de recrutement à produire")
.get(urlServeurRequete + contexte + "/RequeteLettreRecrutement/ObtenirAProduire?sort=NAM-asc&page=1&pageSize=1000&group=Lettres-asc&aggregate=Lettres-count&filter=")
.headers(Headers.headerRequete(url))
.check(status.in(CodesHttp.serveurRequeteOK))
val scn =
.exec(obtenirLettreRecrutementAProduire
.check(jsonPath("$..Items[*].Id").findAll.saveAs("idsLettresRecrutement")))
.exec { session =>
.doIf("${idsLettresRecrutement.exists()}")
{
// Production des lettres
exec(http("Production des lettres de recrutement")
.post(contexte + "/LettresRecrutement/Produire")
.headers(Headers.headerPostFormulaire)
.body(StringBody("""{ "guidsDocumentsSelectionnes":"${idsLettresRecrutement}" }""")).asJson
.check(status.in(CodesHttp.ok))
.check(jsonPath("$.DemandeProductionDocumentId").find.optional.saveAs("demandeProductionDocumentId"))
)