How to create and write in a CSV file using gatling

Hi , I am a beginner on gatling / scala
So I want to create a CSV file in my scenario and subsequently I want to save the variables in the created file!!

I have already used this method, but I get this error message

//create the csv file"/gatling-maven-plugin-demo/src/test/resources/data/response-data.csv").appendAll(“IDCUSTOMER,RANDOMID\n”)

//Save the variables in the csv file

.exec( session => {"/gatling-maven-plugin-demo/src/test/resources/data/response-data.csv").appendAll(session(“IDCUSTOMER”).as[String]+","+session(“RANDOMID”).as[String]+"\n")

error Msg :
Caused by: \gatling-maven-plugin-demo\src\test\resources\data\response-data.csv (Le chemin d’accès spécifié est introuvable)

Please help me


Hi Khadija,

This is how I created my file:"…/user-files/data/MMFilteringResult.json").appendAll(eventDetailsJSON+"\n")

The ‘…’ at the beginning of the path is the GATLING_HOME path.