Hi there, I have a question as below, suppose that I have 3 files as this (shortened), object name same as file name.
file1.scala
.exec{
session =>
val restID = session.set("val1", theValue)
restID
}
file2.scala
exec(
http("Name")
//the body
.body(#{file1.restID})
)
file3.scala
val FirstScenarioScn = scenario("Phase_2_APIs").tryMax(3) {
forever{
exec(file1.file1_method())
.exec(file2.file2_method())
}}
What I am looking for now, is to take the restID from file1 to pass into file2, I have made both files to action under ChainBuilder, but somehow file2 does not recognize that variable, what is the exact way that I should do for this situation ?
What I’m trying to achieve here, is to pass the var2’s value2 into payload_value, but it seems that Gatling cannot read this, so How do I extract the data in this situation ?