Salesforce Testing Tutorial

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 that help you manage your relationships 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.

Top Pick
Salesforce

Salesforce CRM is built on a platform development language called APEX. Salesforce testing allows you to check that the configuration and code are functional. This CRM allowed me to improve customer loyalty, retention, and satisfaction, aiming to build lasting connections.

Visit Salesforce

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.

SalesForce Testing

The challenge is to ensure that a tester is checking the code that has been customized instead of testing the 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?

Let me explain the prime reasons I believe Salesforce testing is necessary:

  • Salesforce testing allows you to check that the configuration and code are functional.
  • It helps you verify that the finished system can support the client’s business processes.
  • This type of testing helps you confirm that the system’s initial build meets the agreed-upon requirement.
  • It helps you 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 determine the functionality of the application.
  • The Process Builder feature helps you check the working condition and behavior of the system.
  • Workflows allow you to check the functionality of time-based events.

Salesforce Terminology

  • VisualForce: A framework that allows developers to build custom user interfaces with a tag-based markup language, similar to HTML.
  • AppExchange: Salesforce’s online marketplace where users can discover and install custom applications and extensions for Salesforce environments.
  • Apex: A strongly typed, object-oriented programming language used to execute flow and transaction control statements on the Salesforce platform.

Types of Salesforce Testing

Manual Testing

The manual software testing process includes the testing of the Salesforce.com app using traditional methods. QA team can use manual testing 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 Salesforce.com or Force.com 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:

Levels of Testing in 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 of 78%.

System Testing:

  • It is performed by a team of Salesforce consultant experts.
  • Involves the testing system’s technical processes from beginning to finish.
  • Involves a test script based on specific outputs.
  • It allows you to troubleshoot problems with automated system rules such as workflow, validation, assignment, etc.

UAT Testing:

  • It Is conducted by the users who will use the application
  • Allows for testing the system’s ability to support 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 launches, then the client should run through UAT scripts again post-deployment

Regression Testing:

  • The main object of Regression testing is to determine whether code and configuration releases affect the system’s existing user processes.
  • 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 report 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 to, 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 testers should consider which flows include positive and negative ones.
  • 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 requirements.
  • 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, I have listed the widely used Salesforce testing tools that I recommend.

1) Tricentis Test Automation for Salesforce

I particularly appreciate how Tricentis Test Automation for Salesforce accelerates the development of resilient UI tests for Salesforce environments. Its Smart Locators are powered by AI to self-heal and improve automatically, thus minimizing maintenance and ensuring test stability.

Tricentis

Features:

  • End-to-End Scenario Validation: Customers can validate their complete end-to-end scenarios extending from their web application to Salesforce and back.
  • Agile Team Scalability: 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.
  • Apex Code Execution for Validation: Run Apex code in a test step to validate query results.
  • API Test Integration: Integrate API tests.

Visit Tricentis >>


2) QA Wolf

QA Wolf revolutionizes Salesforce testing by achieving 80% automated end-to-end test coverage within just a few weeks, ensuring reliable and rapid results. Unlike traditional QA solutions that require extensive time and resources, QA Wolf guarantees zero test flakes and provides a fully parallel test infrastructure at no additional cost. This allows teams building on top of Salesforce to enhance developer productivity, accelerate release velocity, and significantly reduce operational costs.

QA Wolf

Features:

  • Test framework: QA Wolf uses their own test framework, which is built on top of Microsoft’s Playwright. A partnership with QA Wolf includes full access for your entire team to their platform, which consists of unlimited tests test runs.
  • 24-hour test maintenance: QA Wolf will maintain your entire test suite so you don’t have to. Flaky tests are maintained so you don’t receive false positives and can continue to ship confidently.
  • Human-verified bug reports: Its team works around the clock to check every test failure and only reports the actual bugs.
  • CI/CD Integration: The CI/CD integration is excellent for collaboration and problem-solving. I could send messages on Slack or Teams to communicate with the QA Wolf team.

Visit QA Wolf >>

Why use Salesforce Testing Tools

  • It helps you 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.
  • It helps you automate all types of pre- and post-deployment tasks.
  • The Salesforce testing process separates data from the 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: The 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 manage my daily job. They should keep in touch with PM and regular check-in calls in the design and build stages.

Conclusion

  • Salesforce is the world’s first cloud-based CRM system.
  • Salesforce testing validates the configuration and customization performed in vanilla SDFC.
  • Salesforce testing helps you 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, and regression testing.
  • The biggest challenge of Salesforce testing is that you need to recreate all your classic tests for the Lightning UI.
  • Salesforce testers should run tests as real user profiles.
  • Salesforce 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.