I am using Karate + Gatling to test one async backend system.
User in a test
- Files a ticket with the backend
- Waits for the ticket to start processing (max 10 tickets are processing in parallel, rest of them wait in queue)
- When processing starts, wait for it to finish (~ 1min)
- When processing finishes, check result and end test
The problem is that if the test fails in steps 2 or 3 (timeout on GET request, random traffic fail), the ticket still stays on the backend and will take time to process, interfering with the following users.
I would like to delete the ticket manually if the test fails on steps 2 or 3. Is that possible with gatling? Is there some way that I could execute some after
hook if a user ends in failure? Can I know where the test failed?