Salesforce Testing Tutorial: A Beginners Guide

Salesforce, as we all are aware, offer best-integrated development Environments, and programming tools.

After the 2 key grand acquisitions of Tablue and Mulesoft, company is expecting its revenue to be double in size by fiscal 2024, which translates to revenue between $34 to $35 billion.

Well, how about the Testing of Salesforce applications? What types of Testing we can perform, what challenges are there and the testing best practices specific to Salesforce apps? Made an effort to give a quick overview of Salesforce Testing. Hope it would add some value to the Salesforce beginners.

What is Salesforce!

  • Before starting this Salesforce testing tutorial, lets see what’s Salesforce!, Inc. (usually abbreviated as SF or SFDC for is an American cloud-based software company headquartered in San Francisco, California.
  • Salesforce was ranked first in Fortune’s 100 Best Companies to Work For in 2018 and second in 2019.
  • The primary purpose of a CRM tool is to sustain the relationship of an organization with its customers once the product is delivered to customers.
  • Over the time, along with providing CRM services, Salesforce started to offer cloud storage as well, which reduced the hassle of maintaining physical servers for data storage of web applications.

What is SalesForce Testing?

  • Salesforce testing is a validation of the configuration and customisation performed in Salesforce.
  • Salesforce CRM is built on a platform development language called APEX.
  • It also provides built-in unit test case for developers to validate their code. Manual Testing in Salesforce is performed by the QA team which includes happy flow testing, functional testing, integration testing, regression testing and system testing.
  • Automation Testing in Salesforce can be done by any of these tools available in the market—Provar, AutoRABIT, Assure Click, Selenium and QTP. Selenium is the best choice as it is the open source tool.
  • Functional flows report based on status of test cases, where testers are required to create the functional flows to understand the functionality of application.
  • Process builders to check the behaviour of the system, by giving different entry and rule criteria.
  • Workflows to check the functionality of time-based events.

Why Salesforce testing?

  • More than 82,000 companies use Salesforce platform worldwide.
  • Helps to maintain a positive relationship with the customers.
  • Enhanced communication between customers and organisations.
  • Automation of daily tasks.
  • The productivity of the developers would be increased as Salesforce provides inbuilt objects to reduce the development effort.
  • No additional software is required to use Salesforce.
  • Developers can reuse the existing applications through the built-in Salesforce app store named App Exchange. Salesforce also allows the developers to build their own custom applications.
  • Inbuilt reporting mechanism.
  • Salesforce administrator can create internal users within the Salesforce platform.
  • Allows you to check that configuration and code is functional.
  • Helps you to confirm that the system’s initial build meets the agreed requirement
  • Process builders feature helps you to check the working condition and behaviour of the system
  • Workflows allow you to check the functionality of time-based events

Salesforce Key Terminology

  • Salesforce Objects
    Salesforce Objects are database tables which permit us to store data specific to the organization. Standard Objects: Standard objects are that
  • Salesforce Standard Objects
    Salesforce comes with a large number of standard objects that are integral to Salesforce, but you can also create custom objects.
  • Salesforce Custom Objects
    All the items created by external forces and not by are known as custom objects
  • Relationships
    Master-Detail, Lookup
  • Record
    This is made up of a bunch of fields that hold information to describe a specific item. For example, a contact record typically contains fields pertinent to a person, including name, title, phone number, and e-mail address. A record is displayed on a detail page
  • Accounts
    Companies or individuals that are involved in a business relationship. These can be partners, customers or competitors.
  • Contacts
    Individuals within the accounts.
  • Opportunity
    An event or activity for revenue generation.
  • Case
    A problem which a customer may have raised.
  • Solution
    The description of issues and their resolution.
  • Forecast
    Estimated quarterly revenue of the organization.
  • Folders
    Holds the documents and determines the access to all the documents within it.
  • Report
    Analysis of all data that is stored in custom or standard objects.
  • Dashboard
    Graphical data or groups of charts, generated from reports.
  • Activity
    It includes calendar events and tasks.
  • Products
    These refers to items that are sold to customers.
  • Campaign
  • Marketing projects.
  • Lead
  • The companies that are interested in your product.

Levels of Testing in Salesforce

Unit Testing

  • Unit testing process is conducted by Apex developers. It involves writing clauses in their code which automatically tests its coverage.
  • It helps you to evaluates how many records of data are effected, so that the code would successfully run on in that environment.
  • To deploy Apex code into a Production environment your code coverage ratio should be minimum 78%.

System Testing

  • Performed by an expert team of Salesforce consultants.
  • Involves testing of the developed system’s technical processes from start to finish.
  • Involves test script based on specific outputs.
  • Allows you to troubleshoot a problem with automated rules in the system e,g, workflow, validation, assignment.

UAT Testing

  • It Is conducted by the end users.
  • Performed with test scripts which mimic the real case business scenarios with expected business outcome.
  • The desired output should be that the client confirms that the system is fit for purpose

Production Verification Testing

  • It is a repeat of system testing in the Production environment, performed by Salesforce Consultants and end users.
  • Production testing is done to test whether config and code have been correctly deployed from sandbox to production environment.
  • The end users should perform the steps from UAT testing again post deployment.

Regression Testing

  • Performed by System users, the main objective is to verify that the released code and configuration features do not affect the existing processes in the system.
  • It is done after the release of features that are intended for specific set of users and tested by system users to whom the release is not intended.
  • The main purpose of the testing is to confirm that the system users for whom the released features are not intended can perform their day to day activities without any issue.

Salesforce Testing Process

  • The testing process for Salesforce could be the same as of testing any web application.
  • But, going a step ahead, a tester should have a clear knowledge of:
  1. Sales and Service clouds
  2. Standard and Custom Objects
  3. Salesforce Security concepts
  4. CPQ Configure, Price, Quote
  5. Workflows and Process Builder
  6. Reports and Dashboards
  7. Lightening module
  • Once the code is deployed in a Sandbox environment and approved to be ready for release, the code would be moved into production from the Sandbox environment.
  • It is assumed that the tester has the basic knowledge of all the terms used in Salesforce before proceeding with testing.

Salesforce Test Automation Tools

  • Selenium web driver
  • HP Unified Functional Testing (UFT)
  • Cucumber
  • IDE (Eclipse-based)
  • Change Sets (Cloud Deploy)
  • Ant/ migration tool
  • Provar

Salesforce Load Testing

Salesforce load testing Challenges

  • The multi-tenant environment of software as a service platforms.
  • Scheduling complexities.
  • System governors, which throttle performance any time running code fails to meet varied criteria established by Salesforce.
  • A total prohibition by Salesforce against stress testing.

And Potential Solutions

  • Benchmark the environment to establish a baseline for performance in all load scenarios.
  • Evaluate the current test plan and adjust it if required to ensure it adheres to best practices.
  • Confirm resources are enough to achieve the desired result and adjust them if not. This includes not only appropriate server resources to handle the extreme loads that may be generated, but also personnel resources.
  • Aggregate the necessary information to meet Test Plan requirements imposed by Salesforce and submit it in the format and timeframe required by Customer Service.
  • Monitor tests to ensure performance and confirm in-range results. Remediate problems quickly to avoid failure—or at the minimum, test plan shutdown by Salesforce. The Final Outcome
  • Implementing and managing a quality-focused performance testing program for Salesforce customizations isn’t easy, but it is essential. Consider this:
  • Studies by reputable organizations (such as the Pew Research Center) show worker productivity rises measurably when technology tools, such as software, work as expected.
  • Poorly functioning or failed customizations, especially for Salesforce, will almost certainly have a negative impact on sales and customer service.

Salesforce Security Testing : Best Practices

  • Turn on IP restriction for user logins to minimise the risk of unauthorised access in case of compromised accounts
  • Turn on multi-factor authentication for all users to further reduce the risk of unauthorised access
  • Make organization-wide sharing rules as restrictive as possible while allowing normal business functions and use role hierarchies, sharing rules, permission sets, etc.
  • Require secure passwords that combine uppercase letters, lowercase letters, numbers, and symbols, and require a minimum of 8 characters.
  • Set a maximum incorrect login attempt to between 3 and 5 times.
  • Enable obscured secret answers for password resets.
  • Force re-login upon session timeout but enable session time out warning popup.
  • Keep the session timeout time frame as low as possible without annoying your Salesforce user base.
  • Disable caching and autocomplete on login page.
  • Expire user passwords within 90 days of creating it.
  • Enforce password history so same password isn’t used until at least 5 new passwords have been used since the last time the given password was used.
  • Passwords should not contain the word ‘password’.
  • If using platform encryption, regularly generate a new tenant secret, which will generate a new encryption key.
  • When destroying encryption keys, make sure all data encrypted with that key is decrypted first.
  • Re-encrypt already encrypted data with the latest key if they’re using old keys, even if the old key is archived and not destroyed.

Salesforce Exploratory Testing

Like exploratory testing on other web applications, Salesforce Testing should also involve:

  • Validating the consistency of data across multiple screens.
  • Negative test flows, such as deleting the default data generated.
  • User input validation on the form fields.
  • Cross browser compatibility testing to ensure if the rendering of data is correct across multiple browsers.
  • Maximum length validation for each of the editable input fields along with the invalid data validation.
  • Error message validation when invalid data is passed onto the applications.
  • Amount field validation using Boundary Value Analysis and Equivalence test techniques.
  • Reports and dashboard testing to test various test data parameters.
  • API testing for integrated third-party applications.

Roles and Responsibilities of a Salesforce Tester

  • The tester needs to make sure that the code coverage does not go below 75% as per the standard Salesforce rule.
  • Conduct Smoke Testing to make sure all the major functionalities are functioning as per requirement.
  • Create both positive and negative Test Scenarios.
  • Conduct role-based testing to ensure the consistency of data with various user roles.
  • Able to perform equivalence Partitioning and Boundary Value Analysis.
  • Perform compatibility testing of the third-party applications integrated with Salesforce if any.
  • Testers are also needed to work on the application and gain the understanding of its functionality to create functional map.
  • A tester needs to be familiar with load testing tools such as J Meter to validate the complex flows that produce inconsistent results in Salesforce.
  • The tester needs to execute role-based test cases to ensure the consistency of data.
  • Performs compatibility test in case Salesforce integrated with third-party apps.
  • Clear communication with the development team and Business, to understand the customisation Salesforce features.
  • Knowledge of Apex.

Salesforce Testing challenges

  • It’s not an easy task to test advanced features like Visual force, Salesforce or Service Cloud Console.
  • Writing test cases with different roles and mentioning the settings
  • You need to rewrite and rerun your classic tests for the Lightning UI.
  • Some of the standard functionalities can’t be removed even they are not in use.
  • GUI tests don’t work when we switch to the test environment
  • Automated tests should able to work in all your test environments
  • Field Locators are how you automate tests, find the field or button on a page. There is an issue creating field locators for the Salesforce screens as some field IDs differ between Organisations.
  • Testing of Visual force pages through automation. The issue lies in creating field locators reliably on a page. Salesforce will generate the Ids at run time which means any change to our APEX code, leads to the change of field locators based on Ids which need constant maintenance.
  • Last but not the least, the most important thing is to understand the Salesforce administration without fail.    

Best practice for Salesforce testing

  • Collate information for the testing
    A comprehensive list of a prioritised test case scenarios document must be prepared that covers all possible business case scenarios and technical exceptions. The document should also include the expected result of each scenario and action. Accordingly the test data has to be created for testing the defined scenarios.
  • Executing the tests
    The testing document scenarios must be executed, and the results have to be documented for testing audit. Any failure scenario or action in the test case must be escalated to the responsible team and retested after rectification. While testing code it is recommended that the testing be done in isolation to ensure that the code interacts only with the relevant data for the tests.
  • Use valid user profile
    The user level configurations and permission sets associated with the profiles commands which systems and what level of visibility the user is entitled to. So it is highly recommended that the testing be done with respective valid user profiles and check for consistency with the business processes.
  • Test both Negative and Positive paths
    The system testing and UAT testing should be done for both positive and negative flows of every test case scenario. Every test result should comply with recorded expected outcome for the same with zero deviation.
  • Managing the tests
    All the different tests and scenarios should ensure that the built application or feature is in sync with the existing manual or systemic operations. So it is mandatory to check the results against reference data that directs the quality of the final product. The tests executed should refer to this data and final results should conform to the same.


What’s in Salesforce for Testers

  • Salesforce has a dedicated community of developers and testers whom one can connect to in the hour of need.
  • Testers doing Salesforce testing are often called ‘Quality Engineers’ compared to the ‘Quality Assurance’ tester in general
  • Salesforce can be used using a web browser without the need to install additional hardware or software, which makes it the ideal choice for organisations worldwide. Career growth aspects for Salesforce platform testers are very rapid.
  • With more than 90K companies using Salesforce platform, testers can opt for administration certification or developer certification and improvise their career.

Further resources to gain more details about Salesforce, click on the below links:

  1. Introduction to Salesforce Administration & Configuration
  2. Salesforce Leads, Contacts & Accounts for Beginners


I have been learning Software Testing since 12 years, have worked in multiple roles in Investment Banking, Aviation and Digital areas. Still exploring and learning, current article is also a part of this acquaintance. In case you would like to keep in touch, drop me a note at

View all posts by Rahul →

One thought on “Salesforce Testing Tutorial: A Beginners Guide

Comments are closed.