I have the follow example code:
class Test extends Simulation {
var input = "" // save result
val scnFirst = scenario("scnFirst")
.exec(
grpc("request")
.asyncUnaryCall(ScnGrpc.METHOD_FIRST_METHOD,
FirstRequest(
name = "thinkerou"
))
.check ({ response =>
input = response.result.get.message // save it
response.result.get.code.equals(Code.OK)
})
)
val scnSecond = scenario("scnSecond")
.exec(
grpc("request")
.asyncUnaryCall(ScnGrpc.METHOD_SECOND_METHOD,
SecondRequest(
number = 123456
message = input // HERE message should response result of scnFirst, BUT its value is empty, why?
))
.check({ response =>
response.result.get.code.equals(Code.OK)
})
)
setUp(
scnFirst.inject(constantUsersPerSec(users) during (duration seconds)).protocols(protocol),
scnSecond.inject(constantUsersPerSec(users) during (duration seconds)).protocols(protocol)
)
}
I have two grpc services, the response of first grpc service will input second grpc sevice.
I should how change my code? or should how extension gatling-grpc(https://github.com/macchiatow/gatling-grpc)? thanks a lot!!