Performance Testing of Salesforce using JMeter

If your end-users are facing difficulties when using a software application like: “Service unavailable” “An internal server error has occurred,” and “Read timeout error.” You have performance issues with your application. All of these performance issues affect user satisfaction, user experience, and the brand of the application, on revenue, and overall.

Salesforce Performance Testing using JMeter

When it comes to the performance of Salesforce applications, one question that comes to mind is: Does a Salesforce-based application really require performance testing? Salesforce gives assurance that it will provide computing power and resources, but the way in which Visualforce pages and Apex classes are implemented it may cause performance problems similar to any other platform. Performance testing is a test execution that ensures great user experiences and helps companies gain and retain customers.

What is Performance Testing?

Performance testing is to determine the system responsiveness and stability under the various workloads. Performance Testing calculates the quality attributes of the system, such as scalability, reliability & resource usage.

Why performance Testing?

Prior to going live, the software should be tested against like responsiveness, Speed, Scalability, Stability under a variety of load conditions. If the application’s performance is not checked live, it can cause problems in the performance of the application like running system slow while simultaneously accessing the system by adding several users, poor usability which likely to realize a nasty reputation. Performance testing tells about what has got to be fixed before going live (mainly the issues faced under the range of load conditions).

Salesforce performance testing best practices

  1. Never perform load testing of any Salesforce.com service or feature without formal consent from Salesforce support. They may revoke your access and/or charge you service fees for the increased usage.
  2. Submit a case if you want to perform load testing to test the speed of your application using an automated tool. Read Salesforce performance testing FAQs before you start.
  3. If you have performance issues try to run a bandwidth simulation test on your firewalls, routers, and other corporate infrastructure to make sure it can handle the load.

Performance Testing Attributes

  1. Speed: Determines whether the software responds rapidly.
  2. Scalability: Determines the amount of load the software can handle at a time.
  3. Stability: Checks that software is stable in case of varying workloads.
  4. Reliability: Determines the software is secure or not.

Types of Performance Testing

  • Load Testing: It verifies the software product’s ability to perform under anticipated user loads.
  • Stress Testing: It checks the system on its robustness and error handling under extremely heavy load conditions.
  • Endurance Testing: It ensures that the software can handle the expected load over a long period of time.
  • Spike Testing: It verifies the software Product’s reaction to sudden large spikes in the load created by users.
  • Volume Testing: It analyzes the system performance by increasing the volume of data in the database.
  • Scalability Testing: Software Product’s/application’s performance is calculated in terms of its ability to scale up or scale down the number of user requests or other such performance measure attributes.

Salesforce Performance Testing Approach

salesforce performance testing process

Salesforce Performance Testing using Automated Tools

There are many performance testing tools in the market. Here are some of the popular ones –

  • Apache JMeter
  • Load Runner
  • Load UI Pro
  • NeoLoad
  • WebLOAD
  • Rational Performance Tester (IBM)
  • Blazemeter

Salesforce Performance Testing using JMeter from Apache

JMeter is a Java-based desktop application that can be used for performance testing of different kinds of client-server applications, websites, web applications, web services, databases, FTP servers, etc. It is an open-source tool provided by Apache with no licensing cost.

performance testing using Jmeter

How does JMeter Perform Testing?

  1. Jmeter sends the request to the server.
  2. Jmeter receives the response from the server.
  3. It generates the results in XML, JSON …etc formats and displays in results in charts, Graphs..etc.

Install JMeter

1. Before installing the Jmeter, first, check whether the java is installed or not, if not install the Java8+. 

2. And download the Apache JMeter https://jmeter.apache.org/download_jmeter.cgi

Jmeter Install process

3. Unzip the downloaded the file and click on the jmeter.bat file from the lib folder.

Jmeter bat

4. Then the Jmeter GUI window will be opened.

Jmeter GUI window

Elements of Jmeter

  1. Test Plan
  2. Thread Group
  3. Samplers
  4. Listeners
  5. Configuration
  6. Assertions

Test Plan: A test plan is the main element of JMeter and describes the sequence of steps executes at run time. A test plan made up of Thread Groups, Samplers, Controller/s, Listener/s, Assertions/, and Configuration Elements. 

Thread Group: Thread Groups are used to simulate virtual users. Multiple thread groups simulating different kinds of operations performed by users.

Samplers:  Samplers explain JMeter to send requests to the server and wait for the response. 

JMeter Samplers include below requests:

  • FTP Request
  • HTTP Request 
  • JDBC Request
  • Java object request…etc

Listeners: Listeners display the results of the test execution. These can display results in a different format such as a tree, table, graph, or log file.

Assertions: Assertions are used to validate the sampler response received from the server.

Configuration: Configuration Elements in JMeter are used to configure the sampler requests made to the server.

Building the Test Plan: In this test plan, we are going to run the performance test for the salesforce login page and home page. For that, we will open the JMeter batch file from the respected bin folder and create the Test Plan for Salesforce Login & Home pages.

Step 1: Goto Jmeter Test Plan and right-click and  

Add Thread Group by Add > Threads(Users) >Thread Group. And enter values in the below fields.

Fields are Number of Threads (users), Ramp-up Period (Seconds), and Loop-Count.

Goto Jmeter Test Plan

Step 2: Here we defined the variables like URL, Username, Password..etc.

Add User Defined Variable by Add > Config Element > User-Defined Variables.

Step 3: In this step, we will add the HTTP Request Defaults for Avoid data duplication in tests and make test scripts more (easily) maintainable.

Add HTTP Request Defaults by Add > Config Element > HTTP Request Defaults.

Step 4: In HTTP request, we enter the Server name, Method(GET, POST, DELETE..),Path value..etc to send requests to the server and also retrieve the response from the server. Here we are getting the Salesforce URL as https://login.salesforce.com/ using the GET method.

Add HTTP Request by Add > Sampler > HTTP Request.

Step 5: Here we are giving the input values as username and password in the login page using the POST method. And also get the OAuth Token and giving the Authorization to login into the Salesforce application.

Execution and Results

After Running the Jmeter by clicking the green button from the toolbar, we will get the below results. By seeing these reports, if we get the Response code:200 and Response message: OK, then we ensure that the test is passed otherwise the test is failed.

1. View Results in Tree:

2. View Results in Graph

View Results in Graph

3. View Results in Table

Know more about Salesforce Performance Testing

By using Apache JMeter, We are able to perform Performance Testing including load testing, stress testing, and store results for Salesforce.com. And Also we will see the results in different formats like View in Tree, Table, Graph, Summary etc which will help us to analyze the results efficiently and easily.

Speak Your Mind

*