E2e Testing 标志

E2e Testing

社区
nahid-sparktales
e2e-testing

Build and keep end-to-end suites that are worth their runtime — which journeys belong at this level, selectors that survive refactors, waiting on state instead of sleeping, per-spec data isolation, and flake triage that finds the cause. Use when adding or repairing an e2e suite, when specs are slow or intermittently red, or when deciding whether a case belongs here at all. Not for one-off checking that a change renders, not for unit or integration tests, and not for load testing.

概览

发布者nahid-sparktales
代码仓库agent-dispatcher
技能名称e2e-testing
星标数
58
复刻数
5
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 nahid-sparktales 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 E2e Testing AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/quality/e2e-testing
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nahid-sparktales/agent-dispatcher.git /tmp/agent-dispatcher
mkdir -p .claude/skills
cp -r /tmp/agent-dispatcher/skills/quality/e2e-testing .claude/skills/e2e-testing
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 E2e Testing,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 E2e Testing。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 E2e Testing 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

End-to-end testing

The end-to-end level is the most expensive coverage available and the only level that can prove a journey holds together. Suites die when those two facts are confused: everything gets tested here, the suite gets slow and flaky, reruns become routine, and a red run stops meaning anything.

A suite whose failures are ignored is worse than no suite — it costs runtime and provides a false signal.

When this fires

Creating, extending, triaging or pruning an automated end-to-end suite. It does not fire for manually confirming that a change renders and works (browser-verification), nor for coverage that a unit or integration test could hold (test-design).

Procedure

  1. Admit a journey only if it loses its meaning at a lower level. Signup through first use; add to cart through payment confirmation; a permission boundary spanning UI, API and database. If a unit or integration test can observe the same failure, it belongs there — cheaper, faster, and it names the cause instead of the symptom. Validation-message wording, per-field rules and error formatting do not belong here.
  2. One spec is one journey with one reason to fail. A spec that walks six unrelated features tells you only that one of six broke, and it breaks six times as often.
  3. Set up state through the API or a fixture, and assert through the UI. Driving the UI to create preconditions triples the runtime and makes every spec fail whenever an unrelated screen changes. The journey under test is the part you click.
  4. Log in once, not per spec. Authenticate through an API call or a seeded session/storage state and reuse it. The login form itself is one spec's journey, not every spec's preamble.
  5. Give every spec its own data. A unique account, tenant or record per run, created by the spec and torn down or left disposable. Shared seed data makes specs order-dependent and turns parallel execution into cross-talk. Never rely on a record another spec created.
  6. Select by role and accessible name, or by a dedicated test id. In that order. CSS class chains, nth-child and user-visible copy all break on changes that break nothing real — and role-based selection tests something true about the page while it does it.
  7. Wait for states, never for durations. Wait for the element to be visible and enabled, for the request to settle, for the URL or the rendered text to change. Use the framework's retrying assertions with an explicit timeout. A fixed sleep is either slower than necessary or shorter than reality, usually both on the same day.
  8. Assert something a user could see. Text on the screen, the URL, a value in a field, an item that disappeared. Asserting on a network call or on internal state is an integration test wearing a browser.
  9. Pin the environment. A named build, seeded data, a fixed viewport, timezone and locale, and animations reduced. These are the four things that differ between a laptop and CI. Never point the suite at production — it creates real records, sends real mail and can touch real people; that is outward-facing, so stop and ask, and use a disposable environment instead.
  10. Capture the artifact on failure — trace, video, screenshot, console log, the failing selector. A failure with no artifact costs a full reproduction cycle; with one, triage is usually a minute.
  11. Allow at most one retry, and treat a pass-on-retry as a failure to investigate, not a pass. Record which specs needed a retry, because that record is the flake list.
  12. Triage each flake to a cause before touching it. Four causes, four different fixes: a race in the test (wait on the right state), a race in the application (a real bug — fix the app, not the wait), shared or leaked state (isolate), or an unstable dependency (stub it at the network boundary, or drop the journey). "Fixed" by adding a sleep is not fixed; it is a longer suite with the same defect.
  13. Prove stability before believing it. Run the suite twice back to back on the same build, and once with spec order shuffled or parallelism increased. Green once is not green.
  14. Prune on evidence. For a suite that hurts, measure: runtime per spec, failure history, how often a red run found a real defect. Quarantine anything unfixable with an owner and a date, and propose deletions with the numbers attached. Deleting specs removes someone's coverage — ask before removing them, and never quarantine as a way of silencing a real failure.

Checklist

  • Every spec is a journey that no lower level could observe
  • One journey per spec, one reason to fail
  • Preconditions created by API or fixture, not by clicking
  • Authentication seeded once and reused
  • Data unique per spec and per run; no cross-spec dependency
  • Selectors are role or test-id based, not classes, positions or copy
  • No fixed sleeps anywhere; every wait names a state
  • Assertions are on user-visible outcomes
  • Environment pinned: build, seed, viewport, timezone, locale, animations
  • Traces or screenshots retained on failure
  • Retries capped at one and every retry recorded
  • Suite run twice and shuffled before being called stable
  • Quarantine list has owners and dates; nothing silenced without one

Failure handling

  • Passes locally, fails in CI — compare the four usual suspects first: viewport, timezone and locale, animation and network timing, and parallel workers sharing data. Read the trace before changing the test.
  • Fails once, passes on rerun — that is a flake, not a pass. Log it and triage it to a cause. Reporting it as green is how a real race reaches production.
  • Suite is green but the feature is broken — the coverage is at the wrong level or the assertions are not user-visible. Say which, and fix the level rather than adding more specs.
  • A journey cannot be automated (third-party payment page, real email or SMS, a device capability) — stub at the network boundary if that keeps the journey meaningful, otherwise state plainly that this path is manually checked, by whom and when. Do not simulate it and call it covered.
  • Browser or runner unavailable — say the end-to-end level could not be run, name what was checked instead, and do not describe the journeys as passing.
  • Under pressure to skip a failing spec to unblock a release — that is a release decision, not a test change. Report what the spec covers and what shipping without it risks, and let the owner decide.

Evidence to report

The journeys covered and, explicitly, the ones that are not; the command that runs the suite with its real output; the result of two consecutive runs and one shuffled run; traces or screenshots for every failure; the retry and quarantine list with owners and dates; and the environment the suite ran against, named. A suite described as passing without a second run and an environment name is a single sample.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

E2e Testing AI 技能有什么作用?

Build and keep end-to-end suites that are worth their runtime — which journeys belong at this level, selectors that survive refactors, waiting on state instead of sleeping, per-spec data isolation, and flake triage that finds the cause. Use when adding or repairing an e2e suite, when specs are slow or intermittently red, or when deciding whether a case belongs here at all. Not for one-off checking that a change renders, not for unit or integration tests, and not for load testing.

为什么在 TypingMind 中使用 E2e Testing?

因为您只需安装一次,就能搭配任何模型使用。E2e Testing 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 E2e Testing?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/quality/e2e-testing。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 E2e Testing?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

E2e Testing 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 E2e Testing 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

E2e Testing AI 技能免费吗?

是的。nahid-sparktales 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇