agentleFS
roborracleroborracle/agent-workflow-kit/skills/webapp-testing/SKILL.md

webapp-testing

Skill0 starsChanged 3 months agoMITView on GitHub

Write comprehensive tests, run test suites, analyze failures, and fix tests while maintaining test integrity. Covers unit testing, integration testing, E2E testing with Playwright, and test-driven development. Use after code changes to ensure coverage or when creating new test suites.

196 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use academy-guide, skill-share and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    academy-guide

    Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

    Also in 8 projects that use this

  • ArogyaReddySkill

    skill-share

    A skill that creates new Claude skills and automatically shares them on Slack using Rube for seamless team collaboration and skill discovery.

    Also in 23 projects that use this

  • SKB3002Skill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 5 projects that use this

  • ArogyaReddySkill

    raffle-winner-picker

    Picks random winners from lists, spreadsheets, or Google Sheets for giveaways, raffles, and contests. Ensures fair, unbiased selection with transparency.

    Also in 26 projects that use this

  • zephyrwang6Skill

    topic-collector

    AI热点采集工具。从Twitter/X、Product Hunt、Reddit、Hacker News、博客等采集AI相关热点内容。当用户说"开始今日选题"、"采集热点"、"看看今天有什么新闻"、"今日AI热点"时触发。聚焦领域:Vibe Coding、Claude Skill、AI知识管理、AI模型更新、AI新产品、海外热点。

    Also in 4 projects that use this

  • zephyrwang6Skill

    deepl

    Übersetzt Texte, Dokumente und XLIFF-Dateien via DeepL API. Verwende für Übersetzungen mit /deepl translate, /deepl file oder /deepl xliff.

    Also in 4 projects that use this

  • +4 more from zephyrwang6
  • +1 more from ArogyaReddy

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 190 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Test behavior, not implementation

    line 19
  2. Distinctive:

    Create test data factories

    line 22
  3. Very specific:

    Run tests: npm test or pytest

    line 49
  4. Distinctive:

    Don't: use flaky selectors that change

    line 55
  5. Very specific:

    Do use descriptive selectors: text=, role=, IDs

    line 56
  6. Distinctive:

    All tests passing before merge

    line 59
  7. Distinctive:

    No skipped tests without justification

    line 61

“Common” is measured: kept by at least 6 in 10 of the 190 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Web Application Testing

Comprehensive test automation covering unit, integration, and E2E testing.

Test Types

TypeScopeSpeedUse For
UnitSingle function<100msLogic, utilities
IntegrationComponent interaction<1sAPIs, services
E2EFull user journey<30sCritical paths

Best Practices

  • Test behavior, not implementation
  • One assertion per test for clarity
  • AAA pattern: Arrange, Act, Assert
  • Create test data factories
  • Mock external dependencies appropriately

Playwright E2E Testing

Decision Tree

Static HTML? → Read HTML for selectors → Write script
Dynamic? → Server running? → No → Start it in the background (e.g. `npm run dev &`) and wait for its port
                           → Yes → Navigate → wait for the content under test → Screenshot → Identify selectors → Execute

Template

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch(headless=True)
    page = browser.new_page()
    page.goto('http://localhost:5173')
    page.get_by_role('main').wait_for()  # wait on the content under test, not 'networkidle'
    # ... test logic
    browser.close()

TDD Workflow

  1. Identify affected test files after code changes
  2. Run tests: npm test or pytest
  3. On failure: Parse errors, distinguish legitimate failure vs outdated expectations vs environment
  4. Fix: Preserve original intent, update expectations only for legitimate changes, never weaken tests to pass

Common Pitfalls

  • Don't inspect the DOM of a dynamic app before the content you need has rendered. Wait on that element (expect(locator).to_be_visible()), not on networkidle, which Playwright's docs discourage for tests
  • Don't use flaky selectors that change
  • Do use descriptive selectors: text=, role=, IDs

Quality Gates

  • All tests passing before merge
  • Coverage maintained or improved
  • No skipped tests without justification
  • E2E tests cover critical user journeys
  • Tests run in <10 minutes total

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.