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★ 317 звёзд на GitHubОб этом скилле
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
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.
Poll, never sleep. Email arrival is asynchronous. A fixed
waitForTimeoutis either too short (flake) or too slow (wasted minutes) and is the #1 cause of flaky email tests. Useexpect.poll/.toPassagainst/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.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_aftermatcher. Clearing the inbox between tests does NOT survive parallelism.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.
Assert content, not existence. "An email arrived" is a weak assertion. Check the
subject, thefromaddress, and that links point to the right domain. Wrong-template and wrong-link bugs only surface if you assert on content.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
Установить email-testing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic