Skip to content

How to Test Salesforce Integrations with SAP in Selenium

Anna Thorsen

Anna Thorsen

Testing Salesforce integrations with SAP in Selenium presents an oxymoron. Selenium only lets you automate in the web browser, and integrations sit anywhere but the web browser.

So how can you verify that your integrations between web and desktop-based applications are working as they should? Especially if it’s not possible to automate outside of a web browser in Selenium.

Related Reading: Can You Automate Salesforce Tests Using Selenium?

This article explains why testing integrations are important, why Selenium isn’t the most effective tool for testing integrations between Salesforce and SAP, and the alternative solutions that enable integration and end-to-end testing at speed.

Why do you test integrations between Salesforce and SAP

Because SAP and Salesforce have different ways of presenting data, validating integrations through testing makes sure that data is moving smoothly from one system to the next.

If an integration is not working, it will negatively impact the end-user, leaving them unable to perform their tasks. In organizations where critical business processes run between applications via integrations, a bug can be disastrous and cost millions in damages.

Average cost of a software bug

Even a process as simple as placing and delivering an order can have many points of failure. You could, for example, create a malformed order. It might look correct when input in Salesforce, but a misinterpretation along the way could cause an invalid order once it has been shipped to SAP.

At first glance, this would not be visible on the user interface (UI) on Salesforce. It is, therefore, crucial to test your integrations and validate that data is appearing as expected on the front end of the integrated application, SAP.

New call-to-action

Why Selenium isn’t the best for testing Salesforce integrations with SAP

As we established in the previous section, integrations between Salesforce and SAP are not always the most reliable. That is why testing is so important. Many use Selenium test automation for this purpose. But it presents a lot of challenges:

  • QA resources with coding experience are scarce. Using code-based solutions like Selenium to automate testing is common. And that’s okay because Selenium is a great tool. But it is very difficult to maintain. You must have a very good understanding of Selenium and coding experience to make the most of the tool. And the reality is that businesses are not willing to pay for QA resources that can code.
  • Selenium automation in Salesforce requires heavy maintenance. Selenium can automate Salesforce because it is a web-based solution. It is not, however, the most efficient option as it requires coding skills. The heavy DOM structure of Salesforce makes maintaining and setting up automation time-consuming, even if you have the developer resources available. Related reading: Salesforce Test Automation - How to Overcome Common Challenges.
  • Selenium automation in SAP (desktop versions) is not possible. While some businesses are in the process of transitioning to cloud-based solution SAP S/4HANA, the majority operate on the desktop version. If you are using Fiori, Selenium will work. If you are using a desktop version of SAP, you cannot. However, there are workarounds if you need a solution that also works with Salesforce and SAP. More on this below.

Workarounds for testing SAP on desktop

  • Commercial solutions. Nowadays commercial software solutions come in all shapes and sizes. Some require coding, some are low-code, and others require no coding at all. Related reading: How to Find the Right Agile Automation Tool.
  • Framework solutions. You can use the built-in SAP GUI recorder to record VBScript. The VBScript can then be daisy chained with Selenium scripts for end-to-end browser-based tests. This approach is not recommended as it requires heavy maintenance and will become a time-sink for important developer resources.

There are options available that make it easier for you to take your integration processes and verify they are working using automation. We will dive into that solution in the following section.

A better solution for testing Salesforce integrations with SAP

How can you ensure a critical bug from an integration never makes it to a production instance of Salesforce, SAP, or other enterprise applications?

Make automation more accessible

Put automation into the hands of those best equipped for quality assurance – business users (testers) and QA managers. With codeless automation, business users and QA managers do not have to program to set up and maintain automated tests. This, in turn, removes the dependency on developers. Instead, testers (those who are typically business experts and not technical experts) can drive test automation.

Easily validate integration connections

The easier it is to identify a problem caused by a faulty integration connection, the faster the fix. When using Selenium, it can take time to find the root cause of a bug. With a visual solution, it becomes much simpler.

Solutions such as Leapwork use in-built visual debugging. With a video recording of a test run, you can see exactly where and why a test has failed. This visual approach means testers have concrete and easy-to-understand data that can be fed back to development so that bugs are fixed on time.

No-fuss intelligent field recognition

On the best of days, automating Salesforce and SAP’s browser-compatible version in Selenium is fragile and complex. The changing HTML structures in Salesforce make tests overwhelming to maintain.

To overcome this burden, a tool with intelligent field recognition makes it robust and easy to read data from a green screen terminal or SAP client, and validate that information against Salesforce in the browser, or vice versa. Read more about easily and quickly automating tests in Salesforce in our solution brief.

Support for any enterprise application

Salesforce and SAP can integrate with all kinds of surrounding systems, whether an ERP, warehouse management, or case management system. With Leapwork, you can use the same visual approach to build automation across all your integrated applications – such as Salesforce, SAP, a green screen terminal, or Oracle.

Want to learn more about data validation using test automation? We’ve got you covered. With an extensive library of educational content, you can find information on tools for building end-to-end automation in SAP, to test your next Salesforce Seasonal Release.

New call-to-action