I am running below Script which is running fine in Gatling However its printing in format of some(value) and I am not getting why.it should print like 123456 but its printing some(123456)
def Getdata() = {
val jdbcFeeder1=jdbcFeeder(dbConnectionString,dbUserName,dbUserPassword,targetQuery)
val outputFilePath = System.getProperty("user.dir") "/src/gatling/resources/data/createddata.dat"
scenario("Write data To file")
.repeat(1) {
feed(jdbcFeeder1)
.exec { session =>
val writer1 = new PrintWriter(new FileOutputStream(outputFilePath, true))
writer1.write(session.attributes.get("user_id").toString "\n")
writer1.close();
session
}
}
}
CodePudding user response:
session.attributes.get("user_id").toString
You should be using the Session API correctly, please check the documentation.