0

Let's say that my domain is api.test.com, path is /v1/products and I have to do 1000 API requests with different products as parameters. Examples:

  • GET api.com/v1/products/product1
  • GET api.com/v1/products/product2
  • GET api.com/v1/products/product3
  • GET api.com/v1/products/product4

How to do this in Postman or Jmeter and read products as parameters from CSV file?

1

1 Answer 1

0

On Postman, you have to set the file on the Collection Runner.

enter image description here

With this, you can use the variables in your requests as regular variables.

enter image description here

For JMeter, refer to this Blazer Meter article: https://guide.blazemeter.com/hc/en-us/articles/206733689-Using-CSV-DATA-SET-CONFIG

4
  • I tried options but it didn't work, because both Postan and Jmeter see my scenario as 1000 separated API requests, not as parameters.
    – O. Ninic
    Commented Nov 15, 2018 at 18:19
  • Do you want to pass all 1000 values at once in one single request? Commented Nov 15, 2018 at 18:21
  • What's confusing me that this api request use different products in path but they aren't treated as parameters, no ?product=chocolate in path of the request. No, 1000 requests separated.
    – O. Ninic
    Commented Nov 15, 2018 at 18:36
  • On Postman, when you write api.com/v1/products/{productID}, being productID the CSV header, are not the sent requests sent to api.com/v1/products/product1, api.com/v1/products/product2, etc? Commented Nov 16, 2018 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.