Introduction
So, what exactly is JMeter?
JMeter is an open-source Java application to analyze the performance of web applications.

It was inclined to test Web Applications. It has now expanded to other test functions. Apache JMeter is widely used to test performance on static and dynamic resources and web applications. Let us know more about JMeter Functions in this article.
What are JMeter Functions?
JMeter functions are unique values that can occupy fields of any Sampler or other element in a test tree.
Let us define the syntax in the following way-
${__functioncodingninjaName(variable01,variable02,variable03)} ,
Here "__functioncodingninjaName" is the name of a function and parentheses enclose the parameters sent to the function.
Function Type |
Name |
Comment |
Information | threadNum | It gets the thread number. |
Information | samplerName | It gets the sampler name. |
Information | machineIP | It gets the local machine IP address. |
Information | machineName | It gets the local machine name. |
Information | time | Its task is to return the current time in various formats. |
Information | log | It displays a message. |
Information | logn | It logs or displays a message. |
Input | StringFromFile | It reads a line from a file. |
Input | FileToString | This function reads the entire file. |
Input | CSVRead | This function reads from a CSV file. |
Input | XPath | XPath expression helps to read a file. |
Calculation | counter | Its job is to generate an incrementing number. |
Calculation | intSum | This function adds int numbers. |
Calculation | longSum | This function adds long numbers. |
Calculation | Random | It generates a random number. |
Calculation | RandomString | It generates an arbitrary string. |
Calculation | UUID | It generates a random type 4 UUID. |
Scripting | BeanShell | The job of this function is to run a BeanShell Script. |
Scripting | javaScript | It processes javascript. |
Scripting | jexl, jexl2 | It evaluates a Commons Jexl expression. |
Properties | property | It reads a property. |
Properties | P | It reads a property by the shorthand method. |
Properties | setProperty | It sets a JMeter property. |
Variables | split | The job of this function is to split a string into variables. |
Variables | V | This function evaluates a variable name. |
Variables | eval | It evaluates a variable expression. |
Variables | evalVar | It evaluates a word stored in a variable. |
String | regexFunction | Its job is to parse the previous response using a regular expression. |
String | escapeOroRegexpChars | This function quotes meta chars. |
String | char | This function generates Unicode char values from a list of numbers. |
String | unescape | It processes strings containing Java escapes (e.g. \n & \t). |
String | unescapeHtml | Its job is to decode HTML-encoded strings. |
String | escapeHtml | Its task is to encode strings using HTML encoding. |
String | TestPlanName | It returns the name of the current test plan. |
Let us consider an example of a Log Function to understand the use of functions in JMeter.
Syntax
This is the syntax of the JMeter log function.
${__log("Welcome to Coding Ninjas")}
To carry out the execution, we will first create a JMeter Test plan and execute an HTTP request.