mercredi 30 mars 2016

Gatling pass parameter throw scenario

I have a test which include 3 scenarios, The first one creates a entity type. The response give me the id of this type of entity (the one I want to save). The scenario 2 creates lot of entities of this type The scenratio 3 deletes the entity type created in one (So I need the id).

I am quite new with galting but I understood I can't use session because of the scope. So I wanted to store the id in a global variable.

This is my code, but the formId variable is not properly set

 .check(status.is(200), jsonPath("$..formId").saveAs("formId"))
    //.check(status.is(200),jsonPath("//formId").saveAs("formId"))
  ).exec { session =>
     EntityResourceFixtures.formId = "${formId}"
     session
   }

Any idea ?

Aucun commentaire:

Enregistrer un commentaire