Salesforce integration testing: how to test the links between Salesforce and your other software

Salesforce integration testing: how to test the links between Salesforce and your other software

In short: Salesforce integration testing checks the links between Salesforce and your other software. Does the data arrive correctly and on time, and are errors handled properly? Test the whole chain, not just your own side. Watch timing, API limits and the rights of the integration user. Then keep those tests in your regression set, because integrations break on ordinary changes.

Most Salesforce testing stops at the edge of the org. That’s exactly where the failures that hurt most begin. An order that never reaches the ERP. A lead that shows up twice in the marketing software. A price in the customer portal that differs from the one in Salesforce. That’s why I’d never treat Salesforce integration testing as a pre-go-live task. It’s work that comes back with every change. Here’s what to test, where to test it, and how to keep doing it.

Why do integrations break more often than Salesforce itself?

Integrations break more often because they sit between two systems, and usually nobody owns the part in between. Salesforce gets three major releases a year. Your ERP and your marketing software have their own rhythm. Your own team changes fields, rules and flows. Every change on one side can hit the other side. Renaming a field or tweaking a validation rule can make a flow further down the line fail. We see it in Salesforce projects again and again. The Salesforce team tests its side, the ERP team tests its side. The end-to-end test, the one that follows the whole chain, falls in between. With AI, developers write changes faster, also to the org. So there are more changes per sprint, while the integrations stay the same. Our article on why Salesforce tests break after small changes goes deeper into that part.

There’s one more pattern. New integrations often get tested once, when they go live. After that, they never make it into the regression tests. A year later, nobody knows whether they still work as intended.

What do you test in a Salesforce integration?

You test whether the right data arrives at the right moment, and what happens when it doesn’t. Start from the business process, not the technology. Follow one order, one customer or one lead from start to finish, through every system. Then look at these points for each integration:

  • Mapping. Does every field land in the right field, in the right format? Think of dates, amounts, picklists and empty fields.
  • Error handling. What happens when the other system is down or returns an error? Is the message retried, and does someone see that it failed?
  • Timing. Many integrations don’t work instantly but with a delay. Test what happens when an update arrives late, or twice.
  • Limits. Salesforce caps the number of API requests your org can make in 24 hours. Test what happens with a big batch, like an import or a nightly sync.
  • Permissions. The integration runs under its own user. Does it have exactly the rights it needs, no more and no less?

Timing and limits cause the trickiest failures. With marketing automation or product data integrations, we see tests that fail now and then because of API throttling or sync delays. Those failures are hard to reproduce. That’s why you want to catch them in a test, not in production.

Where do you test: which sandbox, and real or mocked systems?

Test the chain in a sandbox that looks like production, connected to the test environments of your other systems. A sandbox is a copy of your Salesforce org for testing. Salesforce offers several types. A Developer sandbox holds your setup but no production data. A Partial Copy sandbox holds a sample of your data. A Full sandbox is a complete copy. For an end-to-end test you want realistic data and real connections, so usually a Partial Copy or Full sandbox. Watch out for personal data when you work with a copy of production.

Then the question of whether to connect the other system for real or mock it. Mocking, putting a stand-in in place of the real system, is faster and more stable. It’s fine for the tests you run on every change. But a mock doesn’t prove the real chain works. So do both: fast tests with mocks, and real end-to-end tests at fixed moments. Also use fixed, repeatable test data. In connected environments data changes all the time, and then tests fail while nothing is broken.

How do you keep integration tests in your regression set?

You keep them in by automating them and running them on every change, like your other regression tests. A regression test checks that what worked before still works. Most of an integration’s logic is best tested at API level, straight on the integration, without screens. Those tests are fast and stable. Our article on API testing shows how to use them to guard your business logic. On top of that, run a few key processes through the whole chain, via the screens. If you use a test tool like Provar, you can combine those steps in one test. Do plan for maintenance. When Salesforce or your own pages change, the tests have to change with them.

One simple rule makes the biggest difference: no new integration goes live without its tests in the regression set. That way your set grows with your landscape. An honest trade-off: an integration you only use once, like a one-off data migration, doesn’t need automating. Test it thoroughly by hand and leave it there.

What does this mean for your team?

For your team, it means every integration needs an owner, for testing too. Without one, the Salesforce team tests its side, the ERP team tests the other, and the chain gets left behind. It isn’t exciting work, but it’s what makes a rollout succeed. At the International Trading Company, integration testing sat in the same plan as migration, functional, acceptance and regression testing. That Salesforce rollout across 42 countries was completed within one year, within scope and without major issues. Read the International Trading Company case.

We’ve tested Salesforce for years, as a Provar partner and with an eye on everything connected to it. We help you map the chain, build the right tests and keep them running as your org changes. Your team stays in control of what goes live.

A first step: list every integration with Salesforce. Next to each one, write when it was last tested, and by whom. Every integration without a date is a risk at your next release.

Test your Salesforce org together with everything connected to it.

See Salesforce testingTalk to our team

Frequently asked questions

Which sandbox is best for Salesforce integration testing?

Usually a Partial Copy or Full sandbox, because you need realistic data. Connect it to the test environments of your other systems, not to production. A Developer sandbox is good for quick tests of one part.

Should we mock external systems?

For the fast tests on every change, yes. But also plan real end-to-end tests with the real systems, because only those show the whole chain works.

Can Salesforce integration tests be automated?

Yes. Test the logic at API level, and test a few key processes through the whole chain via the screens. Plan time for maintenance, because the tests have to follow every change.

Who should own the integration tests?

Agree on it per integration. It often works best when one team tests the whole chain, with help from the owners of the systems on both sides.