JMeter mathematical function

Check out the functions page for Jmeter. It has tons of cool math tools that you can plug anywhere in your script. You’ll most likely end up doing a jexl command, which would look something like this: ${__jexl2(${var1}-${var2})}

How to use jmeter ui on ultra high resolution display

Edit as of August 2017 for version 3.2: The answer below might be more up to date and simple https://stackoverflow.com/a/45773659/460802 I stumbled upon answer about setting Swing font at runtime and it gave me a clue how to set JMeter’s fonts. According to Swing’s DefaultMetalTheme.java source, this is a list of recognized Java properties which … Read more

JMeter how to NOT fail 500 Internal Server Errors

Another possible solution is to use Response Assertion with checked “Ignore Status” flag added to your sampler: Ignore status Instructs JMeter to set the status to success initially. The overall success of the sample is determined by combining the result of the assertion with the existing Response status. When the Ignore Status checkbox is selected, … Read more

jMeter loop through all values in CSV

You can define the urls in the csv data format and have Jmeter loop through it. The csv file can be defined and loaded with the CSV data config. The variable names stand for each of the columns in the csv file, and can be referred in the loop controllers. Example: Define an while controller … Read more

How do threads and number of iterations impact test and what is JMeter’s max. thread limit

The max number of threads is determined by a lot of factors, see this answer https://stackoverflow.com/a/11922239/460802 There is a big difference in what you are proposing. “500 threads, Loop 1 ” Means 500 threads AT THE SAME TIME doing the loop ONCE. “50 threads, loop 10” Means only 50 threads AT THE SAME TIME doing … Read more

JMeter upload file with relative path from the jmx file

Yes. (This was confirmed in JMeter v2.9) You can use the following BeanShell expression in the filename input field: ${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__BeanShell(File.separator,)}<YOUR FILENAME HERE> So if your file, “upload.jpg” was located in the same folder as your JMX test file, the complete value would be ${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}${__BeanShell(File.separator,)}upload.jpg To keep it a bit cleaner, add … Read more

Jmeter – get current date and time

Use __time function: ${__time(dd/MM/yyyy,)} ${__time(hh:mm a,)} Since JMeter 3.3, there are two new functions that let you compute a time: __timeShift “The timeShift function returns a date in the given format with the specified amount of seconds, minutes, hours, days or months added” and __RandomDate “The RandomDate function returns a random date that lies between … Read more

How to clear the results in Aggregate Report’s table in JMeter automatically when executing the same test plan again?

Jmeter does not have a flag to do this automatically. Generally, you have to clear the results with CTRL+E (in windows) or from the file menu, under RUN > CLEAR or RUN > CLEAR ALL You might be able to write a beanshell script to clear the results everytime you execute the script. http://www.javadocexamples.com/java_examples/org/apache/jmeter/samplers/SampleListener/