thunder-client-support
thunder-client-support copied to clipboard
Run request multiple times with different parameters
I would like to test single endpoint with permutation of multiple combination of parameters. Lets say we have request like this:
/chart?period={{period}}&asset={{asset}}&language={{language}}
Currently i need to create one request for each combination I want so in case of following options:
period = [1, 7, 30]
asset = ["BTC", "ETH"]
language = ["en", "de"]
I need to copy single request 12 times and redefine its parameters. It would be nice if I could run single request with all permutations or maybe randomly n-times.
There is similar implementation of this in software artillery where parameters are set randomly. Config looks like this:
config:
target: "https://localhost"
http:
timeout: 5
phases:
- duration: 120
arrivalRate: 100
rampTo: 5000
variables:
asset:
- "btc"
- "eth"
lang:
- "en"
- "de"
period:
- "1"
- "7"
- "30"
scenarios:
- name: "Get Chart"
flow:
- get:
url: "/chart?period={{period}}&asset={{asset}}&language={{language}}"
@rokbjc You can use run collection to run multiple times, please see the screenshots below
input data file for variables - data.json

after i went thru release notes i found this feature. I implemented my use case and i made it work, but I stumble upon different issue:
- for multiple endpoints i use multiple data files. In this case i can not run whole collection because data file is not connected to endpoint, but to current "run".
- finding failed request with slider when there is a lot of iteration (1000+) can be quite time consuming
- when I get failed request and try tu rerun it, variables from data file are not available any more
Currently i am thinking to generate json objects and inject it to thunderclient.json file somehow, but this solution feels like bad hack.
Thanks @rokbjc for the feedback. Will think of how to improve based on above issues.
thunderclient.json modifying directly Is not recommended, but still if you want to go ahead make sure it is in git source or create a backup of it.
Run single request is now implemented in RunCollection View.
See all features released https://github.com/rangav/thunder-client-support/releases/tag/v1.19.0
Please let me know your feedback.
- Now you can find failed iterations easily, the list is displayed as below.
Clickon the failed number to see iteration history
Please update to v1.19.3
See all features released https://github.com/rangav/thunder-client-support/releases/tag/v1.19.3
I am closing the issue, feel free to re-open if needed