create-tests
/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>
More from tharsanan1/wso2-se-agent-skills
verify-fix
Verify whether a GitHub issue is fixed in the local codebase. User provides a GitHub issue URL, the skill fetches it, extracts reproduction steps, builds the product from source, runs the reproduction steps, and reports whether the issue still exists or not.
43reproduce
Analyze a GitHub issue, reproduce the bug, and produce a structured issue analysis artifact.
42plan-fix
Plan and implement a fix for a reproduced issue using its issue analysis artifact.
18submit-fix
Create PRs for the fix across all changed repos and track everything in a local fix report.
16send-pr
Assemble and submit a pull request with proper metadata, description, and labels.
1review-plan
Independently validate the implementation plan before code is written. Acts as a quality gate.
1