Salesforce test automation — why does it matter?

Jun 28, 2021 / by Nikhil Sharma

By its very nature, Salesforce is one of the driving forces behind the developments that make test automation a necessity. 

When Salesforce was released, it shook up the market by being fully cloud-based. Initially a pure CRM, Salesforce has rapidly developed into a highly customizable tool that is often a key component in business processes.

That being said, it’s important to note that Salesforce test automation is as important as any other test automation concerning any end-to-end process you may have in place. But you already know that, right?

The way Salesforce works by default is highly dynamic. There is no standard Salesforce setup, but instead, everything is customized. Initially, Salesforce was about clicks and no code and building your custom CRM with objects and workflow automation. But how can you ensure that what you build works?

Its customizability is one of Salesforce’s unique selling points, making it dynamic from a technical perspective. On the flip side, this makes testing challenging: Test cases need to be written to accommodate these dynamic setups. 

Over time, Salesforce has also developed from a platform approach toward a best-of-breed approach. This means having one system as the core and having integrations with other apps on the market. 

In typical SaaS fashion, these other apps have their own release cycles, meaning they release updates all the time. And each update has the potential to cause a ripple effect across an interconnected system architecture. 

To deal with this constant change, you need to have constant testing. While all these individual apps run tests before they release updates, they are for the individual app and not for any of the possible dependencies. 

Salesforce is often involved in business-critical processes that happen in complex application architectures. Many systems, each with their own release cycles, are interconnected.  And this is why end-to-end test automation in Salesforce is so crucial.

So, what makes test automation in Salesforce a challenge?

The challenge lies in how traditional test automation tools are working and interacting with the dynamic Salesforce setup. 

From a technical perspective, these dynamic components are one of the changes that came with the release of Salesforce Lightning, and they’re causing most of the headache related to Salesforce test automation. 

Salesforce’s apps include dynamic elements that can be difficult to test with Selenium. Shadow DOM and random pop-up windows, as well as dynamic elements like IDs, classes, or CSS attributes that seem to change randomly can make it a real hassle. 

Let's look at a simple example: Testing a button. You use the button ID, but that is a dynamic property that updates itself. Your test case won't find the button to test because the ID has changed on its own. Of course, it's possible to run tests like that still, but it results in a heavy maintenance load. 

Another issue may come up when you’re testing sections of your website that have embedded elements from an external source, like videos, for example. Selenium can handle these but it requires jumping through a couple of hoops. 

It's essential that the tools you use for automated Salesforce testing can function in such a dynamic environment. For example, using different ways to tackle those elements through a combination of property ID, computer vision, or screen coordinates may help. 

But this only looks at testing within your Salesforce environment. 

As I mentioned earlier, typically, Salesforce is a part of a complex ecosystem of different business apps that together power business-critical processes. 

This is a nonlinear system where updates happen basically beyond anyone's control. Instead, they are controlled by the different app providers individually, continuously, and quickly. 

This nonlinear environment makes it challenging to define cause and effect when problems occur.

3 signs you should consider Salesforce test automation

The first sign is when Salesforce is not a standalone solution at the heart of your business processes and integrations to other applications. 

This indicates you should look for ways to automate your Salesforce testing.

The second sign lies in the way you use Salesforce.

If you use it as a CRM and it comes with the default standard Salesforce package, you might not need to worry about interdependencies and test automation. 

But if you are customizing your Salesforce instance and building processes and features on it at a fast pace, your testing needs to keep up with that pace. 

Your testing needs to catch up with the new developments you have done to ensure that what worked before works after your updates. 

In practice, you need to run regression tests that check 100 different test cases after any new update. Then, add in exploratory or manual testing for the new features you created. Then, over time, update your existing test cases with the new ones. 

Then, you can run 110 test cases for the next new feature. 

Finally, the third sign is when you have different teams working on the same Salesforce environment. 

Some system integrators work on one part, and another team works on Salesforce development. At this point, test automation can help facilitate the work of all these teams with quick feedback loops.

Read more
DevOps 101: The ultimate guide to DevOps automation 

Don’t stop at test automation, also consider deployment automation

The possibilities when it comes to automation are endless. 

For example, one of our customers used another tool for their release management to Salesforce, but they encountered challenges. 

The solution was that they took our Qentinel Pace robot and used robotic process automation to make the robot change from one instance to another. 

This is a pretty straightforward use case where automation can be used to automate formerly manual processes. But the sky seems to be the limit.

I want to end this blog post with one way to look at your Salesforce environment and the mindset you had when choosing the tools supporting your processes

Think of why you chose Salesforce in the first place. You wanted a fast-moving solution that you can customize easily, right? Those are the same parameters I’d advise you to apply when looking at the tools to support your Salesforce environment development. 

Read more
DevOps and cloud automation — it’s a match!

Get to know our test automation tool!

Qentinel Pace is a scalable testing platform that lives in the cloud. It enables organizations and teams of all skill sets to build, run, and maintain UI tests for desktop, mobile, and web applications. Sign up for a free trial and try it for free today.  

Start Free Trial

Topics: Ecosystem, Software Testing, Test Automation, Agile, Quality Assurance, salesforce

Nikhil Sharma

Written by Nikhil Sharma