Testing Qa

Command Palette

Search for a command to run...

Back

Testing Qa

v1Skill

Playwright testing and skill creation

langfuseskillextended
Edit
Capabilities

Searches the web for information

Content

Gene: Testing & QA

Description

Comprehensive testing and quality assurance capability. Combines Anthropic's webapp-testing skill with skill-creation capabilities for building robust agents.

Trigger Conditions

  • User requests testing of web applications
  • Needs test automation scripts
  • Debugging UI behavior issues
  • Capturing browser screenshots
  • Viewing browser logs
  • Creating new skills/agents

Testing Capabilities

Web Application Testing (Playwright)

Decision Tree:

User task → Is it static HTML?
    ├─ Yes → Read HTML file directly to identify selectors
    │         ├─ Success → Write Playwright script using selectors
    │         └─ Fails/Incomplete → Treat as dynamic (below)
    │
    └─ No (dynamic webapp) → Is the server already running?
        ├─ No → Run: python scripts/with_server.py --help
        │        Then use the helper + write simplified Playwright script
        │
        └─ Yes → Reconnaissance-then-action:
            1. Navigate and wait for networkidle
            2. Take screenshot or inspect DOM
            3. Identify selectors from rendered state
            4. Execute actions with discovered selectors

Helper Scripts

  • scripts/with_server.py - Manage server lifecycle (multiple servers)

Common Patterns

Element Discovery:

page.screenshot(path='/tmp/inspect.png', full_page=True)
content = page.content()
page.locator('button').all()

Execution:

  • Always wait for page.wait_for_load_state('networkidle') on dynamic apps
  • Use sync_playwright() for synchronous scripts
  • Close browser when done
  • Use descriptive selectors: text=, role=, CSS, IDs

Testing Best Practices

  • Use bundled scripts as black boxes
  • Don't inspect DOM before waiting for networkidle
  • Run with --help first to understand usage

Skill Creation (Enhanced)

Create new skills following the Agent Skills spec:

SKILL.md Format

---
name: my-skill
description: What this skill does and when to use it
---

# My Skill

Instructions for the agent to follow when this skill is activated.

## When to Use

Describe the scenarios where this skill should be used.

## Steps

1. First, do this
2. Then, do that

Required Fields

  • name: Unique identifier (lowercase, hyphens)
  • description: Brief explanation

Optional Fields

  • metadata.internal: Hide from normal discovery

Integration

  • Works with: code-execution, tool-orchestration
  • Essential for quality assurance and extensibility
Actions
Test in Playground