本文へスキップ
Skillpedia
テスト8.2k · #12544

webapp-testing

できること

このスキルは、ウェブアプリケーションを最初から最後までテストする手順をAIに示します。すべての経路と主要な利用者の流れを確認したい開発者向けです。

使う場面

  • ✓ウェブアプリのページやAPIに問題がないかを確認したいとき。
  • ✓サインインなどの重要な利用者の流れに、自動のブラウザテストが必要なとき。
  • ✓公開の前に、サイトのアクセシビリティを確認したいとき。

スキルのリンク

https://github.com/vudovn/ag-kit/blob/main/.agents/skills/webapp-testing/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/vudovn/ag-kit/blob/main/.agents/skills/webapp-testing/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のウェブアプリの主要なページとサインインの流れをテストし、スクリーンショットを撮って、アクセシビリティを確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

スキルは、アプリの経路とAPIエンドポイントを整理し、それらが応答するかを確認します。その後、重要な経路でブラウザテストを実行します。スクリーンショットを撮ったり、アクセシビリティの確認を行ったりすることもできます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Web App Testing

Discover and test everything. Leave no route untested.

🔧 Runtime Scripts

Execute these for automated browser testing:

Script Purpose Usage
scripts/playwright_runner.py Basic browser test python scripts/playwright_runner.py https://example.com
With screenshot python scripts/playwright_runner.py <url> --screenshot
Accessibility check python scripts/playwright_runner.py <url> --a11y

Requires: pip install playwright && playwright install chromium


1. Deep Audit Approach

Discovery First

Target How to Find
Routes Scan app/, pages/, router files
API endpoints Grep for HTTP methods
Components Find component directories
Features Read documentation

Systematic Testing

  1. Map - List all routes/APIs
  2. Scan - Verify they respond
  3. Test - Cover critical paths

2. Testing Pyramid for Web

        /\          E2E (Few)
       /  \         Critical user flows
      /----\
     /      \       Integration (Some)
    /--------\      API, data flow
   /          \
  /------------\    Component (Many)
                    Individual UI pieces

3. E2E Test Principles

What to Test

Priority Tests
1 Happy path user flows
2 Authentication flows
3 Critical business actions
4 Error handling

E2E Best Practices

Practice Why
Use data-testid Stable selectors
Wait for elements Avoid flaky tests
Clean state Independent tests
Avoid implementation details Test user behavior

4. Playwright Principles

Core Concepts

Concept Use
Page Object Model Encapsulate page logic
Fixtures Reusable test setup
Assertions Built-in auto-wait
Trace Viewer Debug failures

Configuration

Setting Recommendation
Retries 2 on CI
Trace on-first-retry
Screenshots on-failure
Video retain-on-failure

5. Visual Testing

When to Use

Scenario Value
Design system High
Marketing pages High
Component library Medium
Dynamic content Lower

Strategy

  • Baseline screenshots
  • Compare on changes
  • Review visual diffs
  • Update intentional changes

6. API Testing Principles

Coverage Areas

Area Tests
Status codes 200, 400, 404, 500
Response shape Matches schema
Error messages User-friendly
Edge cases Empty, large, special chars

7. Test Organization

File Structure

tests/
├── e2e/           # Full user flows
├── integration/   # API, data
├── component/     # UI units
└── fixtures/      # Shared data

Naming Convention

Pattern Example
Feature-based login.spec.ts
Descriptive user-can-checkout.spec.ts

8. CI Integration

Pipeline Steps

  1. Install dependencies
  2. Install browsers
  3. Run tests
  4. Upload artifacts (traces, screenshots)

Parallelization

Strategy Use
Per file Playwright default
Sharding Large suites
Workers Multiple browsers

9. Anti-Patterns

❌ Don't ✅ Do
Test implementation Test behavior
Hardcode waits Use auto-wait
Skip cleanup Isolate tests
Ignore flaky tests Fix root cause

Remember: E2E tests are expensive. Use them for critical paths only.

よくある質問

ブラウザテストを実行するには何をインストールする必要がありますか?

スキルによると、Playwright付きのPythonと、そのChromiumブラウザが必要です。

すべての経路をテストしますか?

重要な利用者の経路から始めて、すべての経路を見つけてテストすることを目指しています。

アクセシビリティを確認できますか?

はい。ランナーのスクリプトにはアクセシビリティの確認オプションがあります。

詳細

作者による元の説明

Web application testing principles. E2E, Playwright, deep audit strategies.

repo: vudovn/ag-kit

人気

GitHubのスター
8.2k
ランキング
#12544
ライセンス
MIT
更新日
2026/10/18

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル