I want to run specific actions only once before every scenario. Is there a way to handle it or specific executors I can use?
The setup() function run only before the test, but for my scenario, I want to run only once for every scenario defined on the test.
When I run a test for 30 mins, that 30 mins only specific action should run. Some action will run before the scenario and after the scenario.
Login → Action A → Action B → Logout
without running all 4 actions for 30 mins. I want Login to run only once before each user scenario, and action A and Action B will run for 30 mins at last logout action will happen.
Similar to LoadRunner, Vuser Init run before the scenario, the Action part will run for the defined period, and the last Vuser End part will trigger.
Workaround: We can use a loop for action A and action B, but I want some guidance from the K6 expertise.