Read input data from a CSV file in Azure Load Testing
In this sample, you read a list of urls from a CSV file and then call a Dummy sampler to simulate a web request for each URL. This sample contains a sample JMeter test script and a CSV file.
The test script contains 1 thread group, which runs infinitely. The CSV Data Set Config element is configured to stop the current thread when it reaches the end of the CSV file. As a result, the load test will iterate once over all records in the CSV file. Alternately, you can set the Recycle on EOF property on the CSV Data Set Config element to continue looping over the file until the end of the test.
The thread group contains a Dummy sampler that outputs the variables that correspond with the fields in the CSV file. You can update the test script to remove or disable the dummy sampler with an HTTP request.
Prerequisites
- An Azure Load Testing resource. An Azure Load Testing resource. To create a Load Testing resource, see Create and run a load test.
- Install the Dummy sampler JMeter plugin on your local JMeter installation.
Run this sample
Follow these steps to read data from a CSV file with Azure Load Testing.
- Upload the JMeter test script to your load test.
- Upload the CSV file with URLs to your load test.
Run the load test.