Continuous Test Orchestration And Execution Platform Online
Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.
A Complete Guide To Salesforce Testing
Posted On: March 7, 2022
18 Min Read
Salesforce is a cloud-based CRM (Customer Relationship Management) system. This CRM is used to manage customer relationships better, and it stores information like sales, product details, marketing campaigns, and services regarding customers. The CRM can be customized according to the business requirements, but this customization mustn’t affect any other functionality of Salesforce.
Salesforce testing is very important to make sure that this customization does not affect any other functionality and to check that changes are done as per design specification.
In this Salesforce testing tutorial, we will see how to perform Salesforce testing while considering the key aspects and various challenges involved in it.
TABLE OF CONTENTS
- An introduction to CRM and Salesforce
- Salesforce Classic and Lightning platform
- The need for Salesforce testing
- Key aspects to remember in case of Salesforce Application Testing
- How to meet the challenges involved in Salesforce testing?
- Testing Salesforce Lightning components
- Testing Visualforce page of Salesforce application
- Frequently Asked Questions (FAQs)
An introduction to CRM and Salesforce
For any business to succeed, managing and maintaining a good customer relationship is paramount, and there is no point in debating on that. Customers are the key factor to drive revenues, and without customers, a business ceases to exist. A customer, in general, represents an individual or a business entity that avails goods or services provided by another company. And it is important to have a system in place that can handle the relationship of customers (both existing and prospective customers). This is the primary goal of any CRM application.
CRM stands for Customer Relationship Management and represents a technological/software solution. The aim of any CRM application is straightforward, improving business relationships by helping companies stay connected with their customers, streamline processes, and achieve customer satisfaction and revenue targets.
According to Gartner, the worldwide CRM market grew from $61.6 billion in 2019 to $69.3 billion, an increase of 12.6% in 2020, and it is the third fastest-growing segment in the software industry.
Salesforce is the most popular Cloud-based CRM software provider in the world. More than 150,000 businesses around the world are utilizing the services offered by Salesforce. In addition to managing a business relationship with its customer’s coworkers, Salesforce enables one to:
- Get the customer’s data wherever you are now and whenever you need that data
- Case management
- Generate analytical reports
- Integrate their CRM application with other systems
- Build a customized application as per the business need
For the eighth consecutive year, Salesforce was ranked #1 in Customer Relationship Management Solutions by International Data Corporation (IDC) in its latest Worldwide Semiannual Software Tracker.
Salesforce Classic and Lightning platform
To begin with, Salesforce offered its services using its Salesforce Classic platform, also known as Aloha. It was quite popular during the 2000s, and even by that period, users of Salesforce could custom build the application on top of Salesforce based on their needs. To achieve this, Salesforce offered the first Platform as a Service platform, Force.com, enabling developers to build and release any type of business application without the need for additional software.
With the advancement in technology and to improve the user experience, Salesforce had started working on its new Lightning platform and released the same to its customer base. The Lightning platform offers several functional and security features with an improved UI experience.
The need for Salesforce testing
Irrespective of whether the business uses the Salesforce Classic or Lightning platform, a company often needs to customize the default Salesforce application to suit their business needs. With the latest Salesforce Lightning platform, custom development work is mainly made flexible and easy enough for the Salesforce admin to tweak the application by means of drag and drop features. However, there are still some scenarios that would require Salesforce application developers to get involved and perform customization work by changing the code.
Finally, the resulting customized application would involve impact on some of the following areas:
- UI/Screen changes (field or label changes, etc.)
- Business logic changes
- Integration with other enterprise applications such as Sharepoint
- Integration with other services such as email service
With this Screenshot Testing Tutorial, you will learn how to perform Automated Screenshot Testing on the LambdaTest platform.
Therefore, as with any software application, a company needs to carry out a Quality Assurance process before releasing its custom-built features on top of Salesforce to the production. Failing to carry out testing of the Salesforce application will lead to a business disaster in terms of poor customer relationship management and loss of revenue.
Key aspects to remember in case of Salesforce Application Testing
In case of general accessibility testing, the Salesforce team by default ensures to test and release their main application in the most current version of the following browsers: Mozilla, Firefox, Microsoft Internet Explorer on Windows, Microsoft Edge, Edge Chromium, Google Chrome, and Apple Safari on OS X.
As a Salesforce application tester, all you need to follow is the same process as that of any other web application testing, and there is no difference in that. However, the tester will not be focusing on out-of-the-box features of the Salesforce main application; instead, you must execute the usual web application/website testing process on the custom application features built on top of the Salesforce main application.
As per the Salesforce recommendation, the customers of the Salesforce application must use Sandbox for testing the changes before going to production. The sandbox environment is a production-like environment with all features like those already in Production or going to be released in Production for simulation and testing purposes.
However, it is to be noted that not all changes are required to be carried out or tested in a Sandbox environment before releasing it to Production.
For instance: as per Salesforce recommendation, the following low-risk changes can be made directly in a Production environment by an experienced Salesforce admin, and these include:
- Changes in Reports/Dashboards
- Email templates
- List views etc.
Whereas, in the case of complex customizations such as changes made in
- Validation rules
- Integrated Apps/Integration code
- Customer labels/fields
- Changes involving Apex programming logic
It is highly recommended to deploy the changes in a Sandbox environment, test the requirements frequently once certified, and release them to Production. For more details, go through this video by Salesforce on Release Management: Developing and Testing on Sandbox.
Challenges involved in Salesforce testing
Customers of Salesforce have the choice to use either the Classic or the Lightning platform features. It is to be noted that certain technology behind the Classic platform varies from the Lightning platform, and so are the features in these platforms. This very aspect brings certain challenges in testing the Salesforce application.
- Certain features in Salesforce, such as Standard mail merge or extended mail merge (Salesforce Classic only Feature), and certain client applications such as Connect Offline work only on the Internet Explorer.
- Salesforce Classic supports the latest stable version of Internet Explorer 11. However, the Lightning Experience isn’t supported in that browser.
- Salesforce Lightning Experience currently doesn’t support Private Browsing in the latest version of Firefox.
Based on the above, you could see the variations in environment requirements for each feature of the Salesforce application and thus the test setup requirements with respect to Browsers and Operating systems (as Internet explorer works on Windows).
Also, Salesforce suggests carrying out real device testing if an organization is building Lightning platform components for Salesforce mobile access. In general, any customization made in the Salesforce application needs to be tested against mobile devices for compatibility and proper functioning of the application in production.
If we consider the combination of browser + operating system + device, the calculation will yield at least several thousands of system variations, and it is a challenge for the Organization to facilitate such a massive infrastructure for the testers to carry out testing.
So how could organizations meet or overcome such challenges? Continue reading this blog to understand the solution available in the market.
How to meet the challenges involved in Salesforce testing?
It is not possible and not necessary for every organization to allocate budget or infrastructure in their Data Center to facilitate such a massive test environment for their testers. Instead, organizations could explore cloud-based platforms like LambdaTest – a cross browser testing platform facilitating access to more than 3000+ browsers and devices for web and mobile app testing.
Whatever may be the category of testing, let it be
- Manual testing
- Automated scripts/program-based testing
- Automated UI testing
- Real device cloud testing, etc.
Organizations can make use of LambdaTest’s cloud infrastructure to yield a hundred percent positive results in real-world scenarios.
Customers can also perform Selenium testing, Cypress testing, Appium testing, HyperExecute testing in combination with LambdaTest Infrastructure. Additionally, to improve the productivity of the entire team involved in the Salesforce application development and testing, and to achieve a reliable automation pipeline, organizations can integrate the CI/CD tools (Continuous Integration and Continuous Deployment) such as Travis, Circle CI, Jenkins, Bamboo, AWS CodePipeline, etc., with LambdaTest platform.
Testing Salesforce Lightning components
Why test the Salesforce Lightning components?
Let’s say you as a Salesforce application developer or administrator, started embracing the power of the new Lightning experience platform, and for customized needs for your business, you have started developing many Lightning components for your application.
As we know that Lightning components are like Logo blocks and are reusable in multiple parts of the Salesforce application, the chances are high that other developers might start using your components as part of their own components. This is done as your components match their component requirements and promote reusability within the application. Therefore, as components get interdependent within your custom-built application or as the complexity of your components increases, or when other developers start making changes on your components to meet the unified requirements, it is possible that bugs in the software might get introduced.
How to test Salesforce Lightning components?
Manual Salesforce testing of Lightning components
In the case of manual testing, one could use browsers and test the visual and behavioral aspects of their components by triggering any events related to the components in the Salesforce application. As I had mentioned already, since the combination of browsers, operating systems, and devices required to conduct these tests are enormous in numbers, we could use LambdaTest’s cloud testing platform to have the required infra setup in no time and execute our test cases.
LambdaTest’s Real Time Browser testing is an excellent feature to carry out manual live testing of your web pages. Just create an account by going to the LambdaTest Registration Page (if you have not done so already) and try the features available on their platform.
Given below is the screenshot taken from LambdaTest’s Real time – Browser testing interface. You could see a handful of options available to choose from to perform Salesforce application testing. Just key on the website URL, select which device you want to test your changes such as Desktop or Mobile. If desktop, select the choice of Browsers along with its version, select OS version, and the desktop screen resolution. You have plenty of options to choose from as per the test case requirements and once done, click START.
The START button will initiate the environment set up by allocating an instance in the cloud with selected hardware and software choices made. Once the environment is ready, you will be presented with a screen session with the site URL that you had keyed in for testing. A screenshot of a test session is shown below:
Just by specifying your hardware and software choices in LambdaTest’s platform, you could create an environment in no time. The testers can now manually operate on the browser as they deem necessary for completing their test cases.
As a tester, you have the flexibility to change the resolution or the browser versions or OS version from right within your allotted session. Based on your choice, your environment session will get auto-changed. You can now test the visual appearance and behavior of your Salesforce application in the newly created environment.
If you are done with the testing, click the End Session button to end your current session.
Automated Salesforce testing of Lightning components
We have seen how to carry out manual testing of the Salesforce application. Although it is good to carry out manual testing of your websites, it is not only practical but time-consuming and tiring to repeat the same kind of test scenarios for every change introduced in the application. So, it is essential to formulate an automated test strategy to improve the productivity and efficiency of test suite execution.
The other approach is to use cloud-based platforms like LambdaTest to meet your automation testing goals. For example, with LambdaTest’s online Selenium Grid, testers could conduct end-to-end automation tests on a secure, efficient, highly available, and scalable infrastructure based on Selenium.
Visual UI Testing of Salesforce application
It is important to consider the Visual UI testing aspect of your custom Salesforce application because, only with Visual UI testing, we can verify the following aspects, which are not possible with classic automation test scripts:
- Image alignment
- UX distortion on change of device resolution
- Shape/size of objects when a web page is zoomed in or out
- Ensure the overlapping of UI elements are avoided when viewed on different settings
- Verify the UI elements’ dimensions
- Image Comparison
In production, the application users can face both functional as well as cosmetic problems, so we must plan for test strategies to cover all these aspects. With Visual UI testing, the Organization can take care of cosmetic problems.
With LambdaTest’s Smart Visual UI Testing module, you can perform Smart Visual Regression testing on cloud just with a single click. With this, the testers will be able to spot out visual changes introduced with the new Salesforce application build. Whatever the UI changes are related to, be it Icon Size, Color used in the background, UI Layout, Font size or style, the position of the UI element, etc., can be easily identified.
You can take screenshots of your custom-made Salesforce application web pages using different browsers, OS versions, and resolutions and later compare it at one go to view the list of issues identified by the platform. For example, given below is the relevant screenshot taken from the LambdaTest platform.
You can even schedule a time interval for the platform to take the screenshots automatically and send them to you over email. No need to sit around and wait for the test completion.
You can also refer to the below video tutorial on How To Take Screenshots In Selenium testing.
Testing Visualforce page of Salesforce application
In the previous sections of this article on how to test salesforce applications, we explored how to go about salesforce testing of Lightning components. However, if your business deals with Visualforce pages, let’s see how to test customization done through Visualforce.
Overview about Salesforce Visualforce pages
Visualforce is another framework that facilitates developers to build custom web pages with standard or custom-made UI elements, driven by standard or custom-written business logic. Once the pages are ready, users can preview and host the pages readily on the Salesforce Lightning platform once the pages are ready.
Any Visualforce page consists of two key elements: Visualforce markup and a controller.
- Visualforce markup: It is similar to HTML tags but is based on Visualforce markup language. Therefore, syntactically it supports Visualforce tags, HTML tags, CSS, or any standard web technology-based code. For example, a simple Hello World, Visualforce page can be designed using the following sample code in Salesforce.
1234567```Visualforce markup<apex:page><apex:form>Hello World!!!<apex:form><apex:page>```
- Visualforce controller – The behavior of UI elements is controlled by this controller. Users can define custom business logic by defining a class based on Apex language.
How to test Visualforce markup elements?
As the markup elements in Visualforce pages are responsible for visual appeal/aspects of the Salesforce application, all the points covered as part of Testing Lightning components are applicable here as well.
How to test Visualforce controller elements?
As the controller elements in Visualforce pages are responsible for behavioral aspects of the Salesforce application and it is based on logic written in an Object-oriented programming language (Apex), the approach of testing differs from that of testing Visualforce markup elements.
In general, the Apex language offered by Salesforce provides out-of-the-box support for unit test creation and execution. As soon as the test execution is done, the user can also get a coverage report indicating how much code is covered, and which parts of the controller class code could be refactored for efficiency. As a process, Salesforce ensures that all the custom-developed Apex classes work as expected by enforcing the execution of the unit tests before upgrades. Also, it is mandatory to have a code coverage of 75% for all the custom-developed Apex classes and those should pass the test.
Unit testing of Apex classes is a must to do activity and should not be skipped. However, after unit testing, one must plan for Integration tests to assure that the custom-made Visualforce pages work in an end-to-end manner.
Selenium WebDriver is an excellent tool for achieving this goal. Integration tests using Selenium are useful because they enable the testers to test the user experience aspect end to end in multiple hardware and browsers. To understand more on the advantages of using Selenium for Salesforce testing, go through this article on 13 Benefits of Selenium WebDriver for Automation Testing.
In this article on Salesforce testing, we have started with an Introduction to CRM systems and how much Salesforce as an Organization and service provider plays a significant role in the CRM domain. Then we moved on to
- Get an overview of the older Salesforce Classic and the latest Lightning platforms.
- The need for Salesforce testing
- Some of the key aspects to remember in Salesforce testing
- Challenges involved in Salesforce testing
- How to mitigate those challenges
- How to go about dealing with testing (Manual, Automated and Visual UI testing) of the latest Salesforce Lightning components
Frequently Asked Questions (FAQs)
Is there testing in Salesforce?
Some of the features in Salesforce cannot be tested without complex testing methodologies. When an issue is observed, the tester needs to make sure that he is testing the customized code rather than testing the core Salesforce functionality.
How Salesforce testing is done?
Salesforce offers the ability to perform manual testing on its platforms. Manual testing is conducted by a member of your QA team who is familiar with Salesforce’s functionality and software interface. You can also perform automation testing using tools like Selenium.
What is Salesforce UAT testing?
User Acceptance Testing is a vital part of the lifecycle to ensure that a software application is ready to be deployed to the production environment. An application that hasn’t been through UAT may contain errors, security issues, and bugs that need fixing.
Got Questions? Drop them on LambdaTest Community. Visit now