Salesforce Testing Tutorial (What, Process, Best Practices,Tools)


Salesforce is the first cloud-based Customer Relationship Management System (CRM system). It was first developed by Marc Benioff and Parker Harris in 1999. The aim of developing this system was to help the users sell, service, market, analyse and connect with their customers easily and at an affordable price.

Salesforce provides us with the fastest path from idea to the real app or software. It helps us focus on our product using the Salesforce tools, instead of building the tools and other infrastructure on our own. Therefore, it saves us years of time and a lot of money.

The traditional CRM systems usually take a whole year or even more to get deployed, while Salesforce takes a few months or even weeks for the same. It is easy to use, and we can spend more time putting it to use and less time understand it. As easy to use and can be customized to meet the business demands, Salesforce becomes very effective.

Salesforce can be used from anywhere provided that we have the Internet access because it is in the cloud. Moreover, it easily integrates with the third-party apps. For example, we can integrate Salesforce with Gmail, we can integrate it with our accounting software, etc. While, with the traditional CRM systems the integration becomes difficult. It is affordable, considering the vast variety of capabilities.

Sales Force Dot Com (SFDC) provides its users with various standard features that helps in managing the relationship with clients. It also helps engage and collaborate with the employees, business partners and other stakeholders to securely store the data in the cloud.

Salesforce Testing

With Salesforce, we can customize many out of the box features to meet the company’s requirements. We perform salesforce testing to validate the configuration and customization performed in Vanilla SDFC. It ensures that the enhancements and feature updates do not fail other elements of the Salesforce environment.

One of the challenges we face in Salesforce testing is to make sure that the testing team is checking the software code which has been customized, and not the built-in Salesforce functionalities. Salesforce CRM is developed on a platform development language called APEX (Advanced Programming Experience) which offers developers various built-in unit test cases to validate the software code.

Need of Salesforce Testing

  • It allows us to check whether the configuration and the software code is functional or not.

  • It helps verify whether the finished system supports the customer’s business processes or not.

  • It helps ensure that the initial build of the system meets the specified requirements.

  • It helps discover defects or bugs early so that they can be fixed easily.

  • It provides functional flow reports on the basis of the status of the test cases. This helps us create functional flows to determine the functionality of the software.

  • The process builder feature helps check the working and behaviour of the software.

  • The workflows enable determining the functionality of the time-based events.

Types of Salesforce Testing

  • Manual Testing  − This includes the testing of application using the traditional methods. in Salesforce testing, the testing team performs functional testing, integration testing, regression testing, and system testing.

  • Automated testing  − – This involves a computer program to test a or application. Tools for automated testing includes Selenium, Assure Click, Cucumber, UFT (Unified Functional Testing), etc.

Testing levels in Salesforce

  • Unit Testing  − This testing is performed by APEX developers. It involves writing clauses which automatically tests its coverage. It helps determine how many records are affected, so that the software code can run successfully in that environment. To be able to deploy the APEX code into the production environment, the code coverage ratio should at least be 78%.

  • System Testing  − – It is performed by a team of Salesforce Consultants. It involves testing the technical processes of the system. The test scripts are based on specific outputs. It helps us resolve problems with automated rules in the system, e.g., workflow, validation, assignment, etc.

  • UAT (User Acceptance Testing) Testing  − It is performed by the users of the application or software. It allows testing the ability of the system to support the various business processes. It involves the test scripts which are based on what happens in the business. The desired output must be confirmed by the customer such that the system is fit for the purpose.

  • Production Testing  − It is just like the System testing performed in the production environment. This testing allows us to test whether the configuration and the software code have been correctly deployed from the sandbox to the production environment or not. Provided that we have time before launching the product, the client should re-run the UAT scripts post deployment.

  • Regression Testing  − This testing is performed to determine whether the software code and configuration releases can affect the existing user processes of the system. It is performed after an enhancement or a fix is deployed to production. The user gives a list of all the changes which may affect the current process.

Process of Salesforce Testing

The test process of Salesforce is quite similar to that of any other normal web application. The testing team must have a clear idea of the customizable features which are built during the testing. It helps us emphasize the customized code rather than the built-in Salesforce features.

Developers and testers use the sandbox environment for their respective purposes. The tested code is deployed to the production environment from the sandbox environment. In Salesforce testing, it is usually assumed that the testing team has the basic knowledge and understanding of the common terms involved in the Salesforce.

Challenges in Salesforce Testing

Salesforce testing process is not a piece of cake. The testing team faces many challenges during the process. Some of which are −

  • It is not easy to test the advanced features, e.g., Visualforce, Salesforce, or Service Cloud Console, etc.

  • We have to re-create all the traditional tests for the Lightning UI.

  • Some standard functionalities which are not even in use cannot be removed.

  • While switching to the test environment, GUI (Graphical User Interface) tests do not work.

  • Automated tests must work in all test environments.

  • We face problems while creating field locators for the Salesforce screens due to the difference between field IDs in terms of Organizations.

Best practices for Salesforce Testing

  • Run the tests as if they were real users.

  • Prepare the test data to validate the functionality reports.

  • Make sure the testing method includes functional testing, UI testing, regression testing, and integration testing.

  • Put more focus on the dynamic nature of the Visualforce pages because all the elements of a webpage may not load simultaneously.

  • Automated testing should be done with tools such as Selenium, and UFT (Unified Functional Testing).

  • The tester should define what includes positive flows and negative flows.

  • Construct and test the user’s role with the help of Workflows.

Responsibilities of a Salesforce Tester

  • They should be able to perform Smoke Testing to ensure that all the major functionalities are functioning as per the specifications.

  • They have to create positive as well as negative test scenarios.

  • They have to perform equivalence partitioning analysis as well as boundary value analysis.

  • They have to work on the software and gain the idea of its functionalities inn order to create a functional map.

  • The testing team must have a communication channel with the development team.

  • They must clearly understand the customizable features which can be built for the Salesforce software.

  • They have to execute role-based tests to make sure that the data is consistent.

  • They have to perform compatibility testing if Salesforce testing is integrated with third-party applications.

  • They should have the basic idea and understanding of the load testing tools, which are used for validating the complex flows which can provide inconsistent results in Salesforce.

  • They must have the knowledge of APEX.

Automation tools for Salesforce Testing

It is very challenging to perform automated functional testing in Salesforce because most of the web pages are dynamic. That is why we need to create robust automation framework which is useful today as well as in the future.

Some of the widely used Salesforce testing tools includes −

  • UFT
  • Cucumber
  • IDE
  • Change sets
  • Ant/ Migration tool
  • Workday

Benefits of using Salesforce testing tools

  • Saves 75% time and 25% money.

  • Provides better APEX tests execution, and detailed test coverage and coverage reports.

  • Industry-leading automation tools like Selenium and JMeter can give an advantage.

  • We can auto-generate tests for various environments and browsers.

  • We can easily record and playback the recorded tests.

  • These tools help automate pre- and post-deployment tasks.

  • We can separate data from test scripts and improve multiple datasets.


Salesforce is the first cloud-based CRM system based in San Francisco, USA. It is used to validate the configuration and customization performed in Vanilla SDFC. This testing verifies whether the end product meets the customer’s business processes or not.

Salesforce has a dedicated community of developers and testers. It can be used with a web browser without installing additional hardware or software, thus making it an ideal choice for the organization

The main challenge involved in performing Salesforce testing is to ensure that it is the customization which we are checking, and not the in-built SDFC features. The different levels of Salesforce testing are; unit testing, system testing, UAT testing, production testing, and regression testing. Another challenge involved in Salesforce testing is that we have to re-create all the classical tests for the Lightning UI.

Updated on: 29-Oct-2021


Kickstart Your Career

Get certified by completing the course

Get Started