本文へ移動
cccskills
無料GitHub で公開

fec-testing-strategy

Use when planning or reviewing a frontend testing strategy, selecting the right test layer by risk, mapping coverage across static checks, unit tests, component tests, integration tests, E2E, Storybook/visual regression, a11y, security, performance, or CI gates. Do not use to write individual component/E2E tests or merely run existing validation commands; Chinese triggers include test strategy, test layering, test plan, coverage matrix.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md4.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Front-end testing strategy

Purpose

Choose your testing approach by “closeness to code/level of risk coverage” to avoid cramming all risks into component tests or E2E.

Procedure

  1. Identify the type of change: pure logic, UI components, cross-module processes, browser capabilities, visual stability, dedicated quality risks, or release gates.
  2. Establish a test level matrix, at least distinguish:
    • Static checking: TypeScript, ESLint, format, dependency security, build.
    • Unit testing: utils, hooks/composables, state logic, schema, pure functions.
    • Component testing: props/emits, user interaction, loading/error/empty, mock boundaries.
    • Lightweight integration testing: form + API mock + routing/Store/Provider context.
    • E2E: real browser, cross-page key journeys, authentication, payments, permissions, CI artifacts.
    • Visual/interactive documentation: Storybook interaction, Chromatic, visual regression baseline.
    • Special quality: a11y, security, performance, compatibility.
  3. Allocate coverage by risk: high-frequency core paths prioritize E2E, complex component status prioritizes component testing, pure logic prioritizes unit testing, and lightweight integration testing is used for cross-provider collaboration.
  4. Use the testing pyramid to control maintenance costs:
    • The closer to pure logic, the more tests, the faster, and the more stable it is.
    • E2E only covers key user journeys and real browser risks, not every branch.
    • Vision, a11y, safety and performance belong to dedicated quality layers and are not included in ordinary component tests.
  5. Check whether commands, test frameworks, directory conventions, and CI gates already exist; use the current status of the project and do not introduce unnecessary tools to the policy document.
  6. Plan failure evidence: Each high-risk item should describe how to locate it when it fails, such as assertions, screenshots, traces, coverage, logs, or reports.
  7. Design test data and mock strategies: share fixtures to express business scenarios, and the test data builder only encapsulates noise fields to avoid handwriting random objects for each test.
  8. Manage flaky risks: Mark time, network, animation, nonce, concurrency, and external services as sources of instability, and specify isolation, retries, and evidence artifacts.
  9. Output the minimum executable test plan: what is covered by each layer, what is not covered, priority, recommended commands and responsibility skills.

Constraints

  • Don't write the test strategy as a general "write more tests"; each suggestion must correspond to a specific risk.
  • All projects are not required to complete the complete testing pyramid; they are tailored according to business risks and team maintenance capabilities.
  • Do not consider E2E as a replacement for unit/component testing; do not consider component testing as a guarantee of true browser compatibility.
  • Do not force the introduction of new frameworks for small changes; give priority to reusing existing tools and scripts in the warehouse.
  • Do not pursue coverage figures without risk explanation; coverage can only assist judgment and cannot replace scene coverage.
  • Do not include random fixtures, shared global state, or tests that depend on execution order into trunk gates.

Expected Output

Output test layering recommendations, mapping of risks to test layers, priorities, recommended commands, the scope of test files that need to be added or adjusted, and the specific skills or agents that need to be clearly diverted.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

用于审查或改进前端无障碍、语义结构、键盘支持、焦点管理、ARIA 标签、屏幕阅读器行为、WCAG 2.2 问题、触控无障碍或辅助技术回归;中文触发词包括 无障碍、accessibility、a11y、WCAG、屏幕阅读器。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when reviewing or improving frontend accessibility, semantic structure, keyboard support, focus management, ARIA labels, screen reader behavior, WCAG 2.2 issues, touch accessibility, or assistive-technology regressions; Chinese triggers include accessibility, accessibility, a11y, WCAG, screen reader.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

用于从参考系统中吸收想法、能力、工作流、架构、质量体系、生态扩展或工程实践,并通过原创的项目内重设计转化为当前项目能力,而不是复制原实现。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when absorbing ideas, capabilities, workflows, architecture, quality systems, ecosystem extensions, or engineering practices from any reference system into the current project through original, project-native redesign rather than copying.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API integration, front-end and back-end joint debugging, typed API client, Interface error handling, SSE, WebSocket.

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

用于设计、实现或审查前后端 API 集成、类型化 API client、REST/tRPC/OpenAPI 客户端选型、认证刷新、API 错误映射、上传流程、SSE/WebSocket/轮询选择、CORS 相关前端行为或跨边界 loading/error 状态。不要用于纯后端服务架构或仅 TanStack Query 缓存策略;中文触发词包括 API 集成、前后端联调、typed API client、接口错误处理、SSE、WebSocket。

日本語の概要は準備中です。原文の説明を表示しています。

bovinphang/frontend-craft222026年9月26日 更新

bovinphang のスキルをすべて見る

このスキルの問題を報告する