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

Test Automator

  • 758 installs
  • 65 repo stars
  • Updated June 21, 2026
  • charon-fan/agent-playbook

test-automator is a Claude Code skill that generates and extends automated unit and integration tests with framework-aware patterns and optional coverage scripts for developers who need to improve test coverage across Ty

About

test-automator is a test generation skill from charon-fan/agent-playbook that creates and maintains automated unit and integration tests with framework-specific patterns. The skill supports 7 test frameworks: Jest, Vitest, and Mocha for TypeScript/JavaScript, pytest and unittest for Python, Go's testing package, and JUnit for Java. Developers reach for test-automator when writing tests for new functions, improving coverage on existing modules, or scaffolding test boilerplate. The skill bundles 2 Python scripts—generate_test.py for boilerplate generation and coverage_report.py for coverage analysis—invoked from the command line alongside conversational test authoring.

  • Framework matrix for TypeScript/JS (Jest, Vitest, Mocha), Python (pytest), Go, and Java (JUnit)
  • Python scripts generate_test.py and coverage_report.py for boilerplate and coverage reporting
  • Best-practice rules: deterministic tests, explicit fixtures, no order dependencies, CI on every change
  • Mocking guidance favors external services over internal logic mocks
  • Small focused examples directory for copy-paste patterns

Test Automator by the numbers

  • 758 all-time installs (skills.sh)
  • Ranked #564 of 2,184 Testing & QA skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/charon-fan/agent-playbook --skill test-automator

Add your badge

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

Listed on Skillselion
Installs758
repo stars65
Security audit3 / 3 scanners passed
Last updatedJune 21, 2026
Repositorycharon-fan/agent-playbook

How do you generate unit tests for existing code?

Generate and extend automated unit and integration tests with framework-aware patterns and optional coverage scripts.

Who is it for?

Developers adding or extending automated tests in TypeScript, Python, Go, or Java projects who want framework-aware patterns and optional coverage reporting.

Skip if: End-to-end browser testing, load testing, or teams with zero existing test infrastructure and no target framework preference.

When should I use this skill?

User asks to write tests for a function, create test cases, improve test coverage, or generate test boilerplate.

What you get

Framework-specific test files, test boilerplate from generate_test.py, and coverage reports from coverage_report.py.

  • unit test files
  • integration test files
  • coverage reports

By the numbers

  • Supports 7 test frameworks across TypeScript, Python, Go, and Java
  • Bundles 2 Python scripts: generate_test.py and coverage_report.py

Files

SKILL.mdMarkdownGitHub ↗

Test Automator

Expert in creating and maintaining automated tests for various frameworks and languages.

When This Skill Activates

Activates when you:

  • Ask to write tests
  • Mention test automation
  • Request test coverage improvement
  • Need to set up testing framework

Testing Pyramid

        /\
       /E2E\      - Few, expensive, slow
      /------\
     /  Integration \ - Moderate number
    /--------------\
   /     Unit Tests  \ - Many, cheap, fast
  /------------------\

Unit Testing

Principles

1. Test behavior, not implementation 2. One assertion per test (generally) 3. Arrange-Act-Assert pattern 4. Descriptive test names

Example (Jest)

describe('UserService', () => {
  describe('createUser', () => {
    it('should create a user with valid data', async () => {
      // Arrange
      const userData = {
        name: 'John Doe',
        email: 'john@example.com'
      };

      // Act
      const user = await userService.create(userData);

      // Assert
      expect(user.id).toBeDefined();
      expect(user.email).toBe(userData.email);
    });

    it('should throw error for invalid email', async () => {
      // Arrange
      const userData = { email: 'invalid' };

      // Act & Assert
      await expect(userService.create(userData))
        .rejects.toThrow('Invalid email');
    });
  });
});

Integration Testing

Principles

1. Test component interactions 2. Use test doubles for external services 3. Clean up test data 4. Run in isolation

Example (Supertest)

describe('POST /api/users', () => {
  it('should create a user', async () => {
    const response = await request(app)
      .post('/api/users')
      .send({
        name: 'John Doe',
        email: 'john@example.com'
      })
      .expect(201)
      .expect((res) => {
        expect(res.body.id).toBeDefined();
        expect(res.body.email).toBe('john@example.com');
      });
  });
});

E2E Testing

Principles

1. Test critical user flows 2. Use realistic test data 3. Handle async operations properly 4. Clean up after tests

Example (Playwright)

test('user can login', async ({ page }) => {
  await page.goto('/login');
  await page.fill('[name="email"]', 'user@example.com');
  await page.fill('[name="password"]', 'password123');
  await page.click('button[type="submit"]');

  await expect(page).toHaveURL('/dashboard');
  await expect(page.locator('h1')).toContainText('Welcome');
});

Test Coverage

Coverage Goals

TypeTarget
Lines> 80%
Branches> 75%
Functions> 80%
Statements> 80%

Coverage Reports

# Jest
npm test -- --coverage

# Python (pytest-cov)
pytest --cov=src --cov-report=html

# Go
go test -coverprofile=coverage.out
go tool cover -html=coverage.out

Testing Best Practices

DO's

  • Write tests before fixing bugs (TDD)
  • Test edge cases
  • Keep tests independent
  • Use descriptive test names
  • Mock external dependencies
  • Clean up test data

DON'Ts

  • Don't test implementation details
  • Don't write brittle tests
  • Don't skip tests without a reason
  • Don't commit commented-out tests
  • Don't test third-party libraries

Test Naming Conventions

// Good: Describes what is being tested
it('should reject invalid email addresses')

// Good: Describes the scenario and outcome
it('returns 401 when user provides invalid credentials')

// Bad: Vague
it('works correctly')

Common Testing Frameworks

LanguageFrameworkCommand
TypeScript/JSJest, Vitestnpm test
Pythonpytestpytest
Gotestinggo test
JavaJUnitmvn test
Rustbuilt-incargo test

Scripts

Generate test boilerplate:

python scripts/generate_test.py <filename>

Check test coverage:

python scripts/coverage_report.py

References

  • references/best-practices.md - Testing best practices
  • references/examples/ - Framework-specific examples
  • references/mocking.md - Mocking guidelines

Related skills

How it compares

Choose test-automator over manual test writing when you need multi-framework boilerplate generation with bundled coverage reporting scripts.

FAQ

Which test frameworks does test-automator support?

test-automator supports 7 frameworks across 4 languages: Jest, Vitest, and Mocha for TypeScript/JavaScript, pytest and unittest for Python, Go's testing package, and JUnit for Java. Each framework receives pattern-aware test generation rather than generic assertions.

What scripts does test-automator include?

test-automator bundles 2 Python scripts: generate_test.py for creating test boilerplate from a filename argument, and coverage_report.py for analyzing test coverage across the project. Both scripts run from the command line alongside conversational test authoring.

Is Test Automator 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 & QAtestingbackend

This week in AI coding

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

unsubscribe anytime.