tdd-playwright

Automates the TDD loop for Playwright test development.

Updated Oct 17, 2025
One-click install
npx skills add https://github.com/gharam1234/trip --skill tdd-playwright
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-playwright
Source: https://github.com/gharam1234/trip/tree/main/.claude/skills/tdd-playwright
Command: npx skills add https://github.com/gharam1234/trip --skill tdd-playwright

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables a Playwright-based TDD workflow: write tests, run them, implement code to pass, and iterate until all tests pass.

Core Features & Use Cases

  • Draft Playwright tests from requirements
  • Execute tests with npx playwright test
  • Implement minimal code to satisfy tests and iterate
  • Promote a TDD mindset and disciplined development

Quick Start

Start a Playwright-based TDD loop in your project, writing tests first and then implementing code to satisfy them, until all tests pass.

Frequently Asked Questions about tdd-playwright

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a TDD workflow with Playwright tests?

TDD with Playwright involves writing tests first, then implementing minimal code to pass them. Start by drafting test cases with data-testid selectors, run `npx playwright test`, and iterate your implementation until all tests pass, following a disciplined cycle of red-green-refactor.

What's the best way to write Playwright tests for end-to-end testing?

Write Playwright e2e tests using data-testid selectors for reliable element targeting, fixed-loader waits instead of networkidle, and real data rather than mocks. This approach minimizes flakiness and ensures tests reflect actual user behavior in production scenarios.

Can I automate my Playwright test development workflow?

Yes, automated TDD workflows generate minimal code to satisfy failing tests, execute them via `npx playwright test`, and iterate until all pass. This closed-loop approach reduces manual overhead and enforces consistent test-driven discipline throughout development.

How do I debug failing Playwright tests in a TDD cycle?

Debug Playwright tests by running `npx playwright test`, analyzing failures, and refining selectors and wait strategies. Use data-testid-based queries and fixed waits to isolate issues; then implement or refactor code to resolve test failures systematically.

Why should I avoid networkidle waits in Playwright tests?

Networkidle waits are unreliable for e2e testing because they depend on unpredictable network conditions. Fixed-loader waits and explicit element targeting with data-testid selectors provide deterministic test behavior and faster, more stable test execution.