Salesforce Testing Tutorial

What is Salesforce?

Salesforce is the world’s first cloud-based CRM system. It was founded by Marc Benioff and Parker Harris in March 1999. The purpose of developing this CRM platform is to help users affordably and easily – sell, service, market, analyze and connect with their clients.

SFDC(Sales Force Dot Com) has many standard features which help you to manage your relationship with prospects and customers. It also allows you to engage and collaborate with employees and business partners to store their data securely in the cloud.

What is SalesForce Testing?

A great thing about Salesforce is that many of the out-of-box features can be customized to suit a company’s needs. Salesforce testing is a validation of the configuration and customization performed in vanilla SDFC.

The challenge is to ensure that a tester is checking the code which has been customized in place of testing built-in salesforce functionality.

SalesForce CRM is built on a platform development language called APEX. It also provides many built-in unit test cases for developers to validate their code.

Why Salesforce testing?

Here are prime reasons for conducting salesforce testing:

  • Allows you to check that configuration and code is functional.
  • Helps you to verify that the finished system can support the client’s business processes
  • Helps you to confirm that the system’s initial build meets the agreed requirement
  • Helps you to catch problems early, while they’re easy to fix
  • Functional flows report based on the status of test cases. This allows the team to create the functional flows to know the functionality of the application
  • Process builders feature helps you to check the working condition and behavior of the system
  • Workflows allow you to check the functionality of time-based events

Types of Salesforce Testing

Manual Testing:

Manual software testing process includes the testing of the App by using traditional methods. QA team can use manual testing can be used to execute functional testing, happy path testing, integration testing, regression testing, and system testing.

Automated Testing:

Automated testing involves a computer program to test a or app. Automated testing tools like Selenium, Assure Click, QTP, etc., are used.

Levels of Testing in Salesforce

In the Salesforce Testing tutorial, we explore the following levels of Testing that usually apply to Salesforce.

Unit Testing

  • The unit testing process is conducted by Apex developers. It involves writing clauses in their code that automatically test its coverage.
  • It helps you evaluate how many data records are affected so that the code would successfully run in that environment.
  • To deploy Apex code into a Production environment, your code coverage ratio should be a minimum 78%

System Testing:

  • It Is performed by an expert team of Salesforce consultants
  • Involves testing system’s technical processes from beginning to finish
  • Involves test script based on specific outputs
  • Allows you to troubleshoot a problem with automated rules in the system like workflow, validation, assignment, etc.

UAT Testing:

  • It Is conducted by the users who will use the application
  • Allows to test the system’s ability to support the business processes
  • UAT testing following a test script based on what happens in the business
  • The desired output should be that the client confirms that the system is fit for purpose

Production Testing:

  • It is a repeat of system testing in the Production environment
  • Product testing in salesforce allows you to test whether config and code have been correctly deployed from sandbox to production environment or not
  • If there is time left before the final project launching, then the client should run through UAT scripts again post-deployment

Regression Testing:

  • The main object of Regression testing is to test whether code and config releases is affecting existing user processes of the system
  • It will be conducted once an enhancement or a fix is deployed to production.
  • The user provides a list of changes that may impact their current process

Salesforce Testing Process

The testing process of Salesforce is the same as any normal web-based application. The tester should have a clear perspective of the customizable features which are built during the test process. It helps them to focus on that customized code instead of the built-in Salesforce features.

Developers and testers should use the Sandbox environment (Test Environment) for each of their purposes. Tested code in the Sandbox environment is deployed to production from the Sandbox environment. It is assumed that the QA tester has the basic knowledge and understanding of the terms used in Salesforce.

Salesforce Testing challenges

Salesforce testing is not an easy process. There are many challenges that were faced during the process by the tester. Some of them are:

  • Testing advanced features like Visualforce, Salesforce, or Service Cloud Console is difficult.
  • You need to recreate all your classic tests for the Lightning UI
  • Some of the standard functionalities, although not in use, can’t be removed
  • GUI tests don’t work when we switch to the test environment
  • Automated tests should be able to work in all your test environments
  • Issues occur while creating field locators for the Salesforce screens because some field IDs differ between Organizations

Best practice for Salesforce testing

  • Run tests as real user profiles
  • Test Data should be prepared to validate the reports functionality
  • The testing method must include functional testing, UI testing, regression testing, and system integration testing
  • The dynamic nature of visual force pages should be paid special attention as all the elements of a webpage may not be loaded simultaneously
  • Automation testing should be performed using tools like Selenium and HP Unified Functional Testing
  • Salesforce tester should consider which include positive and negative flows
  • User roles must be constructed and tested using Workflows

Roles and Responsibilities of a Salesforce Tester

Important roles and responsibilities of Salesforce testers are:

  • Should be able to conduct Smoke Testing to make sure all the major functionalities are functioning as per requirement
  • Create both positive and negative Test Scenarios
  • Able to perform Equivalence Partitioning and Boundary Value Analysis
  • Testers are also needed to work on the application and gain an understanding of its functionality to create a functional map.
  • A tester should have an easy communication channel with the development team.
  • He should understand the customizable features which can be built for the Salesforce app.
  • The tester needs to execute role-based test cases to ensure the consistency of data.
  • He should also perform a compatibility test in case Salesforce integrated with third-party applications.
  • A Salesforce tester should be familiar with load testing tools like JMeter to validate the complex flows, which can offer inconsistent results in Salesforce.
  • Knowledge of Apex

SalesForce Test Automation Tools

Performing automated functional testing in SalesForce is challenging as most of the test web pages are dynamic. Therefore, the tester needs to build a robust automation framework that should be useful today and in the future.

Below, given are widely used Salesforce testing tools:

1) Tricentis Test Automation for Salesforce

Tricentis Test Automation for Salesforce is the fastest way to create your most resilient UI tests for Salesforce applications and ecosystems. Tricentis AI-powered self-healing and auto-improving Smart Locators keep your tests stable and minimize maintenance.



  • Customers can validate their complete end-to-end scenarios extending from their web application to Salesforce and back.
  • It integrates with your tools so you can stay in your workflow and get results on CI builds.
  • Agile teams with mixed skill sets scale their testing operations efficiently with features to help them control and manage the growth in tests and teams.
  • Run Apex code in a test step to validate query results
  • Integrate API tests

Visit Tricentis >>

2) testRigor

testRigor for Salesforce is an excellent solution to create ultra-stable UI tests using only plain English commands, no coding skills are required.



  • Effortlessly build end-to-end tests from scratch, convert existing manual tests, or utilize an included record-and-playback browser extension
  • Seamlessly integrate with other tools for test case and issue management, as well as with your CI pipeline
  • No more tedious test maintenance. Spend up to 95% less time on it.
  • Web, Mobile, API testing. All browsers, iOS and Android OS systems supported
  • Ultra-reliable tests with detailed screenshots at each step

Visit testRigor >>


ACCELQ is an AI-powered Codeless Test Automation platform on the cloud that seamlessly automates Web UI, API, Mobile, and Desktop. ACCELQ customers are Fortune 500 enterprises across industry verticals globally, and they have adopted ACCELQ to accelerate their automation objectives significantly. ACCELQ is proven to speed up automation development by 3 times and bring down maintenance by 70% which translates to over 50% of cost savings and enables alignment with Continuous Delivery.



  • Codeless, No vendor lock, Built-in framework
  • Any browser & OS, cloud-based, actionable reporting
  • Visual test, comprehensive taxonomy, requirement mapping
  • In-sprint automation, Web-Mobile-API & Desktop, Plug & Play
  • Business process, Automated, Visual
  • All-inclusive subscription, unlimited agents, 50% savings

Visit ACCELQ >>

Why use Salesforce Testing Tools:

  • Helps you to save 75% of your time and 25% of your test automation costs
  • Offers better Apex Test Execution, detailed test coverage, and class coverage reports
  • You can take advantage of industry-leading automation tools like Selenium and JMeter.
  • Auto-generate test scenarios to run for different environments and multiple browsers
  • Seamlessly record and playback your recorded test cases
  • Helps you to automate all types of pre- and post-deployment tasks
  • Salesforce testing process separate data from test script and allows you to enhance with multiple datasets

Sample Salesforce Test Scenarios

  • Test Case 01: You can capture the contact information of the lead/client
  • Test Case 02: Contacts can be marked active/inactive
  • Test Case 03: Any company can be marked as a Customer or Prospect
  • Test Case 04: Leads can be captured with the help of web forms
  • Test Case 05: Price in Quotation cannot be zero
  • Test Case 06: Email should be sent once the deal is closed. Bounced emails if any, should be handled
  • Test Case 07: Integration with third-party software should be working properly
  • Test Case 08: Billing services should work as expected
  • Test Case 09: No duplication of records in contact, opportunity, and lead management.
  • Test Case 10: Mobile workflow works as expected
  • Test Case 11: Unauthorized users must not have access to Files.

Salesforce Testing: Client Challenges

Clients are always nervous about Salesforce testing because they may not know how to conduct it properly. As a result, they have a myth that is very much distinct from reality.

Here are some of them:

Client Issues Solution
Don’t know how to use the Salesforce system. Clients need to test their process, not the system’s functionality.
We can’t test without all our data being present in the system. They only need a few sample records to test.
I don’t have spare time to test and my daily job They should keep in touch with PM and regular check-in calls in the design and build stages.

Salesforce Testing Tutorial Summary

  • Salesforce is the world’s first cloud-based CRM system
  • Salesforce testing is the validation of the configuration and customization performed in vanilla SDFC
  • Salesforce testing helps you to verify that the finished system can support the client’s business processes
  • The biggest challenge of SalesForce Testing is to ensure you are testing the customization and not the inbuilt SDFC features.
  • Important Levels of Salesforce Testing are Unit Testing, System Testing, UAT Testing, Production Testing, Regression Testing
  • The biggest challenge of Salesforce testing is that you need to recreate all your classic tests for the Lightning UI.
  • Salesforce tester should run tests as real user profiles
  • Salesforce test should be able to conduct Smoke Testing to make sure all the major functionalities are functioning as per the requirement
  • Selenium web driver, HP Unified Functional Testing (UFT), and Cucumber, are a few important salesforce testing tools