Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计异常

testing-e2e测试端到端

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

353

周安装

15

GitHub Stars

4

下载量

124
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:testing-e2e(测试端到端)
来源仓库:https://github.com/alphaonedev/openclaw-graph
仓库路径:skills/testing-e2e
安装命令:
npx skills add https://github.com/alphaonedev/openclaw-graph --skill testing-e2e
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill testing-e2e

简介

testing-e2e 用于端到端测试,支持浏览器自动化与 UI 交互验证。

  • 适用于全栈应用的用户流程测试、跨浏览器兼容性及部署前回归检查。
  • 集成 Playwright、Cypress 等工具,支持视觉回归与 CI/CD 集成。
  • 需配置测试夹具与运行环境,区分本地模拟与生产环境差异。
  • 涉及外部服务时应控制访问频率,防止触发安全机制或计费问题。

SKILL.md

testing-e2e

Purpose

This skill enables end-to-end (E2E) testing using tools like Playwright, Cypress, and Selenium for browser automation, visual regression testing, and integration with CI/CD pipelines. It focuses on reliable test automation for web applications.

When to Use

Use this skill for full-stack testing of web apps, such as verifying user flows, UI interactions, or visual changes. Apply it in scenarios like regression testing before deployments, cross-browser compatibility checks, or when debugging UI issues in production-like environments.

Key Capabilities

  • Automate browser interactions with Playwright: Supports headless mode, tracing, and visual comparisons via expect.toHaveScreenshot().
  • Run Cypress tests: Includes real-time reloading, automatic waiting, and custom commands for assertions.
  • Implement Selenium for legacy setups: Use WebDriver to control browsers and handle dynamic content.
  • Page Object Model (POM): Structure tests with reusable page classes, e.g., define locators in a separate file.
  • Visual regression: Capture and compare screenshots using Playwright's trace viewer or Cypress plugins.
  • CI integration: Generate reports and artifacts for tools like GitHub Actions or Jenkins.

Usage Patterns

To set up E2E tests, initialize a project with the chosen tool and write tests in a dedicated directory. Always use environment variables for sensitive data, like $PLAYWRIGHT_BROWSER for browser selection.

Example 1: Playwright test for login flow

  • Create a test file: tests/login.spec.js
  • Code snippet: const {test} = require('@playwright/test'); test('login success', async ({page}) => {await page.goto('https://app.example.com'); await page.fill('#username', 'user'); await page.click('#login');});
  • Run with: npx playwright test --headed --project=chromium

Example 2: Cypress test for form submission

  • Add to cypress/integration/form.spec.js
  • Code snippet: describe('Form Submission', () => {it('submits correctly', () => {cy.visit('/form'); cy.get('#name').type('Test User'); cy.get('button[type=submit]').click(); cy.url().should('include', '/success');});});
  • Execute via: npx cypress run --browser chrome --spec cypress/integration/form.spec.js

For Selenium, use WebDriver with POM: Define a page class and call methods in tests.

Common Commands/API

  • Playwright CLI: npx playwright install to setup browsers; npx playwright test --trace on for tracing; API: page.locator('selector').click() for interactions.
  • Cypress CLI: npx cypress open for interactive mode; npx cypress run --config video=true to enable videos; API: cy.get('selector').should('be.visible') for assertions.
  • Selenium setup: Use webdriverio or similar; Command: node selenium-test.js with script like driver.get('https://example.com'); Config: JSON file for WebDriver options, e.g., {"browserName": "chrome"}.
  • Visual regression: Playwright's npx playwright show-trace trace.zip to view traces; Cypress via plugins like cypress-image-snapshot.

Integration Notes

Integrate this skill into your workflow by adding it to package.json scripts, e.g., "test:e2e": "npx playwright test". For CI, use GitHub Actions with a step: run: npx cypress run --reporter junit. If API keys are needed (e.g., for cloud services), set env vars like $SELENIUM_GRID_URL or $CYPRESS_API_KEY. Ensure browsers are installed via tools like playwright install --with-deps. For multi-tool setups, use a config file like playwright.config.ts with exports for projects.

Error Handling

When tests fail, check logs first: Use Playwright's --trace flag to generate traces and debug with the trace viewer. For Cypress, enable --config video=true to capture videos. Handle common errors by adding retries, e.g., in Playwright: test('retry', {retries: 2}, async () => {...}). For Selenium, wrap code in try-catch blocks:

try {
  await driver.findElement(By.id('element')).click();
} catch (error) {
  console.error('Element not found:', error);
}

Assert conditions explicitly to avoid flaky tests, and use env vars for dynamic configs to prevent setup errors.

Graph Relationships

  • Cluster: Connected to "testing" cluster for related skills like unit testing or integration testing.
  • Tags: Links to skills with tags "e2e", "playwright", "cypress", and "testing".
  • Dependencies: Relates to CI/CD skills for pipeline integration and browser automation tools for execution environments.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.36%
按下载量换算43

Claude

27.14%
按下载量换算34

Cursor

19.69%
按下载量换算24

Gemini CLI

9.73%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

未通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills