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
- 01Review issue analysis and affected module
- 02Follow existing test conventions
- 03Cover bug scenarios and edge cases
- 04Add integration tests for multi-component flows
- 05Run tests and write a test summary
Use cases
- 01Adding regression tests for a confirmed bug
- 02Checking invalid inputs and error paths
- 03Testing a bug flow across components
- 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-testsAfter 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:
- The specific bug scenario — a test that fails before the fix and passes after
- Edge cases — boundary conditions related to the bug
- 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>