Salesforce Load and Performance Testing: Essentials, Importance & Execution

Author

Introduction

Salesforce is a strong and reliable CRM platform, but like any big software, it needs to work well even when many people use it at once. This article explains what load and performance testing means in the context of Salesforce, why it’s essential, and how you can carry it out effectively using real-world practices and data.

Understanding Load and Performance Testing in Salesforce

Load testing shows how well your Salesforce setup handles the number of users you expect. Performance testing shows how fast, stable, and responsive it is in different conditions.

Why is performance testing necessary?

End usertolerance is incredibly low in today’s digital era. Studies have shown that close to 40% of visitors will leave if a website takes morethan three seconds to load. Internet users say that the cap for full website load time is3 seconds. Consider how annoying it would be to have to wait even a few seconds to send a message on social media or conduct a Google search. Such delays have the potential to cause both short-term user attrition and long-term harm to a brand’s reputation. Making sure a website performs quickly is not only advantageous, but also necessary in a time when speed is equated with dependability. 

Key Performance Indicators to Watch:

  • Response Time: How quicklySalesforce processes the actions of the user. 
  • Throughput: The number of requests ortransactions that can be completed in a given time. 
  • Scalability: The system’s capacity to handle more users or larger data volumes. 
  • PerformanceStatistics: CPU, Memory, Storage resource utilization. 

The Significance of Performance Testing in Salesforce

Salesforce is frequently essential to business processes, so it is vital to make sure it functions well under duress. 

Principal Advantages:

  • Smooth User Experience: Keeps users efficient and reduces frustration. 
  • Prevents System Failures: Identifies bottlenecks before they cause issues. 
  • Data-Driven Scaling: Helps decide what system resources are needed to handle user demand. 
  • Compliance Support: Helps meet regulatory demands in sectors like healthcare and finance. 

Distinct Scenarios for Load and Performance Testing in Salesforce

1. Simulating High User Activity

  • Emulate over 1,000 users interacting with various Salesforce features concurrently: 

  1. Core modules like Leads and Opportunities in Sales Cloud 
  2. Parts of Service Cloud like handling customer cases and storing helpful articles. 
  3. Custom-built Lightning Web Components (LWC) interfaces 

  • Include diverse user types such as sales professionals, support teams, executives, and external users (e.g., partners or community members) 
  • Test load spikes during critical periods like financial quarter-end or promotional events 

2. Large-Scale Data Handling

  • Populate Salesforce with massive datasets using Bulk API or Data Loader: 

    1. Load 1 million+ records for objects like Accounts and Contacts 
    2. Create hundreds of thousands of Cases, each with files attached  
    3. Insert Chatter feeds with mentions, images, and document uploads 

  • Utilize a variety of field types including formulas, rich text, and multi-picklists for realistic coverage 

3. Heavy API Interaction Testing

  • Recreate integration scenarios with external platforms making extensive API requests: 

  1. Push 100,000+ API calls per hour involving different data operations 
  2. Perform CRUD operations at scale, mimicking real-time data ingestion (e.g., IoT devices) 
  3. Test how well combined and linked API requests handle heavy use in complex workflows. 

  • Observe rate limits and simulate how the system handles over-limit responses 

4. Complex Automation Under Load

  • Perform large data updates that automatically start certain processes:
     
  1. Change Opportunity stages en masse to activate Flows or Process Builders 
  2. Include automation paths with subflows, decision nodes, and data manipulations
     
  • Evaluate how triggers and flows perform when operating on large datasets 

5. Report and Dashboard Stress Testing

  • Create dashboards featuring over 10 widgets or charts using dynamic filters 
  • Evaluate performance for:

  1. Summary and matrix reports with multiple layers of grouping and custom logic 
  2. Custom report types pulling from multiple objects

  • Simulate mass access by hundreds of users viewing or refreshing the same report simultaneously 

6. Evaluation of Custom Development

Test custom backend and frontend components under load:

  1. Apex classes managing extensive batch or queueable operations 
  2. Interactive Lightning components with live data refresh capabilities 
  3. Visualforce pages rendering data-heavy visuals or generating documents 

7. Data Skew and Access Control Impact

Assess system response when: 

  1. A single owner is associated with over 100,000 records 
  2. The role hierarchy is very deep, with more than 10 levels. 
  3. Measure the influence of sharing rules, manual shares, and varying OWD (Org-Wide Default) settings on performance 

8. Search Functionality Testing

Examine search responsiveness and indexing efficiency: 

  1. Large-volume environments with over a million searchable records 
  2. Complex search patterns using wildcards or filters across multiple objects 
  3. Lookup fields populated dynamically under concurrent access 

9. File Management Load

  1. Upload and download large documents (25MB and above) across hundreds of sessions 
  2. Validate Email-to-Case ingestion with multi-attachment emails 
  3. Test how files render, especially in external user environments like Experience Cloud 

10. Integration Load & Middleware Stress

  1. Emulate continuous synchronization with other platforms such as ERPs or e-commerce systems 
  2. Load test data pipelines involving tools like MuleSoft, Dell Boomi, or Informatica Cloud 
  3. Simulate retry mechanisms and exception handling when APIs or connectors encounter failure scenarios 

Recommended Tools for Load & Performance Testing in Salesforce

  • Configuring JMeter with Salesforce covers interactions at both API and UI levels. 
  • BlazeMeter – a cloud-native platform built for scalable testing 
  • Salesforce’s Performance Assistant provides built-in guidance for performance tuning. 
  • UI and end-to-end performance testing can be conducted using automated tools like Testim and Provar. 
  • Use LoadRunner or SOASTA for robust stress testing in enterprise environments 

How to Execute Load and Performance Testing in Salesforce

Because Salesforce uses a shared (multi-tenant) cloud model, testing must be adapted to suit its environment. Here’s a simplified process:

Set Clear Objectives

Ask yourself:

  1. What’s the highest expected number of users? 
  2. Which functionalities are business-critical? 

Select Appropriate Testing Tools

  • JMeter: Open-source solution for web performance testing 
  • LoadRunner: Comprehensive enterprise testing software 
  • Apache Bench: Lightweight command-line benchmarking tool 
  • Salesforce Native Tools: Built-in options for testing APIs and custom apps 

Recreate Real-World Scenarios

  • Include all relevant elements such as Apex classes, custom objects, and Visualforce or Lightning components. 
  • Evaluate API calls and background jobs 

Evaluate the Results

  • Verify the durations of system response times, the frequency of errors, and the utilization of resources. 
  • Detect unusual spikes or degraded response patterns. 

Optimize Performance:

Take corrective actions:

  • Improve inefficient queries or scripts 
  • Minimize heavy client-side processes 

Let’s learn about Tools:

LoadRunner:

LoadRunner, developed by Micro Focus (with roots as HP LoadRunner), is a proprietary performance-testing suite that simulates user load to assess how applications behave under stress. It helps simulate thousands of users simultaneously using application software, recording and analysing system performance. 

blog-5

Key Components of LoadRunner:

VuGen (Virtual User Generator)

VuGen, short for Virtual User Generator, is a powerful Integrated Development Environment (IDE) used in LoadRunner to simulate the behaviour of users interacting with a system under stress or load. It features an intuitive interface that allows performance engineers to record real-time communication between the client and the server, converting this into a structured script, commonly referred to as a VUser script. 

This recorded script helps replicate real-world user activities. For example, VuGen can be used to simulate key operations on a platform like Amazon: 

  • Navigating through the products section 
  • Going through the checkout process 
  • Executing payment transactions 
  • Accessing the My Account page 

Controller:

Once the VUser scripts are finalized, they’re executed under different conditions using the LoadRunner Controller, another core component of LoadRunner. The Controller is responsible for defining how the load should be applied, such as: 

  • The number of virtual users per business transaction or VUser group 
  • Load behavior patterns like ramp-up, ramp-down, and concurrency 
  • Scenario models including real-time simulation, goal-based testing, and SLA validation 
  • Assigning virtual users to various load generators 
  • Periodic result aggregation 
  • IP spoofing setup 
  • Error and transaction tracking 
Example Scenario Setup in Controller:

Based on our Amazon simulation, the Controller might define: 

  1. 3500 users browsing the Amazon products page 
  2. 750 users actively using the checkout process 
  3. 500 users performing payment tasks 
  4. 250 users checking the “My Account” page—but only after payment by 500 users is completed.

The Controller also allows for more complex and dynamic simulation rules, such as: 

  • Starting 5 users every 2 seconds until the total reaches 3500 for product browsing 
  • Running this load for 30 minutes 
  • Temporarily pausing 25 users during execution 
  • Resuming another 20 users afterward 
  • Injecting 2 users per second into the checkout, payment, and account modules 
  • Distributing load across multiple systems (e.g., 2500 users each on Machine A and Machine B) 

Load Generators (Injectors)

Because simulating thousands of virtual users can be resource-intensive, Load Generators (or Injectors) are used to distribute the load. While the Controller orchestrates the load test, the actual generation of virtual users is offloaded to other machines—this ensures accuracy and efficiency. 

Each virtual user consumes system resources (RAM, CPU). So, simulating 10,000 VUsers might require 4 injector machines, each equipped with 4 GB of memory. These injector machines ensure the load is evenly distributed and not limited by the Controller’s hardware. 

Analysis: Post-Execution Insights

After executing the load test, the Analysis module comes into play. It processes the raw data collected during test execution, such as system responses, error logs, and performance metrics. 

During the run, the Controller stores all data—including errors, configurations, and exceptions—in a structured database (output.mdb). The Analysis component reads this database and generates comprehensive graphs and performance reports, which help performance engineers identify: 

  • System bottlenecks 
  • Server-level issues (e.g., with JBoss, Oracle) 
  • Infrastructure limitations 
  • Application inefficiencies 

JMeter:

In today’s digital landscape, ensuring that web applications can handle high user traffic is paramount. Exceeding an application’s load capacity can lead to slowdowns, errors, or even complete outages. To mitigate these risks, load testing becomes an essential practice in the software development lifecycle. 

Created using Java, JMeter enables developers and QA teams to emulate different user scenarios and evaluate application performance under load. 

Notable Features of Apache JMeter

  • Protocol Support: Apache JMeter is a flexible tool that accommodates a wide range of protocols, making it ideal for testing diverse types of applications. 
  • User Simulation: It can simulate multiple users with concurrent threads, creating a realistic load on the server.  
  • Extensibility: Being open-source, JMeter allows for customization and extension through plugins, catering to specific testing needs. 
  • Comprehensive Reporting: Apache JMeter offers robust reporting capabilities that transform raw test data into insightful visualizations, facilitating a deeper understanding of application performance. 

By integrating JMeter into your testing strategy, you can proactively identify performance bottlenecks and ensure that your application delivers a seamless user experience, even under peak traffic conditions. 

If you need assistance with setting up JMeter or interpreting test results, feel free to ask! 

Why Choose Apache JMeter?

  1. Platform Independent
    As a Java-based tool, JMeter runs efficiently on multiple operating systems such as Windows, macOS, and Linux.

     

  2. Supports Multiple Protocols
    Apache JMeter offers robust support for multiple protocols, notably HTTP and HTTPS, enabling testers to effectively simulate user interactions with web applications. This includes testing websites built with technologies like Java, NodeJS, PHP, and ASP.NET, allowing for assessment of response times, throughput, and error rates.

     

  3. Record and Playback Feature
    It enables the recording of user activities within a browser and their playback, streamlining the process of developing test plans.
     
  4. Customizable Reporting
    Apache JMeter offers a variety of listeners to visualize and analyze test results in multiple formats such as charts, tables, trees, and log files. 

  5. Strong Community Support
    JMeter’s extensive user base provides access to comprehensive documentation, tutorials, and forums, offering support and best practices. 

     

  6. Extensible with Plugins
    Apache JMeter’s capabilities can be significantly expanded through a diverse array of plugins, enabling users to customize the tool to meet specific performance testing needs. 

Step 1: Create Your Test Plan

  1. Start JMeter: Open Apache JMeter on your device. 
  2. Create a New Test Plan: Click on New to create a new test plan. 
  3. Add a Thread Group 
  • Click on Thread Group to add your created Test Plan after selecting it. 
  • Click on Test Plan then click on Add and add Threads (Users) and then create Thread Group. 
  • Configure the following: 
  1. Number of Threads (Users): This parameter specifies the total count of virtual users that JMeter will emulate. 
  2. The Ramp-Up Period :It is measured in seconds and it shows how long it will take JMeter to launch every thread. 
  3. Loop Count: This parameter determines how many times each thread will execute the test plan.
blog-2

Step 2: Add a HTTP Request Sampler

blog-3

Add HTTP Request:

  • Insert an HTTP request by right-clicking on the Thread Group. 
  • Goto Thread Group then click on add and add a Sampler then after that add a HTTP Request. 

Set Up Request Details:

  • Protocol: Enter http or https. 
  • Server Name or IP: Indicate the domain name or IP address (e.g., api.example.com). 
  • Port Number: Enter the port if required (default is 80 for HTTP and 443 for HTTPS). 
  • HTTP Method: When configuring an HTTP Request in Apache JMeter, it’s crucial to select the appropriate HTTP method to align with the desired operation on the target resource. 
  • Path: Indicate the API endpoint route (e.g., /v1/users). 
  • Parameters: If your API necessitates parameters, include them in the

Step 3: Add HTTP Header Manager (If Necessary) A diagram of a sampler.

blog-4

Add Header Manager:

  • Right-click on the HTTP Request sampler. 
  • Navigate to Add > Config Element > HTTP Header Manager. 

Configure Headers:

  • Add necessary headers such as Content-Type: application/json or Authorization: Bearer <token>. 

Step 4: Add Listeners for Viewing the Results

Add Listener:

  • Right-click on the Thread Group. 
  • Navigate to Add > Listener. 
  • Choose from options like: 

  1. See the Results Tree: For analyzing the outcomes of your test samples, Apache JMeter’s View Results Tree listener is a crucial tool. 
  2. Summary Report: Provides aggregate statistics. 
  3. Graph Results: Visualizes performance metrics.
blog-1

Step 5: Execute Your Test

  1. Save the Test Plan: To ensure your test configurations are preserved in Apache JMeter, it’s crucial to save your Test Plan before executing any tests. This practice not only safeguards your work but also allows for easy reuse and sharing of your test setups.  
  2. Run Test: To begin a test in Apache JMeter, just click the green Start button on the toolbar. 
  3. Monitor Results: While the test is running, review the outcomes in the configured listeners to evaluate performance metrics such as response time, throughput, and error rates.  

Tips for Effective API Load Testing

  • Use Assertions: To ensure the accuracy and reliability of your API responses in Apache JMeter, it’s essential to incorporate assertions into your test plan. In Apache JMeter, assertions are vital components that verify whether the responses received from the server align with the expected outcomes. By incorporating assertions into your test plan, you can promptly identify discrepancies, ensuring that your application behaves as intended under various conditions. 

  • Parameterize Inputs: To effectively simulate real-world scenarios in your JMeter tests, it’s essential to parameterize your test data. This approach allows you to use dynamic inputs, such as different usernames, passwords, or product IDs, instead of hardcoded values. 
     
  • Include Timers: Insert timers to mimic real user pause times between requests. 

  • Add Think Time Between Requests
    Use timers in your JMeter scripts to imitate realistic pauses, replicating how users naturally interact with an application. 

  • Keep an Eye on Server Performance
    During tests, monitor key system resources—CPU, memory, disk, and network usage—to detect and address any performance bottlenecks. 

Typical Situations in Which Load Testing Is Used:

  • Evaluate web app stability during periods of high traffic. 
  • Test API throughput when several requests are made simultaneous. 
  • And replicate high user-load tasks in business applications. 
  • To verify limits, conduct stress and soak (endurance) and volume tests. 

Sample Use Cases in Load Testing

  • Retail Location Simulation For vehicles, during and phases, the site visits are simulated at the retail lo- cation. 
  • Simulate 500 virtual users that execute common shopping transactions such as a search, add to cart, and checkout. 
  1. Measure how long each operation takes under concurrent load. 

API Endpoint Load Testing

  • Send 1000 simultaneous login requests to an endpoint like /api/login. 
  • Check response times and system stability under heavy authentication traffic. 

Stress Test for a Banking Platform

  • Simulate activity from 2000 users conducting common actions like balance inquiries and fund transfers. 
  • Monitor server load during high-traffic simulations. 

24-Hour Healthcare App Endurance Test

  • Run 100 virtual users for an extended period (e.g., 24 hours). 
  • Ensure there are no performance slowdowns or memory leaks over time. 

Key Guidelines for High-Quality Salesforce Load Testing

  • Frequent Testing is Critical Include performance evaluations as a regular part of your deployment pipeline. 
  • Automate Load Test Execution Use scripts and test plans to automate repeatable scenarios and reduce manual    overhead. 
  • Use Real-Time Monitoring Tools Track app performance using Salesforce-native tools like Shield or third-party APM solutions. 
  • Avoid Production for Load Tests Never run performance tests on your live Salesforce org—use a sandbox or test environment instead. 

Salesforce Load Testing FAQs

  1. What is load testing?
    It scales up from many users using Salesforce at the same time in order to see how the system responds to a load. 

  2.  Why do we have to do this testing?
    It can be useful for detecting delays or failures before real users encounter them — particularly when traffic is heavy. 

  3.  Is it possible to test Salesforce`s new Lightning UI?
    Yes, tools such as LoadRunner with TruClient can simulate real user interaction with Lightning components. 

  4.  What actions should be tested?
    Focus on high-impact actions like record creation, bulk uploads, login flows, dashboard refreshes, and integrations. 

  5.  How many users should I simulate?
    Start with a baseline (e.g., a few hundred users), and scale based on your business needs and peak traffic estimates. 

  6.  How do I handle session-based dynamic data?
    Use scripting logic or correlation to capture and reuse session variables like tokens or IDs. 

  7. Can APIs be tested in this way?
    Yes—Salesforce APIs can be targeted to assess response times and backend performance under simulated load.
     
  8.  How often should tests be done?
    Run them regularly—especially before major releases, data migrations, or org-wide changes. 

  9.  Is it safe to test in production?
    No. Salesforce explicitly disallows load tests in production environments. Use a sandbox or full-copy test org. 

  10.  Which metrics ought to be examined?
    Response latency, failure rates, and infrastructure metrics like memory, CPU, and throughput are important indicators. 

Concluding Remarks: Enhance Salesforce for Scalable Performance

Regular load testing is necessary to make sure Salesforce keeps operating well under duress. By identifying possible performance issues, this procedure guarantees that the platform will continue to be dependable and responsive as usage increases. The best way to create a Salesforce environment that performs well is to combine realistic scenarios, appropriate tools, and a sound strategy. 

Recent Posts