commit 04a0f503b991bbeb158ec1cd8c30efdd47af84fc Author: Zhongwei Li Date: Sun Nov 30 08:21:03 2025 +0800 Initial commit diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..276e6e1 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "load-test-runner", + "description": "Create and execute load tests for performance validation", + "version": "1.0.0", + "author": { + "name": "Claude Code Plugins", + "email": "[email protected]" + }, + "skills": [ + "./skills" + ], + "commands": [ + "./commands" + ] +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..743ba45 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# load-test-runner + +Create and execute load tests for performance validation diff --git a/commands/create-load-test.md b/commands/create-load-test.md new file mode 100644 index 0000000..55cb65f --- /dev/null +++ b/commands/create-load-test.md @@ -0,0 +1,33 @@ +--- +description: Create load test scenarios and scripts +--- + +# Load Test Runner + +Create comprehensive load test scenarios to validate application performance. + +## Test Scenarios + +1. **Baseline Load**: Normal traffic patterns +2. **Stress Test**: Identify breaking points +3. **Spike Test**: Sudden traffic increases +4. **Soak Test**: Extended duration testing +5. **Scalability Test**: Performance under growth + +## Process + +1. Analyze application endpoints and critical paths +2. Identify key user journeys to test +3. Create load test scripts (k6, JMeter, Artillery, etc.) +4. Define performance thresholds and SLOs +5. Generate test execution instructions + +## Output + +Provide: +- Load test scripts for chosen tool +- Test scenario descriptions +- Performance threshold definitions +- Execution instructions +- Result interpretation guidelines +- CI/CD integration suggestions diff --git a/plugin.lock.json b/plugin.lock.json new file mode 100644 index 0000000..4d5cfd9 --- /dev/null +++ b/plugin.lock.json @@ -0,0 +1,61 @@ +{ + "$schema": "internal://schemas/plugin.lock.v1.json", + "pluginId": "gh:jeremylongshore/claude-code-plugins-plus:plugins/performance/load-test-runner", + "normalized": { + "repo": null, + "ref": "refs/tags/v20251128.0", + "commit": "f89c94688aca7b8c52de10e3f74c5f87104c0016", + "treeHash": "39cf1eb424aa0b3ba7fce9a7904d34d66c81e9148cb0c1d231b34f9169aa2b26", + "generatedAt": "2025-11-28T10:18:32.409994Z", + "toolVersion": "publish_plugins.py@0.2.0" + }, + "origin": { + "remote": "git@github.com:zhongweili/42plugin-data.git", + "branch": "master", + "commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390", + "repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data" + }, + "manifest": { + "name": "load-test-runner", + "description": "Create and execute load tests for performance validation", + "version": "1.0.0" + }, + "content": { + "files": [ + { + "path": "README.md", + "sha256": "83571f31fdcf94780d2f991739259a09797488446249aaf5c4f72f5f421adc58" + }, + { + "path": ".claude-plugin/plugin.json", + "sha256": "0c0d2fb2c5ea1c17f7ac875d33f170d24d5f46ef00ae8567c30e767c3cb33574" + }, + { + "path": "commands/create-load-test.md", + "sha256": "2b0f01fc9892e77480591b4d632e1b0589d9b28b87ca7a9e0a921ed15e0855a2" + }, + { + "path": "skills/load-test-runner/SKILL.md", + "sha256": "640b5fc481ac5e72540d1ec0a31edf2f904cf015bb052d3ae48b0f3effa86b48" + }, + { + "path": "skills/load-test-runner/references/README.md", + "sha256": "cc7eeba948e1710f7dcd5d523dcc1f53eacf45bb92c7672f3ed064d477d62e83" + }, + { + "path": "skills/load-test-runner/scripts/README.md", + "sha256": "2d85e75f428369c7312d3872a6ab507bb68a4fff26eaa91f129eac0341350bec" + }, + { + "path": "skills/load-test-runner/assets/README.md", + "sha256": "c4ca704a0662c530c8cda9448ae0a515548cec1e46622011566e3a1742b2893c" + } + ], + "dirSha256": "39cf1eb424aa0b3ba7fce9a7904d34d66c81e9148cb0c1d231b34f9169aa2b26" + }, + "security": { + "scannedAt": null, + "scannerVersion": null, + "flags": [] + } +} \ No newline at end of file diff --git a/skills/load-test-runner/SKILL.md b/skills/load-test-runner/SKILL.md new file mode 100644 index 0000000..0d5fded --- /dev/null +++ b/skills/load-test-runner/SKILL.md @@ -0,0 +1,53 @@ +--- +name: running-load-tests +description: | + This skill enables Claude to create and execute load tests for performance validation. It is designed to generate load test scripts using tools like k6, JMeter, and Artillery, based on specified test scenarios. Use this skill when the user requests to create a "load test", conduct "performance testing", validate "application performance", or needs a "stress test" to identify breaking points in the application. The skill helps define performance thresholds and provides execution instructions. +allowed-tools: Read, Write, Edit, Grep, Glob, Bash +version: 1.0.0 +--- + +## Overview + +This skill empowers Claude to automate the creation and execution of load tests, ensuring applications can handle expected traffic and identify potential performance bottlenecks. It streamlines the process of defining test scenarios, generating scripts, and executing tests for comprehensive performance validation. + +## How It Works + +1. **Analyze Application**: Claude analyzes the user's request to understand the application's endpoints and critical paths. +2. **Identify Test Scenarios**: Claude identifies relevant test scenarios, such as baseline load, stress test, spike test, soak test, or scalability test, based on the user's requirements. +3. **Generate Load Test Scripts**: Claude generates load test scripts (k6, JMeter, Artillery, etc.) based on the selected scenarios and application details. +4. **Define Performance Thresholds**: Claude defines performance thresholds and provides execution instructions for the generated scripts. + +## When to Use This Skill + +This skill activates when you need to: +- Create load tests for a web application or API. +- Validate the performance of an application under different load conditions. +- Identify performance bottlenecks and breaking points. + +## Examples + +### Example 1: Creating a Stress Test + +User request: "Create a stress test for the /api/users endpoint to simulate 1000 concurrent users." + +The skill will: +1. Analyze the request and identify the need for a stress test on the /api/users endpoint. +2. Generate a k6 script that simulates 1000 concurrent users hitting the /api/users endpoint. + +### Example 2: Validating Performance After a Code Change + +User request: "Validate the performance of the application after the recent code changes with a baseline load test." + +The skill will: +1. Identify the need for a baseline load test to validate performance. +2. Generate a JMeter script that simulates normal traffic patterns for the application. + +## Best Practices + +- **Realistic Scenarios**: Define load test scenarios that accurately reflect real-world usage patterns. +- **Threshold Definition**: Establish clear performance thresholds to identify potential issues. +- **Iterative Testing**: Run load tests iteratively to identify and address performance bottlenecks early in the development cycle. + +## Integration + +This skill can be integrated with CI/CD pipelines to automate performance testing as part of the deployment process. It can also be used in conjunction with monitoring tools to correlate performance metrics with application behavior. \ No newline at end of file diff --git a/skills/load-test-runner/assets/README.md b/skills/load-test-runner/assets/README.md new file mode 100644 index 0000000..53583fb --- /dev/null +++ b/skills/load-test-runner/assets/README.md @@ -0,0 +1,9 @@ +# Assets + +Bundled resources for load-test-runner skill + +- [ ] k6_template.js: Template for generating k6 load test scripts. +- [ ] jmeter_template.jmx: Template for generating JMeter load test scripts. +- [ ] artillery_template.yaml: Template for generating Artillery load test scripts. +- [ ] results_template.md: Template for generating load test results reports. +- [ ] example_test_scenarios.json: Example load test scenarios in JSON format. diff --git a/skills/load-test-runner/references/README.md b/skills/load-test-runner/references/README.md new file mode 100644 index 0000000..cf8f7bc --- /dev/null +++ b/skills/load-test-runner/references/README.md @@ -0,0 +1,10 @@ +# References + +Bundled resources for load-test-runner skill + +- [ ] k6_api_reference.md: Detailed documentation of the k6 API for load testing. +- [ ] jmeter_api_reference.md: Detailed documentation of the JMeter API for load testing. +- [ ] artillery_api_reference.md: Detailed documentation of the Artillery API for load testing. +- [ ] load_testing_best_practices.md: Best practices for designing and executing effective load tests. +- [ ] performance_threshold_guidelines.md: Guidelines for defining appropriate performance thresholds for different application types. +- [ ] supported_test_scenarios.md: List of supported load test scenarios and their configurations. diff --git a/skills/load-test-runner/scripts/README.md b/skills/load-test-runner/scripts/README.md new file mode 100644 index 0000000..4cee42b --- /dev/null +++ b/skills/load-test-runner/scripts/README.md @@ -0,0 +1,10 @@ +# Scripts + +Bundled resources for load-test-runner skill + +- [ ] k6_script_generator.py: Generates k6 load test scripts based on user-defined parameters. +- [ ] jmeter_script_generator.py: Generates JMeter load test scripts based on user-defined parameters. +- [ ] artillery_script_generator.py: Generates Artillery load test scripts based on user-defined parameters. +- [ ] load_test_executor.py: Executes load tests using the specified tool (k6, JMeter, Artillery) and collects results. +- [ ] results_parser.py: Parses load test results and generates a summary report. +- [ ] threshold_validator.py: Validates load test results against predefined performance thresholds.