New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Generates unit tests, integration tests

Senior QA Engineer

by alirezarezvani · MIT license · ★ 26,349 on GitHub · updated Aug 30

Senior QA Engineer cover

Generates unit tests, integration tests, and E2E tests for React/Next.js applications. Scans components to create Jest + React Testing Library test stubs, analyzes Istanbul/LCOV coverage reports to surface gaps, scaffolds Playwright…

---
name: "senior-qa"
description: Generates unit tests, integration tests, and E2E tests for React/Next.js applications. Scans components to create Jest + React Testing Library test stubs, analyzes Istanbul/LCOV coverage reports to surface gaps, scaffolds Playwright test files from Next.js routes, mocks API calls with MSW, creates test fixtures, and configures test runners. Use when the user asks to "generate tests", "write unit tests", "analyze test coverage", "scaffold E2E tests", "set up Playwright", "configure Jest", "implement testing patterns", or "improve test quality".
---

# Senior QA Engineer

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

---

## Quick Start

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

# Analyze test coverage from Jest/Istanbul reports

Overview

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

Manual install (npx, ZIP)
Claude Codenpx skills add alirezarezvani/claude-skills --skill senior-qa -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \ | tar -xz -C ~/.claude/skills --strip-components=3 claude-skills-19392f7a0826/engineering-team/skills/senior-qa
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/9b12fd96e099f7014f22/senior-qa.zip" -OutFile "$env:TEMP\senior-qa.zip"; Expand-Archive "$env:TEMP\senior-qa.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md8.4 KB
  • README.md5.6 KB
  • references/3 files · 64.4 KB
  • scripts/3 files · 74.5 KB
Read the files here
alirezarezvani/19392f78 files
SKILL.md
Show the full text332 lines

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"]', '[email protected]');
    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

File Contains Use When
references/testing_strategies.md Test pyramid, testing types, coverage targets, CI/CD integration Designing test strategy
references/test_automation_patterns.md Page Object Model, mocking (MSW), fixtures, async patterns Writing test code
references/qa_best_practices.md Testable code, flaky tests, debugging, quality metrics Improving 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
1---
2name: "senior-qa"
3description: Generates unit tests, integration tests, and E2E tests for React/Next.js applications. Scans components to create Jest + React Testing Library test stubs, analyzes Istanbul/LCOV coverage reports to surface gaps, scaffolds Playwright test files from Next.js routes, mocks API calls with MSW, creates test fixtures, and configures test runners. Use when the user asks to "generate tests", "write unit tests", "analyze test coverage", "scaffold E2E tests", "set up Playwright", "configure Jest", "implement testing patterns", or "improve test quality".
4---
5 
6# Senior QA Engineer
7 
8Test automation, coverage analysis, and quality assurance patterns for React and Next.js applications.
9 
10---
11 
12## Quick Start
13 
14```bash
15# Generate Jest test stubs for React components
16python scripts/test_suite_generator.py src/components/ --output __tests__/
17 
18# Analyze test coverage from Jest/Istanbul reports
19python scripts/coverage_analyzer.py coverage/coverage-final.json --threshold 80
20 
21# Scaffold Playwright E2E tests for Next.js routes
22python scripts/e2e_test_scaffolder.py src/app/ --output e2e/
23```
24 
25---
26 
27## Tools Overview
28 
29### 1. Test Suite Generator
30 
31Scans React/TypeScript components and generates Jest + React Testing Library test stubs with proper structure.
32 
33**Input:** Source directory containing React components
34**Output:** Test files with describe blocks, render tests, interaction tests
35 
36**Usage:**
37```bash
38# Basic usage - scan components and generate tests
39python scripts/test_suite_generator.py src/components/ --output __tests__/
40 
41# Include accessibility tests
42python scripts/test_suite_generator.py src/ --output __tests__/ --include-a11y
43 
44# Generate with custom template
45python scripts/test_suite_generator.py src/ --template custom-template.tsx
46```
47 
48**Supported Patterns:**
49- Functional components with hooks
50- Components with Context providers
51- Components with data fetching
52- Form components with validation
53 
54---
55 
56### 2. Coverage Analyzer
57 
58Parses Jest/Istanbul coverage reports and identifies gaps, uncovered branches, and provides actionable recommendations.
59 
60**Input:** Coverage report (JSON or LCOV format)
61**Output:** Coverage analysis with recommendations
62 
63**Usage:**
64```bash
65# Analyze coverage report
66python scripts/coverage_analyzer.py coverage/coverage-final.json
67 
68# Enforce threshold (exit 1 if below)
69python scripts/coverage_analyzer.py coverage/ --threshold 80 --strict
70 
71# Generate HTML report
72python scripts/coverage_analyzer.py coverage/ --format html --output report.html
73```
74 
75---
76 
77### 3. E2E Test Scaffolder
78 
79Scans Next.js pages/app directory and generates Playwright test files with common interactions.
80 
81**Input:** Next.js pages or app directory
82**Output:** Playwright test files organized by route
83 
84**Usage:**
85```bash
86# Scaffold E2E tests for Next.js App Router
87python scripts/e2e_test_scaffolder.py src/app/ --output e2e/
88 
89# Include Page Object Model classes
90python scripts/e2e_test_scaffolder.py src/app/ --output e2e/ --include-pom
91 
92# Generate for specific routes
93python scripts/e2e_test_scaffolder.py src/app/ --routes "/login,/dashboard,/checkout"
94```
95 
96---
97 
98## QA Workflows
99 
100### Unit Test Generation Workflow
101 
102Use when setting up tests for new or existing React components.
103 
104**Step 1: Scan project for untested components**
105```bash
106python scripts/test_suite_generator.py src/components/ --scan-only
107```
108 
109**Step 2: Generate test stubs**
110```bash
111python scripts/test_suite_generator.py src/components/ --output __tests__/
112```
113 
114**Step 3: Review and customize generated tests**
115```typescript
116// __tests__/Button.test.tsx (generated)
117import { render, screen, fireEvent } from '@testing-library/react';
118import { Button } from '../src/components/Button';
119 
120describe('Button', () => {
121 it('renders with label', () => {
122 render(<Button>Click me</Button>);
123 expect(screen.getByRole('button', { name: /click me/i })).toBeInTheDocument();
124 });
125 
126 it('calls onClick when clicked', () => {
127 const handleClick = jest.fn();
128 render(<Button onClick={handleClick}>Click</Button>);
129 fireEvent.click(screen.getByRole('button'));
130 expect(handleClick).toHaveBeenCalledTimes(1);
131 });
132 
133 // TODO: Add your specific test cases
134});
135```
136 
137**Step 4: Run tests and check coverage**
138```bash
139npm test -- --coverage
140python scripts/coverage_analyzer.py coverage/coverage-final.json
141```
142 
143---
144 
145### Coverage Analysis Workflow
146 
147Use when improving test coverage or preparing for release.
148 
149**Step 1: Generate coverage report**
150```bash
151npm test -- --coverage --coverageReporters=json
152```
153 
154**Step 2: Analyze coverage gaps**
155```bash
156python scripts/coverage_analyzer.py coverage/coverage-final.json --threshold 80
157```
158 
159**Step 3: Identify critical paths**
160```bash
161python scripts/coverage_analyzer.py coverage/ --critical-paths
162```
163 
164**Step 4: Generate missing test stubs**
165```bash
166python scripts/test_suite_generator.py src/ --uncovered-only --output __tests__/
167```
168 
169**Step 5: Verify improvement**
170```bash
171npm test -- --coverage
172python scripts/coverage_analyzer.py coverage/ --compare previous-coverage.json
173```
174 
175---
176 
177### E2E Test Setup Workflow
178 
179Use when setting up Playwright for a Next.js project.
180 
181**Step 1: Initialize Playwright (if not installed)**
182```bash
183npm init playwright@latest
184```
185 
186**Step 2: Scaffold E2E tests from routes**
187```bash
188python scripts/e2e_test_scaffolder.py src/app/ --output e2e/
189```
190 
191**Step 3: Configure authentication fixtures**
192```typescript
193// e2e/fixtures/auth.ts (generated)
194import { test as base } from '@playwright/test';
195 
196export const test = base.extend({
197 authenticatedPage: async ({ page }, use) => {
198 await page.goto('/login');
199 await page.fill('[name="email"]', '[email protected]');
200 await page.fill('[name="password"]', 'password');
201 await page.click('button[type="submit"]');
202 await page.waitForURL('/dashboard');
203 await use(page);
204 },
205});
206```
207 
208**Step 4: Run E2E tests**
209```bash
210npx playwright test
211npx playwright show-report
212```
213 
214**Step 5: Add to CI pipeline**
215```yaml
216# .github/workflows/e2e.yml
217- name: "run-e2e-tests"
218 run: npx playwright test
219- name: "upload-report"
220 uses: actions/upload-artifact@v3
221 with:
222 name: "playwright-report"
223 path: playwright-report/
224```
225 
226---
227 
228## Reference Documentation
229 
230| File | Contains | Use When |
231|------|----------|----------|
232| `references/testing_strategies.md` | Test pyramid, testing types, coverage targets, CI/CD integration | Designing test strategy |
233| `references/test_automation_patterns.md` | Page Object Model, mocking (MSW), fixtures, async patterns | Writing test code |
234| `references/qa_best_practices.md` | Testable code, flaky tests, debugging, quality metrics | Improving test quality |
235 
236---
237 
238## Common Patterns Quick Reference
239 
240### React Testing Library Queries
241 
242```typescript
243// Preferred (accessible)
244screen.getByRole('button', { name: /submit/i })
245screen.getByLabelText(/email/i)
246screen.getByPlaceholderText(/search/i)
247 
248// Fallback
249screen.getByTestId('custom-element')
250```
251 
252### Async Testing
253 
254```typescript
255// Wait for element
256await screen.findByText(/loaded/i);
257 
258// Wait for removal
259await waitForElementToBeRemoved(() => screen.queryByText(/loading/i));
260 
261// Wait for condition
262await waitFor(() => {
263 expect(mockFn).toHaveBeenCalled();
264});
265```
266 
267### Mocking with MSW
268 
269```typescript
270import { rest } from 'msw';
271import { setupServer } from 'msw/node';
272 
273const server = setupServer(
274 rest.get('/api/users', (req, res, ctx) => {
275 return res(ctx.json([{ id: 1, name: "john" }]));
276 })
277);
278 
279beforeAll(() => server.listen());
280afterEach(() => server.resetHandlers());
281afterAll(() => server.close());
282```
283 
284### Playwright Locators
285 
286```typescript
287// Preferred
288page.getByRole('button', { name: "submit" })
289page.getByLabel('Email')
290page.getByText('Welcome')
291 
292// Chaining
293page.getByRole('listitem').filter({ hasText: 'Product' })
294```
295 
296### Coverage Thresholds (jest.config.js)
297 
298```javascript
299module.exports = {
300 coverageThreshold: {
301 global: {
302 branches: 80,
303 functions: 80,
304 lines: 80,
305 statements: 80,
306 },
307 },
308};
309```
310 
311---
312 
313## Common Commands
314 
315```bash
316# Jest
317npm test # Run all tests
318npm test -- --watch # Watch mode
319npm test -- --coverage # With coverage
320npm test -- Button.test.tsx # Single file
321 
322# Playwright
323npx playwright test # Run all E2E tests
324npx playwright test --ui # UI mode
325npx playwright test --debug # Debug mode
326npx playwright codegen # Generate tests
327 
328# Coverage
329npm test -- --coverage --coverageReporters=lcov,json
330python scripts/coverage_analyzer.py coverage/coverage-final.json
331```
332 
View all files on GitHub →

Details

Updated
Aug 30, 2026
License
MIT
Stars on the repo
★ 26,349
Checked
Source
alirezarezvani/claude-skills ↗
Creator
alirezarezvani · 363 listings
View creator

Similar skills

See all →
Skill29 production-ready scripts for iOS app testing, buildingIos simulator skillconorluddy/ios-simulator-skill · by conorluddy29 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.★ 1.3k GitHub starsSkillMoAI unified orchestrator for autonomous developmentmodu-ai/moai-adk · by modu-aiMoAI unified orchestrator for autonomous development. Routes natural language or subcommands (plan, run, sync, project, fix, loop, mx, feedback, review, clean, codemaps, gate, e2e, harness, goal, gtd, todo) to specialized agents.★ 1.2k GitHub starsSkillWrite Android unit, Compose UI, and Hilt-integrated testsAndroid Testing StandardsHoangNguyen0403/agent-skills-standard · by HoangNguyen0403Write Android unit, Compose UI, and Hilt-integrated tests. Use when designing test behavior with MockK or coroutine test utilities; defer database/WorkManager-specific recipes to the owning feature skill.★ 569 GitHub starsSkillImplementing any feature or bugfixTest-Driven Development (TDD)obra/superpowers · by obraUse when implementing any feature or bugfix, before writing implementation code★ 290k GitHub starsSkillToolkit for interacting with and testing local webWebapp testinganthropics/skills · by anthropicsToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.★ 178k GitHub starsPromptGuide to fixing bugs using a test-first approachTest first bug fixing approachf/prompts.chat · by Ilker UlusoyGuide to fixing bugs using a test-first approach, ensuring code reliability through systematic testing and implementation.New listing

More from alirezarezvani

SkillResume a paused experiment/ar:ar-resume — Resume Experimentalirezarezvani/claude-skills · by alirezarezvaniResume a paused experiment. Checkout the experiment branch, read results history, continue iterating. Use when the user runs /ar:ar-resume or asks to pick up a previously started autoresearch experiment.★ 26.3k GitHub starsSkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboardalirezarezvani/claude-skills · by alirezarezvaniShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.★ 26.3k GitHub starsSkillStart an autonomous experiment loop with user-selected/ar:loop — Autonomous Experiment Loopalirezarezvani/claude-skills · by alirezarezvaniStart an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling. Use when the user runs /ar:loop or asks to run an autoresearch experiment continuously on a schedule.★ 26.3k GitHub starsSkillRun a single experiment iteration/ar:run — Single Experiment Iterationalirezarezvani/claude-skills · by alirezarezvaniRun a single experiment iteration. Edit the target file, evaluate, keep or discard. Use when the user runs /ar:run or asks for one manual autoresearch iteration.★ 26.3k GitHub starsSkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experimentalirezarezvani/claude-skills · by alirezarezvaniSet up a new autoresearch experiment interactively. Collects domain, target file, eval command, metric, direction, and evaluator. Use when the user runs /ar:setup or asks to start optimizing a file with the autoresearch loop.★ 26.3k GitHub starsSkill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberationalirezarezvani/claude-skills · by alirezarezvani/cs:boardroom <brief> — 6-phase multi-role deliberation across the C-suite with Phase 2 isolation, critic pre-screen, and synthesis. Outputs a board memo. Use when a decision spans multiple executive domains — e.g. a pricing change touching finance, positioning, and product, or a raise-vs-cut runway call.★ 26.3k GitHub stars