Skip to content

Best Practices for Regression Testing Salesforce at Speed

Anna Thorsen

Anna Thorsen

If your business is using Salesforce, odds are that the platform is customized to fit specific needs. That’s not a bad thing. But just as system updates require testing, so do customizations. It’s a time-consuming, tedious task that can take weeks if you’re working in a large business with a complex IT landscape. If your Salesforce application isn’t properly tested your business is exposed to risk. And if something breaks, the consequences can be severe.That’s where regression testing comes in. What to expect in this article

What is regression testing in Salesforce?

Regression testing in Salesforce makes sure that whenever there is an update, configuration or deployment in Salesforce, existing functionality has not broken. It's essentially a test of your entire system or the highest risk areas of Salesforce.

This process can be done manually, but it is incredibly time-consuming and so businesses use test automation tools to automate regression testing.

Is there automated testing in Salesforce?

Yes, there is automated testing in Salesforce. However, it's a notoriously difficult system to automate due to its heavy DOM structures. There are, however, workarounds for automating testing in Salesforce. We'll get into that in this post.

Why regression test your Salesforce application?

Regression testing helps ensure that code doesn’t break when your system is updated, customizations are added, or new integrations are introduced to business workflows.

Related reading: What is Regression Testing?Think of it as sending your car in for routine maintenance. If you don’t do it regularly, you’re likely to miss underlying issues. It’s a nuisance getting it done, but it’s how to keep your car healthy. If you don’t regularly regression test your system you’re likely to miss critical bugs that will cause you expensive headaches down the road. It’s a pain to do, especially if it’s done manually. But when it’s done the right way by substituting the repetitive tasks with automation, the process can move faster and increase the quality of your overall system. Average cost of a software bug

Best practices for regression testing Salesforce

In the next section, we explain the best practices that businesses can follow to make sure that their regression testing is secure, fast, and cost-efficient.

1. Define your approach to regression testing

As with every new business endeavor, you should come prepared with a strategy. You will have to take in certain considerations before starting:

  • How much coverage are you planning for?
  • What can be automated and what will be done manually?
  • What environments are needed for regression tests?
  • How are you going to report on the performance of your regression tests?

Your approach could likely differ depending on the interface of Salesforce that you’re working with - lightning or classic.

Salesforce lightning is a newer version of the interface that makes it easier and faster to use the system. The classic system still exists and is used by many large businesses. However, Salesforce intend to move all customers to their new system in the future.

Testing in lightning and classic vary in difficulty. For example, scripting a test on the classic version is easier because the elements are easier to define. On lightning, scripting is more complicated because the CSS and XPATHS have sticky dynamic paths.

Read more: Regression Testing Strategy in 8 Steps

2. Select cases

If you haven’t built a test suite for Salesforce before, a starting point is to select them based on the following criteria:

  • Is the function core to your product? Is it essential for other functionalities to work? Core functions should always be tested.
  • Is the feature new, and has it been tested against numerous other feature updates before? New code tends to be more vulnerable.
  • Is the code sensitive to the environment being configured? Dependency on environment settings tends to be more vulnerable.
  • Has the code been defective before? It pays off to give extra attention to code that has failed in the past.

3. Routinely update your regression suite

As your system changes, your tests will change too. Keeping your regression tests up to date is part of the process.

If your test cases are scripted, it will inevitably take more work to maintain and it will require specialist resources with development experience.

If your resources are limited, and you’re being pressured to achieve more with less, it is beneficial to choose a tool that lets you set up and edit tests easily.

4. Define frequency

While it’s easy to skip your regression tests, they should be run often.

Typically, a regression test is carried out whenever new functionality (like customization), or a new element has been added to your system. For a larger business, this can feel impossible to do without supplementing your testing strategy with automation.

If your business processes operate outside of the Salesforce ecosystem (it likely does), you will want to make sure that you’re testing the integrations too.

If you’re choosing an automation tool rather than building your own automation framework, you want to check that it caters to additional technologies.

Read our blog post how frequently you should run your regression tests.

What to look for in a regression testing tool for Salesforce

While every organization has unique needs, there are particular features that you should look for in a regression testing tool to make sure that you get the most out of your testing strategy.

  • Full cross-technology support. Does the tool have full support for the technologies your Salesforce application interacts with? Ideally, the tool should work across desktop and web-based applications.
  • Scalable. Choosing a tool that can scale across more than one application is a factor to consider. As your regression test suite grows you will probably add more applications to your system. A tool with the capability to automate across all applications will also bring you a better return on investment. You’re not faced with investing in several automation tools to operate your regression suite.
  • Easy to use. An easy-to-use, easy-to-learn, and low-maintenance tool are capabilities to consider before investing in a tool. For example, if you are lacking programmers to build automation for your regression suite, a no-code tool could be a suitable alternative. Codeless tools make automation accessible to a bigger group of people, whether your testing team consists of business users or QA managers.

Want to learn more about getting started with Salesforce automation? Read our factsheet on how to find a test automation tool for agile and reliable test automation.

New call-to-action