Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

email-testing

БесплатноБез исполняемых скриптовНе проверен

End-to-end testing of email-dependent flows — signup confirmation, password reset, magic-link login, OTP/MFA codes, and notification emails. Covers the…

petrkindlmannот petrkindlmann★ 317 звёзд на GitHub

Об этом скилле

Email-dependent flows fail silently: a test that "signs up and clicks confirm" by calling the confirm endpoint directly never proves the email was generated, addressed, templated, and linkable. This skill captures the real email, waits for it without a fixed sleep, extracts one unambiguous OTP or link from the body, and completes the flow — so a broken template, an unsigned token, or a wrong-recipient bug actually fails the test. It also keeps deliverability (SPF/DKIM/DMARC) in a separate non-blocking suite so a DNS problem never reds your functional gate.

Quick Route

Situation Go to
Pick a capture tool "Capture-inbox decision tree" below
Poll an inbox without a sleep references/mailpit-playwright.md (polling helper)
Pull an OTP / link out of the body references/mailpit-playwright.md (extraction)
Full password-reset / signup / magic-link E2E references/mailpit-playwright.md
Real addresses on staging references/hosted-inboxes.md (Mailosaur)
Per-test throwaway inbox references/hosted-inboxes.md (MailSlurp / ShazaMail)
Just preview a template locally references/hosted-inboxes.md (Ethereal)
Flag SPF/DKIM/DMARC problems references/deliverability.md
Email breaks in Outlook / Gmail references/client-compatibility.md (lint, not a render)
Tests pass locally, "no email yet" in CI "Flaky email in CI" below

Discovery Questions

Check .agents/qa-project-context.md first — if it exists, use it and skip anything answered there.

  • Where does the email need to be received? Local capture (Mailpit) covers most functional flows for free. A real, externally-deliverable address (staging, a third- party ESP, real DNS) means a hosted inbox (Mailosaur / MailSlurp). This is the single biggest tool-selection driver.
  • How parallel is the suite? High parallelism makes "the latest email" ambiguous — you need per-test unique addresses or per-test inboxes, not a shared mailbox.
  • Which flows? Signup confirmation, password reset, magic-link login, OTP/MFA, notification emails — they share one shape (capture, extract, complete) but differ in what you extract (link vs 6-digit code).
  • Is deliverability in scope? "Lands in inbox / passes SPF, DKIM, DMARC" is a separate non-blocking suite, not part of the functional OTP test. Decide upfront.
  • Local-only preview, or CI assertions? Previewing a template during dev is Ethereal; asserting in CI is Mailpit/Mailosaur/MailSlurp/ShazaMail. Don't confuse the two.
  • Which email clients do the recipients use? Mailpit and Ethereal draw the email with a browser engine, so neither shows what classic Outlook or Gmail drop. If layout matters there, add the client-compatibility lint and decide who checks the real clients.

Core Principles

  1. Capture the real email; never shortcut past it. Calling the reset endpoint directly or hardcoding a token skips the exact integration the test exists to cover — templating, recipient resolution, link generation, token signing. Submit on the UI, read the inbox.

  2. Poll, never sleep. Email arrival is asynchronous. A fixed waitForTimeout is either too short (flake) or too slow (wasted minutes) and is the #1 cause of flaky email tests. Use expect.poll / .toPass against /api/v1/search?query=..., or a built-in waiter (messages.get, waitForLatestEmail) that already polls for you. Bound each HTTP call at the client, including response-body parsing; a provider wait budget alone does not protect against a stalled connection.

  3. One unique recipient per test. Two parallel tests both reading "the latest signup email" grab each other's mail. Make every test's address unique (plus-addressing or a per-test inbox) and filter by recipient when reading. ShazaMail can instead isolate each test with a dedicated test inbox ID and received_after matcher. Clearing the inbox between tests does NOT survive parallelism.

  4. Extract against the real template and reject ambiguity. Pull the OTP from the email body with a label-specific regex and require one distinct code. Parse HTML links with a DOM parser, then require the exact approved origin and the flow's path and token. A missing or ambiguous match fails; never navigate to a guessed URL.

  5. Assert content, not existence. "An email arrived" is a weak assertion. Check the subject, the from address, and that links point to the right domain. Wrong-template and wrong-link bugs only surface if you assert on content.

  6. Deliverability is a separate, non-blocking suite. SPF/DKIM/DMARC come from a real receiving server's authentication, never from the body text — and they must not block the functional flow tests.


Capture-inbox decision tree

Pick the cheapest tool that can actually receive your mail. Default to Mailpit for local + CI func

Полный SKILL.md на GitHub

Установить email-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/client-compatibility.mdreferences/deliverability.mdreferences/hosted-inboxes.mdreferences/mailpit-playwright.md

FAQ

Что делает скилл email-testing?

End-to-end testing of email-dependent flows — signup confirmation, password reset, magic-link login, OTP/MFA codes, and notification emails. Covers the capture-inbox decision tree (Mailpit, Mailosaur, MailSlurp, ShazaMail, Ethereal), Playwright polling without fixed sleeps, template-aware extraction of links/OTPs from the email body, deterministic per-test addresses (plus-addressing, per-inbox), subject/from/header/link assertions, SPF/DKIM/DMARC deliverability checks as a separate suite, and a lint of the captured HTML against documented Outlook/Gmail/Yahoo limits. Use when: "test the signup confirmation email," "password reset email test," "magic-link login test," "capture OTP from email," "Mailpit," "Mailosaur," "MailSlurp," "ShazaMail," "email arrives flaky in CI," "assert email subject/from/links," "email breaks in Outlook," "lint the email HTML." Not for: Sending transactional email from your app code, or API-only contract tests of an email provider — those are api-testing / app concerns. How an email actually renders in a client (Outlook/Gmail layout, dark mode) is out of scope: the lint flags documented limits only (note rendering as a gap; use seed accounts, Litmus or visual-testing). Related: playwright-automation, api-testing, test-data-management, qa-project-context.

Как установить скилл email-testing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл email-testing запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить email-testing с