Is there any mechanism in Gatling for handling logic that you want
executed once at the beginning/end of the test? I would like my tests
to be able to prepare their own data and clean up after themselves but
I'm not sure the best way to run some code only once globally. I
suppose I could use (misuse?) a custom feeder for the setup something
like:
val setupFeeder = new Feeder() {
val customer = //create and return customer
val content = //create and return content
def next = {
Map("customerId" -> customer.id, "contentId" -> content.id)
}
}
In this case my feeder would always return the same data and I could
refer to ${customerId} and ${contentId} in my tests. Of course that
doesn't really help with cleanup. Is there a better way to approach
setup and teardown of data needed for tests?
Chris