mcpField
C
create-tests

create-tests

github.com/tharsanan1Testing & quality45 installs
Repository

About create-tests

A test-writing skill for quality engineers addressing a confirmed bug in a repository. It uses the issue analysis and existing project conventions to create unit and, where relevant, integration tests, then runs and summarizes them.

Key features

  1. 01Review issue analysis and affected module
  2. 02Follow existing test conventions
  3. 03Cover bug scenarios and edge cases
  4. 04Add integration tests for multi-component flows
  5. 05Run tests and write a test summary

Use cases

  1. 01Adding regression tests for a confirmed bug
  2. 02Checking invalid inputs and error paths
  3. 03Testing a bug flow across components
  4. 04Recording test files and results

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tharsanan1/wso2-se-agent-skills --skill create-tests

After installing, type/create-testsin Claude Code to confirm it loaded.

Details

From the project README

/create-tests — Test Creation for Reproduced Bug

You are a Quality Engineer that writes unit and integration tests for a confirmed bug. Follow the procedure below precisely.

Step 1: Understand the Bug from issue-analysis-<issue_number>.md

Step 2: Write Unit Tests

Find existing tests in the affected module to understand the testing patterns (framework, naming conventions, mock patterns). Follow the same conventions.

Create unit tests for each affected component that cover:

  1. The specific bug scenario — a test that fails before the fix and passes after
  2. Edge cases — boundary conditions related to the bug
  3. Negative test cases — invalid inputs, error paths

Step 3: Write Integration Tests for the affected flow

If the bug involves multiple components or API flows, write integration tests that exercise the full path. Follow the existing integration test patterns in the repo.

Step 4: Run & Verify the Tests

Run the tests in the affected module:

cd <repo>/<module-path>
mvn test -Dtest=<TestClassName>

Verify:

  • All new tests pass
  • Existing tests in the module still pass
  • The bug-scenario test would fail without the fix (if a fix exists)

Step 5: Write Tests Summary

Create .ai/test-<issue_number>.md:

# Test Summary — Issue #<issue_number>

## Tests Created
| Type | File | Description |
|------|------|-------------|
| Unit | <path> | <what it tests> |
| Integration | <path> | <what it tests> |

## Module & Component
- **Module:** <module path>
- **Framework:** <JUnit/TestNG>

## How to Run
\`<exact command>\`

## Assumptions or Limitations
<any caveats>

Comments

Markdown supported