senior-qa

Generates Jest test stubs, analyzes Istanbul coverage, and scaffolds Playwright E2E tests for React and Next.js.

1|2|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/zhizhunbao/textbook-rag --skill senior-qa-zhizhunbao
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: senior-qa
Source: https://github.com/zhizhunbao/textbook-rag/tree/main/.agent/skills/dev-senior_qa
Command: npx skills add https://github.com/zhizhunbao/textbook-rag --skill senior-qa-zhizhunbao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Writing and maintaining tests for React/Next.js applications is time-consuming, and teams struggle to identify coverage gaps in critical paths like authentication and payments. This Skill automates test stub generation, coverage gap analysis, and E2E test scaffolding so quality assurance work starts from a structured foundation instead of a blank file. ## Core Features & Use Cases - Test Suite Generation: Scans React/TypeScript components and generates Jest + React Testing Library test stubs with render, interaction, and optional accessibility assertions. - Coverage Analysis: Parses Istanbul JSON or LCOV reports, calculates line/branch/function coverage, flags critical untested paths (auth, payment, API routes), and enforces thresholds with a strict mode. - E2E Scaffolding: Detects Next.js App Router or Pages Router routes and generates Playwright test files, Page Object Model classes, playwright.config.ts, and auth fixtures. - Use Case: After building a new checkout flow, run the test suite generator on your components, analyze the coverage report to find untested payment logic, and scaffold Playwright tests for the new routes—all in one workflow. ## Quick Start Ask the assistant to generate Jest test stubs for the components in src/components and then analyze the coverage report to find gaps below 80 percent.

Frequently Asked Questions about senior-qa

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

FAQPage Schema
How do I generate Jest tests for React components automatically?▼

Run the test suite generator script against your components directory to produce Jest and React Testing Library stubs. It detects functional, class, memo, and forwardRef components and creates render, interaction, and optional accessibility tests.

How do I analyze Jest coverage reports and find gaps?▼

Run the coverage analyzer on your coverage-final.json or lcov.info file with a threshold flag. It reports line, branch, function, and statement coverage, highlights critical untested paths like auth and payment code, and can exit with an error in strict mode.

How do I set up Playwright E2E tests for a Next.js app?▼

Run the E2E scaffolder against your app or pages directory to generate a Playwright spec per route, plus playwright.config.ts and auth fixtures. The --include-pom flag also generates Page Object Model classes for each route.

Does the coverage analyzer support LCOV format?▼

Yes, the analyzer parses both Istanbul JSON and LCOV formats. Point it at a coverage file or a directory and it will locate coverage-final.json, coverage-summary.json, or lcov.info automatically.

What testing libraries does this workflow use for React?▼

The workflow centers on Jest with React Testing Library for unit and integration tests, Playwright for E2E tests, MSW for API mocking, and jest-axe or @axe-core/playwright for accessibility assertions.

Why do generated Playwright tests contain TODO comments?▼

The scaffolder cannot know your application's specific selectors, credentials, or expected content, so it generates structural test skeletons with TODO markers. You fill in locators, form values, and assertions based on actual page behavior.