Insomnia is usually treated as an API client for REST and GraphQL endpoints. With MailSlurp, you can also use it as an email workflow test bench.
Instead of only checking that your app returns , you can verify the email that a real user would receive.
What you can test in one Insomnia workspace
- Signup verification messages
- Password reset links
- OTP and MFA codes
- Notification content and headers
Step 1: Import the MailSlurp OpenAPI spec
In Insomnia, import from URL:
This gives you ready-to-run request templates for inbox creation, waiting for emails, and message inspection.
Step 2: Configure environment variables once
Create an environment with at least:
Set in requests using the environment variable.
Step 3: Build a four-request test chain
Use operation names from the imported spec in this order:
- Trigger your application action (signup/reset) against your app API
(or equivalent detail endpoint) and validate content
This pattern is enough to test most critical email journeys.
Example flow: signup verification
Request A: Create inbox
Run inbox creation and save returned values into environment variables.
Request B: Call your signup endpoint
Send to your app signup API.
Request C: Wait for email
Use the wait endpoint with timeout to avoid race conditions.
Request D: Inspect and assert
Check:
- subject contains expected phrase
- body includes verification link
- sender domain is correct
Optional: add Insomnia test assertions
Insomnia supports test scripts on responses. Use them to fail fast when expected content is missing.
Avoid flaky email tests
- Create a fresh inbox per test run.
- Use explicit wait timeouts.
- Assert business outcomes (valid link/code), not only message existence.
- Record message IDs for troubleshooting.
Security and compliance checks inside the same flow
After core workflow assertions, add:
This prevents shipping a flow that works functionally but fails deliverability.
Recommended route into CI
Use Insomnia for fast exploratory verification, then migrate critical checks into automated suites with Email Integration Testing and the Email Testing API.
If you need a full pre-release gate, use Email testing before you send.