2

I have a link which contains a field for id. I want to fill this field data with data from a csv/txt file. The link is going to help me get data for a particular api.The url looks something like this: https://xyz-vbjjdnj.com/api/version/collector/$JOB_ID$/results

The $job_id$ needs to be replaced with ids from my text file. How can I do it? And the results needs to be saved further. Any kind of help would be appreciated.

1 Answer 1

1
  1. You can read data from the CSV file using CSV Data Set Config

    For example if you have test.csv file which looks like:

    123
    456
    789
    

    You can configure the CSV Data Set Config like:

    enter image description here

  2. Once done just use ${JOB_ID} JMeter Variable reference in the URL like:

    https://xyz-vbjjdnj.com/api/version/collector/${JOB_ID}/results
    
  3. If you want to store the result into a JMeter Variable add a Boundary Extractor with empty left and right boundaries

    enter image description here


Demo:

enter image description here

2
  • Could you share your http request page ss ? Oct 6, 2021 at 11:58
  • It's not a HTTP Request, it's a Dummy Sampler with a fake response data of result for ID: ${JOB_ID}
    – Dmitri T
    Oct 6, 2021 at 12:28

Your Answer

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

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