← Integration Engineering
Integration Engineering

Never Test an Integration on Real Customer Data

12 Oct 2026·3 min read

You build an email integration and run it once with the real API key. It works. It also sends a welcome email to every customer in the list. There is no undo button for an email.

Half of an integration lives in someone else’s system. You do not control their data, their limits or their outages. So you control what you can.

A sandbox, and saved responses

A sandbox is a practice copy of the provider’s system. Payments move no money and emails reach no inbox. Use it for anything that creates or sends, and keep sandbox keys and real keys completely apart.

For automated tests, call the real API once, save the reply in a file, and let your tests read that file. It is fast, free and the same every time. Refresh these files now and then, because providers change fields.

curl -s https://api.github.com/users/octocat -o octocat.json
Saves a real reply from GitHub’s public API into a file. I ran it while writing; the file starts with "login": "octocat".

Test the bad cases too

Most integration bugs are not in the happy path. Check what your code does with a 401, a 429, a 500, a timeout and a missing field. The timeout is the tricky one: the action may have happened even though no reply came, so a plain retry can do it twice.

One final check on a real account, by hand

Sandboxes are not perfect copies. Before you call it done, do one real run on an account you own, with a human watching. One record, one message to yourself. Not a script that loops over real customers.

Do this in 60 secondsOpen the settings or .env file your tests use. If it holds a real production key, swap it for a sandbox or test key now.
Today’s AI angleGive an AI agent sandbox tools first and watch what it calls. It may call a "send" tool you expected it to skip. In a sandbox that is a lesson; in production it is an incident.
Never Test an Integration on Real Customer Data · Ali Huzaifa