Locust API Testing Skills

This repository contains a Claude Code skill for authorized API smoke checks, Locust load-test configuration, execution, and report analysis.

👆:Skills

 

Structure

  • skills/locust-api-testing/SKILL.md — Claude-facing skill instructions.
  • skills/locust-api-testing/REFERENCE.md — configuration schema and command reference.
  • skills/locust-api-testing/config/api_config.json — active local test configuration.
  • skills/locust-api-testing/scripts/ — validation, preview, Locust execution, and report parsing scripts.
  • skills/locust-api-testing/examples/ — sample configuration payloads.
  • skills/locust-api-testing/report/ — generated local reports.

 

Quick start

  1. Install dependencies from the repository root:

    pip install -r requirements.txt
     
  2. Edit the active config:

    skills/locust-api-testing/config/api_config.json
    
     
  3. Run a smoke check from skills/locust-api-testing:

    python scripts/api_validator.py
     
  4. After reviewing and approving the target, users, spawn rate, duration, and request mix, run the load test:

    python scripts/locust_client.py
     
  5. Analyze the latest report when needed:

    python scripts/report_analyzer.py
     

Safety

Only run load tests against systems you own or are explicitly authorized to test. Start with conservative concurrency and duration, and do not publish configs or reports that contain tokens, cookies, internal hosts, tenant IDs, or private business data.

 

Maintenance

Prefer updating api_config.json for test changes. Modify scripts only when fixing framework behavior. Keep SKILL.md concise and operational so Claude can load the right guidance quickly, and put detailed schema notes in REFERENCE.md.

 

posted @ 2026-04-07 18:27  莲(LIT)  阅读(27)  评论(0)    收藏  举报