Command Palette

Search for a command to run...

Назад к скиллам
скилл № 27604

quality-load-testing

Use when the user asks to load test an API with k6, Locust, JMeter, Gatling or Artillery, run stress, spike or soak tests, measure p95/p99 latency and…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить quality-load-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Quality Load Testing

Purpose

Design and execute load tests with realistic scenarios, meaningful metrics, and reliable CI-integrated execution.

Agent Protocol

Trigger

Exact user phrases: "load testing", "performance testing", "stress test", "k6", "Locust", "artillery", "JMeter", "benchmark", "throughput", "latency", "spike test", "soak test".

Input Context

Before activating, verify:

  • Service under test (API, web app, streaming pipeline)
  • Expected traffic baseline (RPS, concurrent users)
  • Infrastructure (cloud provider, auto-scaling config)
  • Existing performance baselines if any

Output Artifact

Load testing plan with scenarios, metric targets, and execution strategy.

Response Format

# Test scenarios: load, stress, spike, soak
# Metric targets: p50, p95, p99, throughput, error rate
// k6 test script
// CI pipeline configuration

No preamble. No postamble. No explanations. No filler/hedging/transitions. Compress output — why use many token when few do trick.

Completion Criteria

  • Test scenarios defined (load, stress, spike, soak)
  • Metric targets set (p50 < 200ms, p95 < 500ms, p99 < 1s, error rate < 1%)
  • Ramp-up profile designed per scenario
  • Test script written for chosen tool (k6 preferred)
  • CI pipeline with load test stage
  • Results reporting configured (dashboard, threshold assertion)
  • Distributed execution strategy for high throughput

Max Response Length

200 lines of specification and scripts.

Workflow

Step 1: Scenario Design

Load test: expected traffic × 1.5 for 15 min — verify normal performance. Stress test: ramp up until failure — find the breaking point. Spike test: double traffic in 30 seconds — verify recovery. Soak test: sustained load at 80% capacity for 2+ hours — detect memory leaks and degradation. Each scenario specifies: target RPS, concurrent users, ramp-up profile, and duration.

Step 2: Metric Targets

Latency: p50 < 200ms, p95 < 500ms, p99 < 1s. Throughput: >= expected peak RPS × 1.5. Error rate: < 1% for load tests, < 5% for stress tests (until failure). Resource utilization: CPU < 80%, memory < 80%, no connection pool exhaustion. Set thresholds in test script to fail CI when violated.

Step 3: Ramp-Up Profile

Gradual ramp-up to avoid cold-start spikes: 1 min warm-up at 10% load, 2 min ramp to target, sustained for duration, 30 sec ramp-down. For spike tests: 0 to target in 5 seconds, sustain 1 min, observe recovery 2 min. Sleep/think time (100–500ms between requests) simulates real user behavior.

Step 4: Test Script (k6)

import http from "k6/http";
import { check, sleep } from "k6";

export const options = {
  stages: [
    { duration: "2m", target: 100 },  // ramp-up
    { duration: "10m", target: 100 }, // sustain
    { duration: "1m", target: 0 },    // ramp-down
  ],
  thresholds: {
    http_req_duration: ["p(95)<500"],
    http_req_failed: ["rate<0.01"],
  },
};

export default function () {
  const res = http.get(`${__ENV.BASE_URL}/api/orders`);
  check(res, { "status 200": (r) => r.status === 200 });
  sleep(0.3);
}

Step 5: CI Integration

- name: Load test
  run: k6 run script.js
  env:
    BASE_URL: ${{ secrets.LOAD_TEST_URL }}
    K6_OUT: influxdb=http://influxdb:8086/k6

Step 6: Distributed Execution

For >10,000 RPS: k6 operator on Kubernetes (k6-operator), Locust with master/worker mode, artillery with multiple workers. Monitor aggregate metrics centrally.

Load Testing Script Examples

k6 — Comprehensive Load Test

import http from "k6/http";
import { check, sleep, group } from "k6";
import { Rate, Trend } from "k6/metrics";

const errorRate = new Rate("errors");
const loginDuration = new Trend("login_duration");

export const options = {
  stages: [
    { duration: "2m", target: 50 },   // ramp-up
    { duration: "10m", target: 50 },  // sustain
    { duration: "5m", target: 100 },  // ramp to peak
    { duration: "10m", target: 100 }, // peak load
    { duration: "2m", target: 0 },    // ramp-down
  ],
  thresholds: {
    http_req_duration: ["p(95)<800", "p(99)<1500"],
    http_req_failed: ["rate<0.01"],
    errors: ["rate<0.05"],
    login_duration: ["p(95)<2000"],
  },
};

const BASE_URL = __ENV.BASE_URL || "http://localhost:3000";

export default function () {
  group("user_login", function () {
    const payload = JSON.stringify({
      email: `user_${__VU}@example.com`,   // seeded synthetic accounts
      password: __ENV.TEST_USER_PASSWORD,  // from CI secrets, never in the script
    });
    const res = http.post(`${BASE_URL}/api/login`, payload, {
      headers: { "Content-Type": "application/json" },
    });
    loginDuration.add(res.timings.duration);
    errorRate.add(res.status !== 200);
    check(res, {
      "login status 200": (r) => r.status === 200,
      "login under 2s": (r) => r.timings.duration < 2000,
    });
    sleep(Math.random() * 0.5 + 0.3);
  });

  group("browse
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/capacity-planning.md
  • references/chaos-and-soak.md
  • references/ci-integration.md
  • references/execution.md
  • references/k6-guide.md
  • references/k6-reference.md
  • references/k6-scripting.md
  • references/k6-scripts.md
  • references/load-testing-advanced.md
  • references/load-testing-fundamentals.md
  • references/load-testing-infrastructure.md
  • references/load-testing-scenarios.md
  • references/locust-guide.md
  • references/merged-backend-load-testing.md
  • references/results-analysis.md
  • references/test-design.md
  • references/test-types.md

FAQ

Что делает скилл quality-load-testing?

Use when the user asks to load test an API with k6, Locust, JMeter, Gatling or Artillery, run stress, spike or soak tests, measure p95/p99 latency and throughput, or gate performance in CI. Produces scenarios, thresholds and scripts. Not for profiling code (use dev-loop-performance-profiler) or frontend Web Vitals (use frontend-performance).

Как установить скилл quality-load-testing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл quality-load-testing запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить quality-load-testing с