Why digital twins?
When your code interacts with external services, testing against the real service is risky, slow, and unreliable. Traditional mocks are static and don’t capture the statefulness of real APIs. Digital twins solve both problems.| Approach | Stateful | Behavioural | Edge cases | Safe |
|---|---|---|---|---|
| Real service | Yes | Yes | Yes | No |
| Static mocks | No | No | No | Yes |
| Digital twins | Yes | Yes | Yes | Yes |
Properties
Stateful
Stateful
The twin remembers state before an API call and updates state after the call completes. If you create a Stripe customer, subsequent calls reflect that customer’s existence — just like the real Stripe API.
Behavioural
Behavioural
The twin reacts the same way the real service would to an API call, including error responses, rate limits, and side effects. A payment to a non-existent customer returns the same error code Stripe would.
Supported services
Arga currently provides digital twins for common third-party services. We’re continuously expanding coverage based on client needs. If you rely on a service not yet supported, book a demo and we’ll discuss building a twin for your stack.How Arga uses digital twins
During PR validation, Arga routes all external API calls from your sandbox through the appropriate digital twin. This means:- No real side effects — A PR that sends a Slack notification or charges a Stripe card won’t do either during testing.
- Deterministic results — Tests produce consistent outcomes regardless of external service availability.
- Edge case coverage — Twins can simulate failure modes (timeouts, rate limits, malformed responses) that are hard to trigger against real services.