I have a Gatling test which should do the following:
Question: how to emulate this with Gatling? If I chain calls like :
val scn = scenario("Test scenario").exec(_create-user_).exec(_retrive-user_).exec(_delete-user_)
setUp(scn).protocols(httpConf))
then creating and deleting user will be part of the test.
You can use the before
and after
hooks to create and delete the user.
class RetrieveUserSimulation extends Simulation {
before {
// create user
}
setUp(scn).protocols(httpConf)
after {
// delete user
}
}
You'll have to issue the create and delete HTTP requests manually. before
and after
take => Unit
thunks, not Scenario
s.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With