QuickDevGuide

Home › Apache JMeter

Parameterisation with CSV & Functions — Apache JMeter

Hard-coded data makes every virtual user identical — caches hit 100% and results look unrealistically good. Feed varied data instead. Source Use CSV Data Set Config users, product IDs, search terms from a file User Defined Variables constants for the plan ${P(name,default)} properties passed with -J on the command line ${Random(1,100)}, ${RandomString(8,abc)} random values ${UUID()}, ${time(yyyy-MM-dd)} unique IDs, timestamps ${counter(FALSE,)} global counter ${threadNum} current thread number CSV Data Set options Sharing mode: All threads (each line once across all users) vs Current thread. Recycle on EOF / Stop thread on EOF: loop the data or stop when it runs out (e.g. one-time registrations). Put the CSV next to the .jmx and use a relative path so it works on load generators too.

Key Takeaways