tag1consulting / goose

Load testing framework, inspired by Locust
https://tag1.com/goose
Apache License 2.0
809 stars 70 forks source link

How can I do a set of sequential tasks in goose #395

Closed Juantamayo26 closed 2 years ago

Juantamayo26 commented 2 years ago

I'm trying to migrate some tests from Locust to Goose:

I have the following code: image

How can I get data from one task to send it to another and so on..

I found this: https://docs.rs/goose/0.15.1/goose/enum.GooseScheduler.html#variant.Serial But I don't know how I could do it

jeremyandrews commented 2 years ago

If your goal is to pass data from one task to another:

1) Is that necessary? Perhaps it's simpler to implement the logic all in a single task? (It's unclear to me what you gain splitting it into multiple tasks: unless perhaps this is important for the metrics collected?)

2) If it is necessary, then you'll need to implement Session Data store data in a session and make it available in multiple tasks:

3) Further, if the order tasks are executed is important, you are correct to review the scheduler configuration, perhaps better documented here:

Juantamayo26 commented 2 years ago

Maybe not completely necessary, I'll think about it.

There are endpoints that depend on the data of other endpoints (To be able to get C I need to do B and to do B I need to do A)

In the same way, thank you very much

jeremyandrews commented 2 years ago

Were you able to figure this out? Should we close this issue?