Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
alirezarezvani avatar

Senior Qa

  • 992 installs
  • 23.5k repo stars
  • Updated July 17, 2026
  • alirezarezvani/claude-skills

Senior QA is a Claude Code skill that generates Jest, React Testing Library, and Playwright tests plus coverage gap reports for developers who ship React and Next.js applications without adequate automated test coverage.

About

Senior QA is a production-oriented testing skill for React and Next.js codebases that combines Jest and React Testing Library unit patterns, Playwright end-to-end scaffolding, and Istanbul or NYC LCOV coverage analysis. Bundled Python scripts include test_suite_generator.py for component tests with optional jest-axe accessibility checks via --include-a11y, and coverage_analyzer.py that reads coverage-final.json with an 80 percent threshold in strict mode. The recommended stack also covers MSW for API mocking and @axe-core/playwright for E2E accessibility. Reach for Senior QA when a feature branch lacks tests, when coverage drops below team gates, or when you need consistent Playwright folder structure for auth and feature flows before release. The skill assumes a TypeScript React or Next.js repo and standard npm test tooling rather than greenfield framework setup.

  • Generates render, interaction, and accessibility tests for functional, class, memo, and forwardRef components
  • Scans components and produces test stubs with proper prop mocking using Jest + React Testing Library
  • Analyzes Istanbul/NCV coverage reports and flags gaps against custom thresholds
  • Scaffolds full E2E Playwright tests with page objects for Next.js app directory
  • Includes optional jest-axe and @axe-core/playwright accessibility assertions

Senior Qa by the numbers

  • 992 all-time installs (skills.sh)
  • +9 installs in the week ending Jul 29, 2026 (Skillselion tracking)
  • Ranked #530 of 2,159 Testing & QA skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 31, 2026 (Skillselion catalog sync)
npx skills add https://github.com/alirezarezvani/claude-skills --skill senior-qa

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs992
repo stars23.5k
Security audit3 / 3 scanners passed
Last updatedJuly 17, 2026
Repositoryalirezarezvani/claude-skills

How do you generate Jest and Playwright tests for Next.js?

Automatically generate comprehensive Jest, React Testing Library, and Playwright tests plus identify coverage gaps for React and Next.js applications.

Who is it for?

React or Next.js developers who need production-grade unit, integration, and E2E tests with accessibility and coverage enforcement.

Skip if: Teams on Vue, Svelte, or backend-only services without a React UI should skip Senior QA and use framework-native testing skills instead.

When should I use this skill?

The user asks to add tests, raise coverage, scaffold Playwright E2E, or audit Jest gaps in a React or Next.js repo.

What you get

Jest and RTL component specs, Playwright E2E files, MSW mock stubs, and a coverage gap report against LCOV JSON.

  • Jest and RTL spec files
  • Playwright E2E specs
  • Coverage gap report

By the numbers

  • coverage_analyzer.py accepts --threshold 80 for strict LCOV gap analysis
  • Includes Python scripts test_suite_generator.py and coverage_analyzer.py

Files

SKILL.mdMarkdownGitHub ↗

Senior QA Engineer

Test automation, coverage analysis, and quality assurance patterns for React and Next.js applications.

---

Quick Start

# Generate Jest test stubs for React components
python scripts/test_suite_generator.py src/components/ --output __tests__/

# Analyze test coverage from Jest/Istanbul reports
python scripts/coverage_analyzer.py coverage/coverage-final.json --threshold 80

# Scaffold Playwright E2E tests for Next.js routes
python scripts/e2e_test_scaffolder.py src/app/ --output e2e/

---

Tools Overview

1. Test Suite Generator

Scans React/TypeScript components and generates Jest + React Testing Library test stubs with proper structure.

Input: Source directory containing React components Output: Test files with describe blocks, render tests, interaction tests

Usage:

# Basic usage - scan components and generate tests
python scripts/test_suite_generator.py src/components/ --output __tests__/

# Include accessibility tests
python scripts/test_suite_generator.py src/ --output __tests__/ --include-a11y

# Generate with custom template
python scripts/test_suite_generator.py src/ --template custom-template.tsx

Supported Patterns:

  • Functional components with hooks
  • Components with Context providers
  • Components with data fetching
  • Form components with validation

---

2. Coverage Analyzer

Parses Jest/Istanbul coverage reports and identifies gaps, uncovered branches, and provides actionable recommendations.

Input: Coverage report (JSON or LCOV format) Output: Coverage analysis with recommendations

Usage:

# Analyze coverage report
python scripts/coverage_analyzer.py coverage/coverage-final.json

# Enforce threshold (exit 1 if below)
python scripts/coverage_analyzer.py coverage/ --threshold 80 --strict

# Generate HTML report
python scripts/coverage_analyzer.py coverage/ --format html --output report.html

---

3. E2E Test Scaffolder

Scans Next.js pages/app directory and generates Playwright test files with common interactions.

Input: Next.js pages or app directory Output: Playwright test files organized by route

Usage:

# Scaffold E2E tests for Next.js App Router
python scripts/e2e_test_scaffolder.py src/app/ --output e2e/

# Include Page Object Model classes
python scripts/e2e_test_scaffolder.py src/app/ --output e2e/ --include-pom

# Generate for specific routes
python scripts/e2e_test_scaffolder.py src/app/ --routes "/login,/dashboard,/checkout"

---

QA Workflows

Unit Test Generation Workflow

Use when setting up tests for new or existing React components.

Step 1: Scan project for untested components

python scripts/test_suite_generator.py src/components/ --scan-only

Step 2: Generate test stubs

python scripts/test_suite_generator.py src/components/ --output __tests__/

Step 3: Review and customize generated tests

// __tests__/Button.test.tsx (generated)
import { render, screen, fireEvent } from '@testing-library/react';
import { Button } from '../src/components/Button';

describe('Button', () => {
  it('renders with label', () => {
    render(<Button>Click me</Button>);
    expect(screen.getByRole('button', { name: /click me/i })).toBeInTheDocument();
  });

  it('calls onClick when clicked', () => {
    const handleClick = jest.fn();
    render(<Button onClick={handleClick}>Click</Button>);
    fireEvent.click(screen.getByRole('button'));
    expect(handleClick).toHaveBeenCalledTimes(1);
  });

  // TODO: Add your specific test cases
});

Step 4: Run tests and check coverage

npm test -- --coverage
python scripts/coverage_analyzer.py coverage/coverage-final.json

---

Coverage Analysis Workflow

Use when improving test coverage or preparing for release.

Step 1: Generate coverage report

npm test -- --coverage --coverageReporters=json

Step 2: Analyze coverage gaps

python scripts/coverage_analyzer.py coverage/coverage-final.json --threshold 80

Step 3: Identify critical paths

python scripts/coverage_analyzer.py coverage/ --critical-paths

Step 4: Generate missing test stubs

python scripts/test_suite_generator.py src/ --uncovered-only --output __tests__/

Step 5: Verify improvement

npm test -- --coverage
python scripts/coverage_analyzer.py coverage/ --compare previous-coverage.json

---

E2E Test Setup Workflow

Use when setting up Playwright for a Next.js project.

Step 1: Initialize Playwright (if not installed)

npm init playwright@latest

Step 2: Scaffold E2E tests from routes

python scripts/e2e_test_scaffolder.py src/app/ --output e2e/

Step 3: Configure authentication fixtures

// e2e/fixtures/auth.ts (generated)
import { test as base } from '@playwright/test';

export const test = base.extend({
  authenticatedPage: async ({ page }, use) => {
    await page.goto('/login');
    await page.fill('[name="email"]', 'test@example.com');
    await page.fill('[name="password"]', 'password');
    await page.click('button[type="submit"]');
    await page.waitForURL('/dashboard');
    await use(page);
  },
});

Step 4: Run E2E tests

npx playwright test
npx playwright show-report

Step 5: Add to CI pipeline

# .github/workflows/e2e.yml
- name: "run-e2e-tests"
  run: npx playwright test
- name: "upload-report"
  uses: actions/upload-artifact@v3
  with:
    name: "playwright-report"
    path: playwright-report/

---

Reference Documentation

FileContainsUse When
references/testing_strategies.mdTest pyramid, testing types, coverage targets, CI/CD integrationDesigning test strategy
references/test_automation_patterns.mdPage Object Model, mocking (MSW), fixtures, async patternsWriting test code
references/qa_best_practices.mdTestable code, flaky tests, debugging, quality metricsImproving test quality

---

Common Patterns Quick Reference

React Testing Library Queries

// Preferred (accessible)
screen.getByRole('button', { name: /submit/i })
screen.getByLabelText(/email/i)
screen.getByPlaceholderText(/search/i)

// Fallback
screen.getByTestId('custom-element')

Async Testing

// Wait for element
await screen.findByText(/loaded/i);

// Wait for removal
await waitForElementToBeRemoved(() => screen.queryByText(/loading/i));

// Wait for condition
await waitFor(() => {
  expect(mockFn).toHaveBeenCalled();
});

Mocking with MSW

import { rest } from 'msw';
import { setupServer } from 'msw/node';

const server = setupServer(
  rest.get('/api/users', (req, res, ctx) => {
    return res(ctx.json([{ id: 1, name: "john" }]));
  })
);

beforeAll(() => server.listen());
afterEach(() => server.resetHandlers());
afterAll(() => server.close());

Playwright Locators

// Preferred
page.getByRole('button', { name: "submit" })
page.getByLabel('Email')
page.getByText('Welcome')

// Chaining
page.getByRole('listitem').filter({ hasText: 'Product' })

Coverage Thresholds (jest.config.js)

module.exports = {
  coverageThreshold: {
    global: {
      branches: 80,
      functions: 80,
      lines: 80,
      statements: 80,
    },
  },
};

---

Common Commands

# Jest
npm test                           # Run all tests
npm test -- --watch                # Watch mode
npm test -- --coverage             # With coverage
npm test -- Button.test.tsx        # Single file

# Playwright
npx playwright test                # Run all E2E tests
npx playwright test --ui           # UI mode
npx playwright test --debug        # Debug mode
npx playwright codegen             # Generate tests

# Coverage
npm test -- --coverage --coverageReporters=lcov,json
python scripts/coverage_analyzer.py coverage/coverage-final.json

Related skills

How it compares

Pick Senior QA over generic testing skills when you need React-specific Jest, RTL, Playwright, and LCOV coverage tooling in one workflow.

FAQ

What test frameworks does Senior QA cover?

Senior QA focuses on Jest and React Testing Library for unit and integration tests, Playwright for end-to-end flows, and Istanbul or NYC LCOV for coverage analysis in React and Next.js projects.

How does Senior QA check coverage thresholds?

Senior QA runs coverage_analyzer.py against coverage/coverage-final.json, supporting an 80 percent threshold with --strict to surface files and branches that fall below the configured gate.

Does Senior QA support API mocking in tests?

Senior QA documents MSW (Mock Service Worker) patterns so component and integration tests can stub HTTP without hitting live backends during Jest or Playwright runs.

Is Senior Qa safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Testing & QAtestingfrontend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.