
If you’ve ever tested a signup flow with email verification or OTP… you’ve probably seen this:
Tests pass locally ✅
CI randomly fails ❌
Retries create weird edge cases 🤯
And the worst part?
👉 You don’t know why it failed.
Was it:
Email delay?
Wrong OTP picked?
Parsing issue?
Multiple emails sent?
Most tools don’t tell you. They just give you:
“Timeout exceeded”
Most developers treat email in tests like a simple API response.
But it’s not.
It’s a distributed, asynchronous system:
Email provider latency varies (1–5s+)
Retries can generate multiple emails
OTP parsing can fail silently
CI environments behave differently than local
This is why:
👉 Mocking works… until it doesn’t
👉 Real email testing works… but becomes flaky
Fast ✅
Deterministic ✅
Completely unrealistic ❌
👉 Doesn’t catch real delivery issues
Easy to use ✅
Works for basic flows ✅
But tools like typical temp mail platforms are built for:
privacy
spam avoidance
not for:
👉 testing auth systems
Better than scraping ✅
Still limited ❌
Problem:
👉 You still don’t know what happened inside the flow
Instead of just waiting for OTP…
I started tracking:
when the email was triggered
when it actually arrived
when OTP was extracted
how long each step took
Signup triggered → 0ms
Email received → 3.8s
OTP extracted → 4.1s Suddenly:
👉 failures weren’t random anymore
👉 they were explainable
Now instead of:
❌ “Test failed”
I get:
Email delayed by 4.2s → exceeded timeoutAnd that’s a completely different experience.
I ended up building a small system around this idea:
programmatic inbox creation
real-time email detection
OTP extraction
timeline debugging
CI-friendly APIs + SDKs
So instead of just:
await waitForOtp()You actually understand:
👉 what happened behind the scenes
If you’re curious, this is what I’ve been working on:
https://www.freecustom.email/api
How are you currently testing email/OTP flows?
Fully mocked?
Using temp mail tools?
Real provider testing in CI?
And more importantly:
👉 how do you debug failures when they happen?
Most developers don’t struggle with writing tests.
They struggle with:
👉 understanding why tests fail
And email-based auth flows are one of the biggest hidden sources of that pain.
0
3
0