Introduction
- JMeter is an open-source and performance testing tool.
- Using JMeter, we can evaluateand measure the performance of different softwareservices and products.
- It is a pure Java open source software used for testing Web Application or FTP application.
- It is used to execute performance testing, load testing and functional testing of web applications.
- On this learning, we are going see how to record and validate Lead creation in Salesforce Lightning using JMeter.

Therefore, JMeter can run on windows, Linux, Mac etc. Apache JMeter 3.1 is the latest version available in the market as of now with some more enhancements lined up for future. Below are some of the protocols supported by JMeter. As the first experiment, try to uninstall all the plugins and see how bare JMeter looks like. Then install something. Then install something more. Installation and Usage. Download the Plugins Manager JAR file and put it into JMeter's lib/ext directory. Then start JMeter and go to 'Options' menu to access the Plugins Manager. One can download the latest version of Apache JMeter binaries (tgz or zip) from link given in the following screenshot. 2) After JMeter is downloaded, it will appear in the Downloads folder of your system. 3) Now we need to unzip the file on to your desired path. JMeter Directory Structure looks like as given in the following screenshot.
Prerequisite:
- To run JMeter tool we need to check that the system is updated with the latest – java 8+ and it is installed properly.

Java Download link: https://www.oracle.com/java/technologies/javase-downloads.html
- Download and install Apache JMeter from the given link.
Apache JMeter download link: http://jmeter.apache.org/download_jmeter.cgi
Note: File extension .tgz for Mac OS and .zip for Windows.
- Need a Salesforce Practice account to validate Lead Creation.
Level 1.0:
Setting up Browser Certificates:
- Open Firefox Browser
- Click on Browser Menu >> Click on Options
- On the box, search for Certificates
- Now, click the View Certificates button >> Authorities >> Import
- Import the .crt from C:apache-jmeter-5.2.1bin >> folder ‘ApacheJMeterTemporaryRootCA’
Download Apache Jmeter For Windows 10
Level 1.1:
Setting up Browser proxy:
- Open Firefox Browser
- Click on Browser Menu >> Click on Options
- On the box, search for Network Settings
- Now, click on the Settings Button
- Under Connection Settings, change the radio button from No Proxy to Manual Proxy configuration
- Set the Http proxy as given in the below snapshot
Level 2.0:
JMeter Tool Hands–on:
- Go to JMeter folder C:apache-jmeter-5.2.1bin and double click on jmeter.bat file
- Now, a commend prompt with JMeter Home window will open.
Level 2.1:
How to create a new project?

- Right click on the Test Plan >> Add >> Non-Test Elements >> HTTP(S) Test Script Recorder
- From Add >> Config Elements include HTTP Header, Cookie, Cache Manager.
- In HTTP(S) Test Script Recorder under Test Plan Creation, set the Target Controller as Test Plan > HTTP(S) Test Script Recorder.
- Set the Global Settings Port number: 8888 as given in the browser manual proxy settings.
- Now, under Requests Filtering column, click the Add suggested Excludes button.This will add the default URL Patterns to exclude those while recording the main scripts. This will save our time during our postscript recording works.

Level 3.0:
How to recordthe script for Lead Creation on Salesforce lightning?
- Now, click the Start button on the HTTP(S) Test Script Recorder for recording.
- Now, go to Firefox browser and enter your test salesforce login.
- And perform the following actions:
- Login
- Go to Lead Object
- Create a new Lead with your name
- Fill in all the mandatory fields and save the Lead
- Logout
- Now, come back to the JMeter tool and click the Stop button for stop recording.
Level 3.1:
How to Filter Scripts?
- Now,right click the Test Plan >> Add >> Threads (Users) >> Thread Group
- Now, copy & paste the recoded scripts into the newly created Thread Group.
Note: Thread group is used to Execute the recorded script
- To filter and to monitor the script activity status, we need to add View Tree Listener by right clicking on Thread Group >> Add >> Listener >> View Results Tree
- Now, click Start Icon on the menu bar.
- You will get aninitial output on the Tree Listener. Now, based on the results using RegExp Tester search for Aura Token from top to bottom clicking the scripts manually in the View Results Tree Listener.
- Once you have identified the Aura Token Rename the Http Request scripts, it will help us to sort the script effectively.
- Now,add a regular Expression to the identified Http Request, by giving a unique variable name.
- In this Example, I have identified two Tokens; one is in the Home Page and other one is on the Lead Home Page. So, I have added two Regular expressions with the variable name aura0 and aura1.
- Now, replace the Aura token value to variable name for all Http requests
1.In-between aura0 to aura1 replace the value to aura0
2.After aura1 Regular Expression, replace the value to aura1
Level 4.0:
Identify the Lead creation area, sort the script finer, and view the result on the Salesforce Lead Object:
- Sort and identify the lead creation area.
Note: Salesforce Lighting scripts are something different from Salesforce Classic scripts.
- Copy and paste the message values to a notepad and customize the values based on your requirement.
- Now, replace the edited values to the message box and save the operation.
- To make the script refined and most effective for testing purpose, disable the current Thread – Create a New Thread as Main and move the sorted main scripts from the Trial Thread Group to Main Thread Group.
- Now, you can run the Main Thread Group and check the final output on the Salesforce Lead Object (One Lead Record will get created with the customized value)
Apache Jmeter Download Windows
Pro Tips:

- If your requirement is to create more than one record on a single run, you Just change the Number of Threads Users value in the Thread Group, or you can use Loop Controller to handle a specific area.
- Handling Aura Token is more important in Lightning Scripts to generate an output. If you fail to identify your token values, you no need to worry – just take a break and restart your recording from the scratch.
- Add Http Header, Cookie and Cache Manager before start recording the script.
Apache Jmeter 3.1 Download
