Skills Plugins MCP Prompt Model 博客 我的中心

e2e-testing-patterns

Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment. Use when implementing E2E tests, debugging flaky tests, or establishing testing standards.

DeepseekModel 官方收录技能 质量 优秀 · 90 v1.0.0

获取

https://deepseekmodel.com/api/download.php?id=wshobson-agents-plugins-developer-essentials-skills-e2e-testing-patterns-skill-md&format=skill
下载 .skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name e2e-testing-patterns description Master end-to-end testing with Playwright and Cypress to build reliable test suites that catch bugs, improve confidence, and enable fast deployment. Use when implementing E2E tests, debugging flaky tests, or establishing testing standards. E2E Testing Patterns Build reliable, fast, and maintainable end-to-end test suites that provide confidence to ship code quickly and catch regressions before users do. When to Use This Skill Implementing end-to-end test automation Debugging flaky or unreliable tests Testing critical user workflows Setting up CI/CD test pipelines Testing across multiple browsers Validating accessibility requirements Testing responsive designs Establishing E2E testing standards Core Concepts 1. E2E Testing Fundamentals What to Test with E2E: Critical user journeys (login, checkout, signup) Complex interactions (drag-and-drop, multi-step forms) Cross-browser compatibility Real API integration Authentication flows What NOT to Test with E2E: Unit-level logic (use unit tests) API contracts (use integration tests) Edge cases (too slow) Internal implementation details 2. Test Philosophy The Testing Pyramid: /\ /E2E\ ← Few, focused on critical paths /─────\ /Integr\ ← More, test component interactions /────────\ /Unit Tests\ ← Many, fast, isolated /────────────\ Best Practices: Test user behavior, not implementation Keep tests independent Make tests deterministic Optimize for speed Use data-testid, not CSS selectors Detailed patterns and worked examples Detailed pattern documentation lives in references/details.md . Read that file when the navigation tier above is insufficient. Best Practices Use Data Attributes : data-testid or data-cy for stable selectors Avoid Brittle Selectors : Don't rely on CSS classes or DOM structure Test User Behavior : Click, type, see - not implementation details Keep Tests Independent : Each test should run in isolation Clean Up Test Data : Create and destroy test data in each test Use Page Objects : Encapsulate page logic Meaningful Assertions : Check actual user-visible behavior Optimize for Speed : Mock when possible, parallel execution // ❌ Bad selectors cy. get ( ".btn.btn-primary.submit-button" ). click (); cy. get ( "div > form > div:nth-child(2) > input" ). type ( "text" ); // ✅ Good selectors cy. getByRole ( "button" , { name : "Submit" }). click (); cy. getByLabel ( "Email address" ). type ( "user@example.com" ); cy. get ( '[data-testid="email-input"]' ). type ( "user@example.com" ); Common Pitfalls Flaky Tests : Use proper waits, not fixed timeouts Slow Tests : Mock external APIs, use parallel execution Over-Testing : Don't test every edge case with E2E Coupled Tests : Tests should not depend on each other Poor Selectors : Avoid CSS classes and nth-child No Cleanup : Clean up test data after each test Testing Implementation : Test user behavior, not internals Debugging Failing Tests // Playwright debugging // 1. Run in headed mode npx playwright test --headed // 2. Run in debug mode npx playwright test --debug // 3. Use trace viewer await page. screenshot ({ path : 'screenshot.png' }); await page. video ()?. saveAs ( 'video.webm' ); // 4. Add test.step for better reporting test ( 'checkout flow' , async ({ page }) => { await test. step ( 'Add item to cart' , async () => { await page. goto ( '/products' ); await page. getByRole ( 'button' , { name : 'Add to Cart' }). click (); }); await test. step ( 'Proceed to checkout' , async () => { await page. goto ( '/cart' ); await page. getByRole ( 'button' , { name : 'Checkout' }). click (); }); }); // 5. Inspect page state await page. pause (); // Pauses execution, opens inspector
Agent 识别该技能的关键词,点击任意一个即可复制。

该技能未提供触发词。

下载的 .skill 包内含以下字段。
字段 说明
format格式标识(skill/v1)
skill_id技能唯一 ID
name技能名称
version版本号
description技能描述
category所属分类(数组)
trigger_words触发词列表
tags标签列表
source来源标识
source_url来源链接(本页地址)
exported_at导出时间(每次下载生成)
system_prompt系统提示词正文
model_config模型参数:provider / model / temperature / max_tokens / top_p
examples示例
install_guide各平台导入说明(Coze / Dify / Claude / 自定义框架)
同一份技能可按不同平台格式导出。
.skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用 下载
.skillpro 增强格式,额外含脚本 / 工具 / 依赖 / 钩子占位 下载
.json 纯 JSON 导出,只含 system_prompt 与模型参数 下载
Coze 带 frontmatter 的 Markdown,Coze 平台导入用 下载
Dify Dify DSL,创建应用后直接导入 下载

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。