Introduction to Salesforce
Salesforce is a US-based company that provides cloud-based CRM (Customer Relationship Management) service to organizations. According to Forbes, Salesforce was the leading CRM service provider in 2018 with a 19.5% market share.
Salesforce.com is a cloud-based CRM SaaS (Software as a Service). Thus, the users do not need to install the software or store any data on the local device. Users can simply use it via the computer browser, and everything is stored on the cloud which gives quick access to information.
Moreover, if the customer wants, they can develop customized features as per their requirements. Some features of Salesforce CRM are contact management, lead management, sales forecasting, email integration, reports, sales collaboration, and partner management.
The Need for Salesforce Testing
To understand the need for salesforce testing, first, let’s look at the following two important terms. Salesforce has two types of options available for making changes in the inbuilt CRM:
- Configuration – The organization can use the inbuilt features to configure various business requirements of its own. This can be done via the user interface without doing much-customized coding. Organizations usually hire expert Salesforce admins to perform such configurations. By altering some settings in the Salesforce panel, new fields, reports, and workflows can be integrated. Some examples of configuration are creating profiles, implementing validation rules, changing page layouts, and setting an email.
- Customization – When the inbuilt features are not enough to meet the business requirements of the organization, they can go for customization. In customization, they can develop features by coding that can be integrated with the business processes of the organization. Some examples of customization are integration with other 3rd party systems, creating custom reports, and using CSS to alter the pages.
Organizations usually take the help of skilled Salesforce developers to do the customization coding. For server-side development, developers use a programming language called Apex, developed by Salesforce.
Apex is an object-oriented language with a similar syntax to Java. It stores the code in the form of triggers and classes. For front-end development, Visualforce or Lightening frameworks can be used. Visualforce is an older framework while Lightening is a modern framework.
Moreover, Salesforce has its own data management language similar to SQL, SOQL (Salesforce Object Query Language).
Whenever any changes are made in the CRM, using the above-mentioned options, testing is required. Salesforce testing is done to ensure that post configuration and customization, the system is performing as expected.
Types of Salesforce Testing
There are two types of Salesforce testing:
- Manual Testing – In manual testing, the system is tested manually with the help of the testing team, without using any tools.
- Automation Testing – In automated testing, the system is tested by the testing team using various automation tools like Selenium, QTP, and AssureClick.
Levels of Salesforce Testing
The salesforce testing process has the following levels:
- Unit Testing – In unit testing, salesforce developers perform unit testing during the development process. Apex has a testing framework that allows developers to write, run, and check the results of the test cases.
This framework also helps the developer in determining the code coverage. To deploy the code on production, the code coverage must be at least 75%. That is at least 75% of the code should be covered by the unit tests and all the test cases should have been passed.
- System Testing – In system testing, the testing team conducts the testing of the whole system which includes new changes and the existing features. The goal of this testing is to make sure that the system works as per the requirements.
- UAT – In user acceptance testing, as the name suggests, end-users representing the client perform the testing. UAT is carried out in a production-like environment and gives confidence to the client that everything is developed according to the requirements.
The goal of the UAT is to find out any critical bugs in the system that will impact the user experience on the live system in a negative manner. This is the last level of testing before deploying the code on production.
- Production Testing – Production testing is performed by the testing team and the end-users once the code has been deployed on the production. This testing helps in making sure that the expected configurations and customizations coded by the development team have been deployed on the production successfully. Production testing should be carried out very carefully as it is done on the live system.
- Regression Testing – Regression testing is performed to check whether new changes are not affecting any existing features. Regression testing can be performed best with the automation tools as in this testing, the team needs to repeat specific steps to check the regression.
Salesforce Testing Strategy and Best Practices
For any successful implementation of Salesforce configuration and customization, there are some important points for strategy and practices that should be followed. This section discusses the same:
- Detailed and Clear Communication of Requirements – Before starting with the development process, the requirements of the system should be defined clearly. Usually, the best practice would be to write down detailed requirements in the form of a requirements specifications document. But sometimes, in the agile model, less focus is put on documentation. In such scenarios, all the user stories should be designed properly.
Another important point is communication. The development and testing team should have a clear understanding of the requirements that need to be worked on and to do so, the requirements should have been thoroughly communicated to the teams.
- Involvement of Testing Team in Initial Phase – A good practice is to involve the testing team from the first phase i.e. planning phase. The testing team will get to know about the requirements from scratch and they can also help in identifying any potential problems in the beginning. It also helps the team in designing a test plan and test cases.
- Focus on Unit Testing – As mentioned earlier, the requirement is to cover at least 75% of the code when it comes to unit testing. But the good practice would be to spend some extra time and cover 100% of the code, if possible. Identifying bugs at a unit level will help the whole project life cycle.
- Detailed Test Plan – It is ideal to create a detailed test plan including the features to be tested, tools to be used, test cases, environment setup, bug report template, risk and mitigation strategies, etc.
- Test Everything – It is the testing team’s responsibility to make sure each scenario is covered that includes both positive and negative scenarios.
- Manage Test Records – It is a good practice to keep records of what has been tested and what was the outcome of these tests. It helps the testing and development teams, the client, and other project stakeholders to get a clear picture of the system bugs and risks.
Salesforce is a widely used CRM that comes with a large set of inbuilt features. It gives the ability to configure and customize extra features as per the organization’s business needs. To get the full benefit of this cloud-based CRM, focusing only on the development phase is not enough.
Testing the developed configurations and customizations is equally important. Testing Salesforce applications is like any other software testing process. But at the same time, the testers should be highly skilled with deep knowledge of the various Salesforce terms.
Kuldeep is the founder and lead author of ArtOfTesting. He is skilled in test automation, performance testing, big data, and CI-CD. He brings his decade of experience to his current role where he is dedicated to educating the QA professionals. You can connect with him on LinkedIn.