azure-docs
azure-docs copied to clipboard
example of JMX test plan with CSV data config
Can you please give a working github example of JMX test plan with CSV data config element? The instructions aren't working for me tks.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: 28ea6cfc-e89d-d587-6acc-6fd287cc3f8c
- Version Independent ID: c8ba383a-0c06-f6be-3906-716bfc1d8f30
- Content: Read CSV data in an Apache JMeter load test - Azure Load Testing
- Content Source: articles/load-testing/how-to-read-csv-data.md
- Service: load-testing
- GitHub Login: @ntrogh
- Microsoft Alias: nicktrog
@trevor-webster Thanks for your feedback! We will investigate and update as appropriate.
@trevor-webster Thanks for your feedback. Could you provide some more information about what exactly doesn't work? I'll update the documentation to include a complete JMX script.
- Create a JMeter script that depends on a CSV Data Set Config element and a CSV file.
- Verify it runs locally
- Follow steps at https://learn.microsoft.com/en-us/azure/load-testing/how-to-read-csv-data?pivots=experience-azp#configure-your-jmeter-script
- Remove any file path reference as dictated in article
- Create Azure load test using JMeter script in (1)
- Add CSV file to load test.
- There should only be 2 files in load test.
- Run load test.
- Status: Failed.
- View details: "Data file must not uploaded. Upload data file must and retry."
Thank you
@trevor-webster Thanks for your feedback. Could you provide some more information about what exactly doesn't work? I'll update the documentation to include a complete JMX script.
Can you pls give link to the documentation with complete script and CSV?
@trevor-webster Here's a link to a sample: https://github.com/ntrogh/azure-load-testing-samples/tree/main/jmeter/read-csv-data. Did this example help you further?
#please-close
@ntrogh and @YashikaTyagi-MSFT When uploaded to Azure load test, please see this error
Test script is not valid. Exception: ClassCastException: class org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy cannot be cast to class org.apache.jorphan.collections.HashTree (org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy and org.apache.jorphan.collections.HashTree are in unnamed module of loader 'app')
Can you pls post an example with CSVDataSet properties
<boolProp name="quotedData">true</boolProp>
<boolProp name="recycle">true</boolProp>
Thank you
@trevor-webster I've added an example for recycling the CSV file. In that case, you can set a fixed number of iterations (see example) or specify a duration on the Thread Group to end the load test. For quotedData, this is just a property to enable reading values that have double quotes around them in the CSV file.