How to run a collection against a CSV of variables? #284
-
I want to do data-driven API testing. To do this I want to target a particular request or collection and give it a CSV of variables to iterate through. Performing one request for each line in the CSV and collecting the results or performing assertions as needed. I can do this via the CLI, I suppose, by driving the CLI with Python. But if I do that I might as well do everything with Python. I was hoping there is a way to do this in the Bruno GUI but I'm not seeing anything there or in the documentation about it. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 1 reply
-
Big one. With that we will attract not only Postman/Insomnia users but also JMeter ones |
Beta Was this translation helpful? Give feedback.
-
As a tester, this is the most obvious thing I ever want to do with an API: run a route through a zillion variations. And with such a feature, a completely non-technical tester can focus on curating a nice CSV in Excel or Google Sheets. Postman can do this, of course, but it does it in a weird and clunky way. |
Beta Was this translation helpful? Give feedback.
-
My usecase is slightly different, but the need is basically the same. This is something I end up doing about once every other month and is one of the main features I look for in an API tool like Postman or Bruno. I store collections of admin endpoints to our services. Sometimes a bug will be introduced somewhere and I want to do some sort of build operation against multiple IDs - maybe a bulk data fix up or restarting a bunch of workflows with specific ids. I can identify the ones I want to interact with and export them as a CSV. I then want to run a single request for each line in the CSV (exactly as described above). And same sort of thing goes for me - I could run things via JMeter or a Jupyter notebook with Python or something, but having it built into the tool was SO nice with postman. Its one of the things holding me back from switching over to Bruno. |
Beta Was this translation helpful? Give feedback.
-
I use running a series of collection requests to show how our API works passing in the field values from a CSV then use tests to store response values to run the next in a series of steps. We are a API first commerce cloud platform and use Postman and CSV files to load test environments with products, customers, run complex checkout scenarios, etc. Being able to pass in data via a CSV makes this a breeze in PM. |
Beta Was this translation helpful? Give feedback.
-
Definitely in the above group, before we can settle on Bruno as our one stop API testing toolset we need the ability to have a data driver setup. |
Beta Was this translation helpful? Give feedback.
-
Same here, I have data-driven testing as a requirement, and I'm currently facing two roadblocks:
|
Beta Was this translation helpful? Give feedback.
-
@satisfice - I realize it's been quite some time since you opened this discussion, but you are indeed able to use a CSV (or JSON file) inside of the GUI or the CLI to iterate through data. |
Beta Was this translation helpful? Give feedback.
@satisfice - I realize it's been quite some time since you opened this discussion, but you are indeed able to use a CSV (or JSON file) inside of the GUI or the CLI to iterate through data.