Performance Testing Using LoadRunner In SalesForce Application

Now-a-days users don’t want to sit with the slowly performing applications when they are doing online-booking, purchasing products etc.


Now-a-days users don’t want to sit with the slowly performing applications when they are doing online-booking, purchasing products etc. To provide the speedy applications to the users, performance testing is essential. In this article, we will have a look at how to do performance testing of a Salesforce application using LoadRunner– a commercial performance testing tool by Hewlett-Packard.

LoadRunner Overview:

LoadRunner is the performance testing tool that helps to capture the system performance. It can act as a real user and it applies the user load on server to get the system responsiveness. Also, it supports more number of protocols and scripting languages.

LoadRunner has three components and details below

  • VuGen – Helps to create the performance test script based on client and server communication. It has record and replay options.
  • Controller – It is used to run and manage the performance tests.
  • Analysis – It provides the detailed results of test including different types of graphs.Loadrunner

Scenario Used for Sales Force Application Scripting:

  1. Log into the Salesforce application
  2. Click Lead tab to create a Lead
  3. Fill in the fields for lead creation
  4. Click the Save button to save the lead
  5. Click the Convert button
  6. Again, click Convert button to convert the lead
  7. Verifies the Lead has converted by checking the Account and Contacts page

Performance Test Script Preparation:

Using VuGen, we can record and prepare the test script by doing the business actions. Once VuGen is opened, we can create a new script by clicking the Add New script icon. Here, the Web-HTTP/HTML protocol is selected for recording.

LoadrunnerClick the Start Recording button to record the Salesforce business action. Enter the Salesforce Login URL in URL Address box and click start recording. Once we start the recording, it will capture all the data used in the browser

LoadrunnerAfter completing all the steps mentioned in the business scenario, we can click the stop recording button and the LoadRunner finalizes the recording process and tests script is generated using C language

LoadrunnerWe have the recorded script here and the script is recorded for single user behaviour. We need to make sure that the script will work for multiple users to simulate a real-time user by doing below customization,

Parameterization (helps to simulate different user inputs):

Done the parameterization for Contact Name with different Values as below:

  1. First created the ‘.dat’ file. In the file, we can insert multiple values (Every time will create new contact for new user).
  2. Then, created a new variable called P_ContactName with Parameter type as ‘File’
  3. Replaced the Contact Name with created Parameter Name

LoadrunnerSimilarly, we have done the Parameterization for Username, Password, and Account Name.

Correlation (To Handle the dynamic data which is returned by server):

After recording, the script correlation was done for the dynamic value ‘RecordID’ as below:

  1. Used Code Generation Log for checking where exactly the ‘RecordID’ is present
  2. Selected the Left boundary and right boundary for the first occurrence(ordinals) for RecordID
  3. In ‘Response Body’ found the RecordID value
  4. Created the Correlation function (web_reg_save_param) to get the dynamic value for ‘RecordID’. Correlation function is below
  5. Replaced the dynamic value of ‘RecordID’ with created Correlation value C_RecordID.Loadrunner
  6. In the same way, done the correlation for other values like Confirmation IDs and replaced with the correlated value.

 Performance Script Validation:

A verification point in the form of text check is inserted before closing the transaction to confirm that the server is responding with the correct response. In case the response is not as expected, the text check will fail, and that will fail the whole transaction also.

LoadrunnerIn the same way, keep the text check for every page to verify all the pages loaded accessing in the application and validate the same by running multiple iterations.

Test Execution:

By using controller, we can setup the performance test scenario to run the performance test. Once the customization of the script is complete, we need to upload the script into the controller. Here we Configured the settings in controller to run the test for 10 mins with 2 users. After the test scenario is ready, we can click the run button (highlighted) below and it completes the test after 10 mins.

LoadrunnerResult Analysis:

After execution of the test, the Controller combines all the monitoring logs and it makes them available in analysis component. In Analysis, we can get the performance test results for the test ran. Below result shows the Response Time for each transaction.LoadrunnerAlso, the LoadRunner provides different types of graphs to find the performance issues. Below is the Hits/Second and throughput graph.

Hits Per Second Graph: No of requests made to the server

Throughput: No of responses received from the client server

Note: Hits per second graph and Throughput graph values should be directly proportional.


Using LoadRunner, we can measure systems’ end-to-end performance and can identify the performance issues before the application goes to production/end-user. It provides very detailed test results and helps analyze the performance issues.


About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Recent Articles

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.