All skills
jeffallan avatar

/test-master

@efebc44
by jeffallanjeffallan/claude-skills12k stars
1,124

Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation frameworks; analyzing coverage gaps; performance testing with k6 or Artillery; security testing with OWASP methods; debugging flaky tests; or working on QA, regression, test automation, quality gates, shift-left testing, or test maintenance.

Use this Skill: https://skilld.dev/gh/jeffallan/claude-skills/test-master

This session only. Nothing lands on disk.

referencesintegration-testing.md

≈686 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Integration Testing

API Testing (Supertest)

import request from 'supertest';
import { app } from '../app';

describe('POST /api/users', () => {
  it('creates user with valid data', async () => {
    const response = await request(app)
      .post('/api/users')
      .send({ email: 'test@test.com', name: 'Test' })
      .expect(201);

    expect(response.body).toMatchObject({
      email: 'test@test.com',
      name: 'Test',
    });
    expect(response.body.id).toBeDefined();
  });

  it('returns 400 for invalid email', async () => {
    const response = await request(app)
      .post('/api/users')
      .send({ email: 'invalid', name: 'Test' })
      .expect(400);

    expect(response.body.error).toContain('email');
  });

  it('returns 401 without auth token', async () => {
    await request(app)
      .get('/api/users/me')
      .expect(401);
  });
});

Authenticated Requests

describe('Protected endpoints', () => {
  let authToken: string;

  beforeAll(async () => {
    const response = await request(app)
      .post('/api/auth/login')
      .send({ email: 'test@test.com', password: 'password' });
    authToken = response.body.token;
  });

  it('accesses protected route', async () => {
    await request(app)
      .get('/api/users/me')
      .set('Authorization', `Bearer ${authToken}`)
      .expect(200);
  });
});

Database Testing

import { db } from '../database';

describe('UserRepository', () => {
  beforeEach(async () => {
    await db.query('DELETE FROM users');
  });

  afterAll(async () => {
    await db.end();
  });

  it('creates and retrieves user', async () => {
    const user = await userRepo.create({
      email: 'test@test.com',
      name: 'Test',
    });

    const found = await userRepo.findById(user.id);
    expect(found).toEqual(user);
  });
});

pytest API Testing

import pytest
from httpx import AsyncClient

@pytest.mark.asyncio
async def test_create_user(client: AsyncClient):
    response = await client.post("/api/users/", json={
        "email": "test@example.com",
        "name": "Test"
    })
    assert response.status_code == 201
    assert response.json()["email"] == "test@example.com"

@pytest.mark.asyncio
async def test_invalid_email(client: AsyncClient):
    response = await client.post("/api/users/", json={
        "email": "invalid",
        "name": "Test"
    })
    assert response.status_code == 422

Quick Reference

Method Purpose
.send(body) Send request body
.set(header, value) Set header
.expect(status) Assert status code
.expect('Content-Type', /json/) Assert header
response.body Parsed JSON body

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk CRITICAL
  • Gen Agent Trust Hub16d

    The skill provides a comprehensive framework and reference guide for software testing, including unit, integration, and security testing. It involves processing user-provided code and API responses, which creates a surface for indirect prompt injection. Automated scanners flagged the documentation link and skill file, likely due to the inclusion of security testing payloads (e.g., SQL injection and XSS strings) used as diagnostic examples in the reference materials.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    1/11 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at efebc44. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 5 months ago
Other metadata
metadata
{
  "author": "https://github.com/Jeffallan",
  "version": "1.1.1",
  "domain": "quality",
  "triggers": "test, testing, QA, unit test, integration test, E2E, coverage, performance test, security test, regression, test strategy, test automation, test framework, quality metrics, defect, exploratory, usability, accessibility, localization, manual testing, shift-left, quality gate, flaky test, test maintenance",
  "role": "specialist",
  "scope": "testing",
  "output-format": "report",
  "related-skills": "fullstack-guardian, playwright-expert, devops-engineer, debugging-wizard, code-reviewer, feature-forge"
}
  • Testing
  • jest
  • vitest
  • pytest
  • test-automation
  • coverage
  • performance-testing
  • security-testing
  • e2e
  • quality-assurance

README badge

README badge for jeffallan/claude-skills/test-master

Generates test files, test strategies, and coverage analysis across unit, integration, E2E, performance, and security testing. Includes patterns for Jest, pytest, k6, and OWASP security testing, plus guidance on flaky test isolation, mock strategies, and test architecture design.

Generated from the current SKILL.md.

Does this skill cover performance and security testing, or just unit tests?
It covers functional, performance, and security testing. The skill includes reference guides for k6 and Artillery performance testing, OWASP security methods, and unit/integration/E2E test patterns.
What testing frameworks does this skill support?
It provides patterns for Jest, Vitest, pytest, and general E2E frameworks. The core workflow and assertions patterns are framework-agnostic; specific guidance is loaded from reference guides based on your tool choice.
Does this skill help debug flaky tests?
Yes. The core workflow includes a step to isolate flaky test failures by checking ordering dependencies, async handling, and adding stabilization logic or retries.
Can this skill generate test reports and defect documentation?
Yes. The skill outputs test plans with scope, test cases, coverage analysis, findings with severity ratings, and actionable fix recommendations.
Does this skill enforce mocking and isolation practices?
Yes. It requires mocking external dependencies, prohibits production data in tests, and forbids order-dependent tests. The skill enforces that each test runs independently.

Generated from the current SKILL.md. These answers refresh after source changes.