webapp-testing

Implements full-stack web application testing strategies using Vitest, React Testing Library, MSW, and Playwright.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/JenilRevaliya/ARGUS --skill webapp-testing-jenilrevaliya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: webapp-testing
Source: https://github.com/JenilRevaliya/ARGUS/tree/main/.agent/skills/webapp-testing
Command: npx skills add https://github.com/JenilRevaliya/ARGUS --skill webapp-testing-jenilrevaliya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, and includes scripts (resource) components.

What problem does it solve? Setting up a coherent testing strategy across a modern web stack is confusing: teams over-mock integration tests, rely on brittle selectors, and write E2E tests that break on shared seed data. This Skill provides a structured testing methodology (the Testing Trophy) plus runnable browser automation to validate pages in practice. ## Core Features & Use Cases - Testing Strategy Framework: Defines the Testing Trophy distribution — static analysis, Vitest unit tests, React Testing Library integration tests with MSW network interception, and Playwright E2E for critical paths. - Anti-Pattern Guardrails: Lists common hallucination traps such as mocking everything in integration tests, overusing getByTestId, and depending on shared seed data in E2E tests. - Browser Test Runner: A Playwright script that loads any URL, reports page health, performance timings, element counts, accessibility checks, and optional screenshots as JSON. - Use Case: When scaffolding tests for a React dashboard, apply the strategy to write MSW-backed integration tests for components, Vitest tests for pure logic like tax calculation, then run the Playwright script against the deployed URL to verify load health and accessibility. ## Quick Start Ask the AI to set up a testing strategy for your React app using Vitest, React Testing Library, and MSW, then run the Playwright runner script against your local dev server URL to check page health.

Frequently Asked Questions about webapp-testing

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

FAQPage Schema
How do I test React components that make API calls?▼

Use React Testing Library with Mock Service Worker (MSW) to intercept requests at the network layer instead of mocking modules like axios. Render the component, await the mocked response with findByText, and interact via userEvent for realistic behavior.

What is the difference between the Testing Pyramid and Testing Trophy?▼

The Testing Trophy shifts emphasis toward integration tests (about 60%) using React Testing Library and MSW, with fewer unit tests (20%) and minimal E2E tests (10%). It suits rich UI applications better than the traditional unit-heavy pyramid.

Should I use getByTestId or getByRole in Testing Library?▼

Prefer getByRole, getByLabelText, and getByText because they query the DOM the way users perceive it. Reserve getByTestId as a last resort when no accessible role or label exists for the element.

How do I run a Playwright browser test from Python?▼

Install playwright and its Chromium browser, then run the runner script with a target URL. It returns JSON with page title, status code, health checks, performance timings, element counts, and an optional full-page screenshot saved to the temp directory.

Why do E2E tests fail when they share seed data?▼

Tests depending on shared seed data break when run in parallel or after data mutations. Each E2E test should create its own data during setup and clean up in teardown to remain isolated and repeatable.