0
  1. Something data-driven, i.e. JMeter variable originating from CSV data set config like ${userid}

  2. Something random i.e. between 1 and 100 using __Random() function like ${__Random(1,100)}

These are the two methods I got. It is compulsory to generate CSV data set configuration in Jmeter. Or else the second method is enough.

1 Answer 1

1

If you are in position to use random - go for it, it will save time and make your test more independent as you won't have to worry about creating CSV file, performing CSV Data Set configuration, copying the csv files to JMeter slaves in case of remote testing, etc.

However it may be a good idea to save random values into JMeter variables like

${__Random(1,100, userid)}

and saving this userid into .jtl results file via Sample Variables property by adding the next line to user.properties file (located in JMeter's "bin" folder)

sample_variables=userid

This way you will be able to see which random user id has caused error or re-use this column to replay the test.

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.