azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

example of JMX test plan with CSV data config

Open trevor-webster opened this issue 2 years ago • 2 comments

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.

trevor-webster avatar Oct 19 '22 21:10 trevor-webster

@trevor-webster Thanks for your feedback! We will investigate and update as appropriate.

YashikaTyagii avatar Oct 20 '22 04:10 YashikaTyagii

@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.

ntrogh avatar Oct 21 '22 07:10 ntrogh

  1. Create a JMeter script that depends on a CSV Data Set Config element and a CSV file.
  2. Verify it runs locally
  3. 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
  1. Create Azure load test using JMeter script in (1)
  2. Add CSV file to load test.
  • There should only be 2 files in load test.
  1. Run load test.
  • Status: Failed.
  • View details: "Data file must not uploaded. Upload data file must and retry."

Thank you

trevor-webster avatar Oct 31 '22 21:10 trevor-webster

@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 avatar Nov 01 '22 14:11 trevor-webster

@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?

ntrogh avatar Nov 02 '22 11:11 ntrogh

#please-close

ntrogh avatar Nov 07 '22 08:11 ntrogh

@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')

trevor-webster avatar Nov 10 '22 22:11 trevor-webster

Can you pls post an example with CSVDataSet properties

<boolProp name="quotedData">true</boolProp>
<boolProp name="recycle">true</boolProp>
        Thank you

trevor-webster avatar Nov 11 '22 01:11 trevor-webster

@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.

ntrogh avatar Nov 14 '22 09:11 ntrogh