Triumph With Salesforce Testing

Written by Santosh Katkam, Practice Lead, CG Infinity Inc.

Customer Experience is the new brand and it is becoming the top priority for many organizations and how they get there. Implementing and investing into tools, technologies, and some best practices across the SDLC provides organizations the ability to sustain customer data and customer interaction through the business lifecycle and thereby provide outstanding customer service.

Looking at the trends from the last few years, the use of CRM platforms/tools for building e-commerce sites to retain customers has had a tremendous surge, and this trend is not going to stop for at least another decade.

According to Grandview Research, the global CRM market is estimated to hit the value of $114.4 billion by the year 2027, registering a compound annual growth rate (CAGR) of 14.2 percent over the prediction period.

According to Statista, in its 2020 fiscal year, Salesforce’s annual revenue reached $17.1 billion, a record high.

Several CRM’s Software/Systems enable businesses to manage customer relationships seamlessly, but Salesforce stands out as one of the best CRM’s.

Why Salesforce?

The list could be long but the key reasons why Salesforce is one of the best CRM’s is the fact of how easy it is to implement and how it provides some of the cool OOB (Out of the Box) feature as follows:

  • Multitenant Platform
  • Salesforce Cloud Apps
  • Customization
  • Integration Options
  • Scalability
  • Cutting Edge Technologies
  • Self-paced Learning

Why Do We Need Salesforce Testing?

The standard rule of Salesforce requires a developer to achieve 75% of code coverage with unit test cases but this does not guarantee that the application is error-free, meets all the business requirements and supports the business goals.

There will be still a major chunk of functionality that is dependent on the code that is neither covered nor validated as part of the unit test coverage (i.e. 75% standard rule).

Why Is Salesforce Testing So Important?

  • It ensures that the intent of functionality is in line with the business requirements
  • It verifies that the finished system can support the customer’s business processes
  • It ensures the configuration and code is functional
  • Process builders/Workflow feature helps you to check the working condition and behavior of the system
  • It provides validation of End-to-End functionality (This could be achieved using Apex test but maintaining the test and test run time will be a challenge)
  • It helps ensure the Salesforce schedule releases (3 times in a year) does not impact the current functionality
  • It helps identify the issues/bugs early in the process

A few studies and research also found that, even though all software errors can’t be removed yet, more than a third of these expenses could be reduced by an improved test infrastructure. This, in turn, allows more effective identification and deletion of software defects.

As per the recent study:

  • Software defects charge almost $60 billion annually
  • 80 percent of development costs entails detecting and correcting faults/anomalies


QA Best Practices

Here are some best practices that can be followed when performing Salesforce Testing:

Understand the Test Requirements

It is very important to make a distinction between the Salesforce built-in features and the custom features that are being developed. The primary focus should be around defining the custom features and requirement, and then building the test strategy to perform testing since the out of the box features do not require any testing as they are fully validated.

Plan Your Test

As a test engineer, one should clearly define what types of testing are required to perform and define tasks for each type of testing that will be executed. Here are most common types of testing that can be used:

Unit Testing:

Usually performed by the Apex Developers to ensure the code coverage has met the standard Salesforce rule (75%), where as a test engineer ensures the standard rule is met.

Functional Testing or System Integration Testing

Validating the application based on the custom requirements and testing a system’s technical and business processes from beginning to finish which includes VF Pages, Apex codes, Workflows, Forms and Process builder, exercising bulk trigger functionality, running the test as real user profiles, etc.

Performing UI testing that covers the critical user functionality can be achieved effectively by using automation tools like Selenium WebDriver.

Regression Testing

Regression Testing is performed to ensure the existing functionality is not impacted with the introduction of new features and/or updating the code for a bug fix. Multiple options are available as to how and when regression can be scheduled and can leverage some of the automation tools to run regression at regular intervals.

UAT Testing

UAT testing is performed with the production-like data in the UAT environment to make sure all the business rules and real-world business cases are working as intended and, in most cases, the UAT is performed by the business users.

Production Testing

Production testing in Salesforce allows the user to test whether config and code have been correctly deployed from sandbox to production environment.

Use of Automation Can Significantly Boost the Process

It is important to build a robust custom automation framework to sustain and to support continuous release and updates on Salesforce’s platforms.

Implementing test automation will significantly reduce costs, reduce manual intervention, and helps mitigate business risks.

Execution and Maintaining Tests

Setting up the schedule to run regression test suites and updating the tests accordingly fully integrates the automated testing into the deployment process to ensure the highest level of test coverage.

Establish a defect review committee inviting all the cross functional teams to talk through defects and discuss possible solutions.


Associate With the Right Testing Partner

Organizations are often nervous about Salesforce testing because they may not know how to conduct it properly. Implementing Salesforce application and effectively testing is not a simple and straightforward process. Onboarding the experienced Salesforce testing partner will help the organization to achieve their ROI and business goals.


CG Infinity is a global Salesforce partner with a successful track record in planning and delivering complex projects. We put strong emphasis on certification of our Salesforce consultants, bringing innovation and deep cross industry domain expertise to our projects.