Performance Testing of Salesforce Applications

Performance Testing of Salesforce Applications
09Sep, 2022

How many times have we come across applications or websites that start witnessing performance issues when there is a high load on it. We all love online shopping, the excitement doubles up during the festive season 🙂 However, the excitement might die down if the website (or app) on which you are shopping throws up page timeouts, internal server errors, and more.

All these factors can be a huge turn off for the visitors to the site and impact the sales, growth, and other business metrics of your business. Such type of performance issues can be avoided, or least mitigated, with performing testing of the AUT (Application Under Test). Thorough performance testing ensures that the AUT is ready to be used at a large scale, a factor that has become extremely important in today’s times.

Performance testing can be performed using open-source as well as proprietary tools, the choice depends on the in-house expertise and the project requirements. Also, performance testing is agnostic of the industry since it must be performed whether you are in e-commerce or fintech or BFSI or any other sector. The same principle also applies to cloud-based applications, including Salesforce apps.

The Salesforce services market is expected to reach a valuation of $33.51 billion in 2029, growing at a CAGR of 14.4 percent in 2022. Salesforce applications are used in a wide array of industries – BFSI, healthcare, retail, manufacturing, media, communications, and more. Visualforce pages and Apex classes are the critical components of any type of Salesforce application. Hence, it becomes necessary to optimize the performance of the Visualforce pages as per the best-practices guide by Salesforce. In this blog, we look into Salesforce testing from the lens of a performance tester.

By the end of this blog, you would be in a position to devise a scalable and reliable salesforce testing strategy that will help you run performance tests at scale. So, let’s get started…

What is Performance Testing?

For starters, performance testing is the process of testing your website or application under different types of workloads. The intent of performance tests is to test the product features from the viewpoint of reliability, responsiveness, and scalability.

The intent of performance testing is pretty clear – the features should work seamlessly even when there is a significantly high load on the front-end and/or the back-end.

Since Salesforce is largely used in CRM use cases, Salesforce CRM testing has to be taken up on priority by the application developers. Here are some of the major reasons why Salesforce performance testing is essential:

  • Helps early unearthing of issues that could crop up at different load conditions
  • Assurance that the AUT will work as expected under different load conditions
  • Testing the AUT from all the important aspects – reliability, scalability, responsiveness, and more
  • Providing top-notch user experience to the intended audience of the application

Load & Performance Testing

Salesforce Performance Testing Best Practices

Now that we have covered some of the essentials of performance testing, let’s look into some of the best practices for salesforce performance testing:

  • It is recommended to get in touch with Salesforce support for consent to run performance tests on the app

If not done, you might face some serious repercussions i.e. revocation of Salesforce account, levy of additional charges based on the increased usage (or load)

  • Always optimize your application for component hierarchies, view states, HTML, CSS, JavaScript, and other technologies used in creating Visualforce pages in Salesforce. It is recommended to refer to Best Practices in Salesforce Visualforce Pages Performance Guide by Salesforce before you proceed with the activities related to testing
  • Irrespective of the scale of the performance test, it is recommended to look into the ​​Salesforce Performance Testing FAQs so that performance tests can be performed at a larger scale

Also Read: Beginners Guide to SalesForce CRM Testing

Key KPIs in Performance Testing

Here are some of the key KPIs that need to be tracked when running performance tests:

  • Reliability It indicates whether the software is reliable and secure for external usage or not
  • Stability – It indicates whether the behavior of the software is not rattled when it is subject to higher loads
  • Scalability – It indicates whether the software is scalable enough to handle a certain amount of load at any given time

The same KPIs must also be tracked for Salesforce performance testing. Like any other software product, you should try different forms of performance tests – endurance tests, load tests, spike tests, volume tests, scalability tests, and more when testing Salesforce applications.

Salesforce Performance Testing Process

You can use popular performance testing tools like Apache JMeter to test Salesforce applications. The entire activity starts with a Test plan and the subsequent steps involve execution of the steps mentioned in the plan.

Shown below is the performance testing methodology of Salesforce applications:

salesforce performance testing

Source

Like any other form of testing, you need to have a clear understanding about the requirements of the application. Post that you need to document what essential things need to be tested. Once you have drilled down the first two requirements, it’s time to shortlist the appropriate testing tool.

Once the tool is selected, you need to create a detailed test plan. Now is the time for some action since you could now start writing tests. Before you could run the tests, you need to create a test model that lets you view the test execution results.

Finally, it’s time to run the tests 🙂 After the tests are executed, you should compare the results with the expected results and decide further course of action.

Test Plan

All the major project stakeholders (i.e. developers, managers, testers, etc.) must be involved in the development of the test plan. It must document about the environment on which tests must be performed, schedule of tests, test scenarios, and test criteria (i.e. when tests are considered pass or fail).

Client-Side Metrics for Measurement

You need to take into account the Salesforce architecture when prioritizing the metrics. As recommended by Salesforce, you should consider using Experience Page Time (EPT) for performance testing of Salesforce lightning apps (or pages) and communities.

Every component of Lightning pages communicates with the Salesforce backend and EPT lets you know when the page has some instability.

Also Read: 7 Best Practices for Salesforce Testing

Server-Side Metrics for Measurement

Akin to the client-side metrics, you also need to measure the server-side metrics for ensuring that the Salesforce application is working as expected. Here are some of the important metrics that must be monitored as a part of the Event Monitoring Process.

  • Run Time (RUN_TIME)
  • CPU Time (CPU_TIME)
  • Database CPU Time (DB_CPU_TIME)
  • Database Total Time (DB_TOTAL_TIME)

The above-defined metrics lets you identify the time being spent on database calls, database tiers, application tiers, and more.

Like any other form of application, once a user is logged into the Salesforce application, he/she is assigned a unique SESSION_KEY. The combination of SESSION_KEY, USER_ID, LOGIN_KEY, and REQUEST_ID are used to get a glimpse on what is happening on the front-end and back-end of the Salesforce application.

Development of test model

As mentioned earlier, the test model must consist of test scenarios, test measurement techniques, peak loads and normal loads for every scenario, etc. Application throughput and response time are the two important metrics that must be considered in performance testing of Salesforce apps.

Shorter response times and higher throughout are ideal for the application. This means that the client side of the app is able to receive responses from the server at a faster pace. Throughput indicates the number of requests per unit time (seconds or minutes).

Apart from our extensive experience in Salesforce performance testing, we also take cues from Official Salesforce mini-guide for performance testing.

Salesforce Testers

Conclusion

Performance is an integral part of any form of application, the same principle also applies to Salesforce applications. Performance testing helps in ensuring that the application works without any issues even when a large number of users are concurrently using the application.

In this blog, we looked into how to leverage performance testing to build a scalable and reliable Salesforce application. Even if you are an experienced Salesforce professional, it is recommended to refer to the official testing guides by Salesforce so that you can use the best practices in your testing strategy.

Avatar for Mit Thakkar
About The Author
Digital Marketer at KiwiQA: Software Testing Service Provider Company Worldwide.

ISO Certifications

CRN: 22318-Q15-001
CRN:22318-ISN-001
CRN:22318-IST-001