All use cases
E2E

E2E Test Automation

Fully automate signup and email verification flows in CI/CD

With MailBrew, you can programmatically test the entire flow from user registration to email verification. Generate a unique address for each test, automate receiving confirmation emails and clicking links. Integrate into your CI pipeline to detect regressions instantly.

Why MailBrew for this use case

01

Complete test isolation

Generate a unique email address per test case. No conflicts even with parallel execution.

02

CI/CD native

Works with GitHub Actions, CircleCI, GitLab CI, and more. Just set your API key as an environment variable.

03

Fast feedback

Detect email receipt instantly via webhook notifications. No polling needed, dramatically reducing test execution time.

04

Framework agnostic

Works with Playwright, Cypress, Selenium, Puppeteer, and any E2E framework of your choice.

Sample code

JavaScript (Playwright)

JavaScript (Playwright)
// Playwright + MailBrew: Signup E2E test
import { test, expect } from '@playwright/test';
import MailBrew from '@mailbrew/sdk';

const mb = new MailBrew(process.env.MAILBREW_API_KEY);

test('user registration to email verification', async ({ page }) => {
  // 1. Create a test address
  const addr = await mb.addresses.create({ ttl: 300 });

  // 2. Fill in the signup form
  await page.goto('https://myapp.com/signup');
  await page.fill('[name="email"]', addr.address);
  await page.fill('[name="password"]', 'SecurePass123!');
  await page.click('button[type="submit"]');

  // 3. Wait for and retrieve the confirmation email
  const emails = await mb.addresses.waitForEmail(addr.address);
  const verifyUrl = emails[0].html_body.match(/href="([^"]+verify[^"]+)"/)[1];

  // 4. Click the verification link
  await page.goto(verifyUrl);
  await expect(page.locator('.welcome')).toBeVisible();
});

Ready to try this use case?

Get started with the free plan today. No credit card required.

Create free account