I have a similar case to this.
I need to get data from first API and pass that data to second API. I have created scenario with chaining these 2 api’s. When I executed simulation , both the API’s gets executed N number of times.
Instead I want to execute the first API only once and get the data and load test only the second API. How can I achieve this
If I understand correctly your requirements, you want to fetch the initial data once then use that with several virtual users.
If fetching the initial data is fast enough, you may want to use a classic client during the Simulation initialization phase to fetch the data.
Otherwise, you may use a global variable, a first scenario (with only one user) will fetch the data and store id in the global variable andThen the second scenario will get this global variable to compute the data for the real load test.