Dev swarm code test

From X-School-Academy/skill-pilot · View interactive version

Dev swarm code test is an AI agent skill from the GitHub repository X-School-Academy/skill-pilot. Create and execute comprehensive tests including unit tests, integration tests, CLI tests, web/mobile UI tests, API tests, and log analysis. Find bugs, verify requirements, identify improvements, and create change/bug/improve backlogs. Use when testing implementations or ensuring quality.

How to use this skill

Skill file

AI Builder - Code Test

This skill creates and executes comprehensive test suites to verify code quality and functionality. As a QA Engineer expert, you'll design test plans, write automated tests, perform manual testing, analyze results, identify issues, and create backlogs for changes, bugs, or improvements.

When to Use This Skill

Prerequisites

This skill requires:

Feature-Driven Testing Workflow

CRITICAL: This skill follows a strict feature-driven approach where feature-name is the index for the entire project:

For Each Backlog:

  1. Read backlog.md from 10-sprints/SPRINT-XX-descriptive-name/[BACKLOG_TYPE]-XX-[feature-name]-<sub-feature>.md
  2. Extract the feature-name from the backlog file name
  3. Read features/features-index.md to find the feature file
  4. Read feature documentation in this order:
  1. Locate code and test files in {SRC}/ using features/impl/[feature-name].md
  2. Write/execute tests following 07-tech-specs/testing-standards.md
  3. Update backlog.md with test results and findings

This approach ensures AI testers can test large projects without reading all code at once.

Your Roles in This Skill

See dev-swarm/docs/general-dev-stage-rule.md for role selection guidance.

Role Communication

See dev-swarm/docs/general-dev-stage-rule.md for the required role announcement format.

Test Types Overview

This skill handles multiple test types:

  1. Unit Tests: Test individual functions/components in isolation
  2. Integration Tests: Test component interactions and data flow
  3. API Tests: Test REST/GraphQL endpoints, contracts, error handling
  4. CLI Tests: Test command-line interfaces and scripts
  5. Web UI Tests: Test web interfaces (Playwright, Selenium, Cypress)
  6. Mobile UI Tests: Test mobile apps (if applicable)
  7. Log Analysis: Verify logging, monitoring, error tracking
  8. Performance Tests: Load testing, stress testing, benchmarks
  9. Security Tests: Vulnerability scanning, penetration testing

Instructions

Follow these steps in order:

Step 0: Verify Prerequisites and Gather Context (Feature-Driven Approach)

IMPORTANT: Follow this exact order to efficiently locate all relevant context:

  1. Identify the backlog to test:

```

10-sprints/

└── SPRINT-XX-descriptive-name/

└── [BACKLOG_TYPE]-XX-[feature-name]-<sub-feature>.md

```

  1. Read the backlog file:
  1. Read testing standards:
  1. Read PRD and tech specs:
  1. Read feature documentation (using feature-name as index):
  1. Locate code and tests:
  1. Read sprint test plan:
  1. Determine test scope:

DO NOT read the entire codebase. Use feature-name to find only relevant files.

Checklist and Status Rules (Backlog + Sprint)

Apply these rules whenever you test a backlog or sprint:

Test Method Priority

Use this priority order when choosing test methods:

  1. curl commands (highest priority)
  2. playwright-browser-* skills for web UI (must use browser for any web UI item)
  3. Write test code
  4. Write unit tests

Step 1: Design Test Strategy

Before writing tests, plan the approach:

  1. Identify test scenarios:

Happy Path:

Edge Cases:

Error Cases:

Security Cases:

  1. Select test types:
  1. Define success criteria:

Step 2: Write Automated Tests

Create automated test suites based on test type:

Unit Tests

Test individual functions/components in isolation:

Best Practices:

Integration Tests

Test component interactions:

API Tests

Test endpoints and contracts:

CLI Tests

Test command-line interfaces:

Web UI Tests (Playwright/Cypress)

Test web interfaces:

Step 3: Execute Manual Tests

For scenarios that can't be easily automated:

  1. Follow test plan from backlog:
  1. Document test execution:
  1. Test across environments:

Step 4: Analyze Logs

Review application logs for issues:

  1. Check for errors:
  1. Verify logging quality:
  1. Monitor performance:
  1. Security audit:

Step 5: Performance Testing (When Needed)

For performance-critical features:

  1. Load testing:
  1. Stress testing:
  1. Benchmark key operations:

Step 6: Analyze Results and Identify Issues

Categorize findings into three types:

1. Changes (Doesn't meet requirements)

Implementation doesn't meet original requirements:

Action: Create change type backlog

2. Bugs (Defects found)

Code has defects or errors:

Action: Create bug type backlog

3. Improvements (Enhancement opportunities)

Non-critical enhancements:

Action: Create improve type backlog

Step 7: Create Backlogs for Issues

For each issue found, create a backlog:

  1. Determine severity:
  1. Create backlog file in 10-sprints/:

Test Bug Backlog Template:

```markdown

# Backlog: [Type] - [Brief Description]

## Type

[change | bug | improve]

## Severity

[critical | high | medium | low]

## Original Feature/Backlog

Reference to original backlog that was tested

## Issue Description

Clear description of the bug or issue

## Steps to Reproduce

1. Step-by-step instructions to reproduce

2. Include specific inputs/actions

3. Note environment details

## Expected Behavior

What should happen

## Actual Behavior

What actually happens

## Test Evidence

## Affected Components

## Reference Features

Related features to consult

## Test Plan

How to verify the fix works

```

  1. Notify Project Management:

Step 8: Create Test Report

Document test results:

  1. Test Summary:
  1. Test Results by Type:
  1. Issues Found:
  1. Test Decision:

Step 9: Finalize and Commit

CRITICAL: Follow this process to safely commit changes and update tracking:

  1. Update Tracking Files:
  1. Request Human Review:
  1. Commit the Tests/Fixes (Content):
  1. Update Backlog with Commit ID:
  1. Commit the Backlog (Metadata):
  1. Notify user:

This two-step commit process ensures history is preserved before the backlog is updated with the commit reference.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.