← All posts
Walkthrough

Testing email OTP and magic links with TestVibe Mailbox

Email OTP and magic-link flows need the message delivered outside the browser. Current TestVibe provides first-class Mailbox email support. The underlying MailSlurp vendor plugin is hidden from the customer catalog; you do not install it as a project plugin. Current Mailbox SMS is unavailable.

Check Mailbox configuration

Your installation needs a configured inbox provider. Dispatch can provision an inbox when a feature uses @testvibe_email or a supported mailbox flow and injects the address and inbox id into generation/run environments. The token needs no ordinary project variable. If the token is referenced without a configured provider, work can fail with a Mailbox configuration error. A preconfigured project address/inbox can override provisioning, so inspect that setup if you intend fresh inboxes.

Provider credentials should be managed through installation configuration or the documented project-secret fallback, rather than embedded in feature text. Secrets can be injected into generation and run environments. Known transcript values are redacted, but inspect browser evidence before sharing it.

Keep application credentials in project secrets. The runtime mailbox token supplies the test email address; mailbox delivery still requires the configured provider.

Describe the email-code flow

This is an illustrative feature. Adapt the entrypoint, controls, code format and expected identity to your application.

Feature: Email one-time-code sign-in

  Scenario: Sign in with a code delivered to the test mailbox
    Given I open the application landing page
    When I open the sign-in screen
    And I request a sign-in code for "@testvibe_email"
    And I enter the code from the new sign-in email
    Then the dashboard should open
    And my mailbox address should be visible in the account menu

The shipped identity helper can wait for email and fill an extracted code. Generation must still identify your actual code input and expected message. Specify a suitable timeout and subject when needed. With a reused inbox, distinguish the current attempt from older messages; a matching old email does not prove delivery worked.

A supported verification-email helper waits for an email and navigates to a link. Review the chosen destination: a message can contain multiple links, and the first HTTPS link is not necessarily the sign-in link. Assert an authenticated landmark and the expected account identity after following it.

Feature: Magic-link sign-in

  Scenario: Sign in through the new email
    Given I open the application landing page
    When I request a magic link for "@testvibe_email"
    And I open the sign-in link from the new sign-in email
    Then the dashboard should open
    And the account menu identifies the expected test user

Verify the complete path

Inspect generated code and completed verification/run evidence. A passing weak assertion is not proof of email delivery or correct authentication. Check that the test waits for the intended new message, extracts the intended code/link and verifies the final account. Delivery latency and provider limits can still cause failures.

For generic SMS testing, use a separately supported provider; do not infer SMS support from the Mailbox UI or a vendor’s API capabilities. Get early access, or read the TestVibe docs for your installation’s current setup.

Coming soon

Turn a described flow into a reviewable test.

Describe a flow in plain English. Generate a Playwright test, run it on your schedule, and review proposed fixes when your UI changes. Join the waitlist for early access.

  • Plain English in, real Playwright out
  • Runs in your CI, on your schedule
  • No credit card, unsubscribe anytime