← Blog2026-11-26
How we test a sandbox service: compatibility, speed and correctness, every day
Three claims keep the service honest — E2B compatibility, measured speed, no data loss — and each has a battery that runs against production daily and pages a human.
A sandbox service lives or dies on three claims: your E2B code still works, it's fast, and it doesn't lose your data. None of these stays true by itself — SDKs ship new versions, optimizations regress, and "it worked yesterday" is not evidence. So each claim has a test battery that runs against production every day, and a failure pages a human. This post is the machinery behind the numbers we've been quoting — including the create p50 of 163–169 ms that puts a Singapore-region deployment within reach of providers an order of magnitude bigger.
Compatibility: examples, not assertions
Claiming E2B compatibility in a README is free. Keeping it true is the work. We maintain a public repository of example programs — Python and JavaScript, each doing something a real agent does: tool calling with a code interpreter, Claude Code running in a sandbox, a browser driven with Playwright, a desktop session, a parallel evaluation, plain npm and pip installs. A job runs all of them against production every day, with the SDK versions pinned (e2b 2.64.0, e2b-code-interpreter 2.11.10, e2b-desktop 2.7.2, and the JavaScript SDKs). A failure pages us; a new SDK version goes into the repository first, before we claim support. Compatibility is a matrix that rots unless something exercises it — so something exercises it.
The discipline underneath is worth naming: test only from the outside. Cases drive the official SDKs (with just E2B_DOMAIN and an API key, exactly like a customer), the operator CLIs, and E2B's admin API — never the service's internal state, except in cases whose whole point is reconciliation, like usage metering or resource-leak accounting. Every case states its expected result; a known issue is marked xfail(strict=True), so the day the bug gets fixed the test turns red and reminds us to remove the marker.
Correctness: suites with boundaries
The same pytest battery serves four occasions — development, post-deploy verification (read-only checks first, then a smoke suite of the main flows), performance and stress work, and pre-release acceptance. Cases declare what they need: an SDK client, operator access, E2B admin, or fault injection (stop a node, kill a service). Markers declare what they cost: readonly touches nothing, smoke walks the main path, destructive and heavy never run in production at all — the environment file refuses the permissions, so the same suite is safe to point at live traffic. Test customers are created through the real business layer — signup, credit grant, approval, API key — with IDs that exclude them from every report, and each case cleans up after itself or complains loudly.
Performance: measured, published, enforced
Speed claims have their own pipeline. A benchmark driver in Singapore creates and resumes sandboxes against production on a schedule; the resulting numbers — create p50/p90, resume p50/p90, cold waves — are what the benchmarks page shows, and what the previous two posts quote. The acceptance battery from the overcommit post runs the same way: fairness, interactive latency, swap integrity — each bound a line, three consecutive passes required. When an optimization lands, the version's numbers go into the docs next to the ones it replaced; when it regresses, the battery says so before a customer does.
A detail we got right early: the benchmark measures what a client feels — full request, TLS handshake, everything — not the flattering server-side number. The orchestrator trace exists too (that's how the optimization posts break down where the milliseconds go), but the headline number is the one a customer can reproduce.
| Layer | What runs | Where | Cadence |
|---|---|---|---|
| Compatibility | Full example apps over pinned SDKs | Public repo → production | Daily, pages on failure |
| Correctness | Outside-in pytest suites with declared permissions | Lab cluster + production (safe markers only) | Development, deploys, acceptance |
| Performance | Create/resume/wave measurements, client-side | Production, Singapore client | Daily, published |
| Density | The C/M acceptance battery | Bare-metal node | On changes, three passes required |
The payoff of boring machinery like this isn't the numbers it produces — it's that every other post in this series can put "measured" after a claim and mean something specific by it.