Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计通过

testing-perf测试性能

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

1,398

周安装

56

GitHub Stars

160

下载量

452
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:testing-perf(测试性能)
来源仓库:https://github.com/yonatangross/orchestkit
仓库路径:skills/testing-perf
安装命令:
npx skills add https://github.com/yonatangross/orchestkit --skill testing-perf
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yonatangross/orchestkit --skill testing-perf

简介

提供性能测试方法论与工具链支持。

  • 适用于响应时间、吞吐量、资源消耗等指标测量。
  • 可生成压测脚本与瓶颈分析报告。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 需在接近真实的流量环境下执行测试。
  • testing-perf 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Performance & Load Testing Patterns

Focused skill for performance testing, load testing, and pytest execution optimization. Covers k6, Locust, pytest-xdist parallel execution, custom plugins, and test type classification.

Quick Reference

AreaFilePurpose
k6 Load Testingrules/perf-k6.mdThresholds, stages, custom metrics, CI integration
Locust Testingrules/perf-locust.mdPython load tests, task weighting, auth flows
Test Typesrules/perf-types.mdLoad, stress, spike, soak test patterns
Executionrules/execution.mdCoverage reporting, parallel execution, failure analysis
Pytest Markersrules/pytest-execution.mdCustom markers, xdist parallel, worker isolation
Pytest Pluginsrules/pytest-plugins.mdFactory fixtures, plugin hooks, anti-patterns
k6 Patternsreferences/k6-patterns.mdStaged ramp-up, authenticated requests, test types
xdist Parallelreferences/xdist-parallel.mdDistribution modes, worker isolation, CI config
Custom Pluginsreferences/custom-plugins.mdconftest plugins, installable plugins, hook reference
Perf Checklistchecklists/performance-checklist.mdPlanning, setup, metrics, load patterns, analysis
Pytest Checklistchecklists/pytest-production-checklist.mdConfig, markers, parallel, fixtures, CI/CD
Test Templatescripts/test-case-template.mdFull test case documentation template

k6 Quick Start

Set up a load test with thresholds and staged ramp-up:

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

export const options = {
  stages: [
    { duration: '30s', target: 20 },  // Ramp up
    { duration: '1m', target: 20 },   // Steady state
    { duration: '30s', target: 0 },   // Ramp down
  ],
  thresholds: {
    http_req_duration: ['p(95)<500'],  // 95th percentile under 500ms
    http_req_failed: ['rate<0.01'],    // Less than 1% error rate
  },
};

export default function () {
  const res = http.get('http://localhost:8000/api/health');
  check(res, {
    'status is 200': (r) => r.status === 200,
    'response time < 200ms': (r) => r.timings.duration < 200,
  });
  sleep(1);
}

Run: k6 run --out json=results.json tests/load/api.js

k6 v1.0+ (May 2025) — what changed

  • Native TypeScript: k6 run tests/load/api.ts — no compilation step needed.
  • Auto extension provisioning: k6 run pulls required extensions automatically; manual xk6 build is superseded for most workflows.
  • Browser module import: import browser from 'k6/browser'the old k6/experimental/browser path was removed in v0.52+. Any generated code using /experimental/ will fail.
  • OTLP output built in: k6 run --out experimental-opentelemetry=... — stream results straight to your tracing backend.
import http from 'k6/http'
import browser from 'k6/browser'
import { check } from 'k6'

export const options = { vus: 5, duration: '30s' }

export default async function () {
  const page = await browser.newPage()
  await page.goto('https://example.com')
  check(page, { 'title present': async p => (await p.title()).length > 0 })
  await page.close()
}

Performance Test Types

TypeDurationVUsPurposeWhen to Use
Load5-10 minExpected trafficValidate normal conditionsEvery release
Stress10-20 min2-3x expectedFind breaking pointPre-launch
Spike5 minSudden 10x surgeTest auto-scalingBefore events
Soak4-12 hoursNormal loadDetect memory leaksWeekly/nightly

pytest Parallel Execution

Speed up test suites with pytest-xdist:

# pyproject.toml
[tool.pytest.ini_options]
addopts = ["-n", "auto", "--dist", "loadscope"]
markers = [
    "slow: marks tests as slow",
    "smoke: critical path tests for CI/CD",
]
# Run with parallel workers and coverage
pytest -n auto --dist loadscope --cov=app --cov-report=term-missing --maxfail=3

# CI fast path — skip slow tests
pytest -m "not slow" -n auto

# Debug mode — single worker
pytest -n 0 -x --tb=long

Worker Database Isolation

When running parallel tests with databases, isolate per worker:

@pytest.fixture(scope="session")
def db_engine(worker_id):
    db_name = f"test_db_{worker_id}" if worker_id != "master" else "test_db"
    engine = create_engine(f"postgresql://localhost/{db_name}")
    yield engine
    engine.dispose()

Key Thresholds

MetricTargetTool
p95 response time< 500msk6
p99 response time< 1000msk6
Error rate< 1%k6 / Locust
Business logic coverage90%pytest-cov
Critical path coverage100%pytest-cov

Decision Guide

ScenarioRecommendation
JavaScript/TypeScript teamk6 for load testing
Python teamLocust for load testing
Need CI thresholdsk6 (built-in threshold support)
Need distributed testingLocust (built-in distributed mode)
Slow test suitepytest-xdist with -n auto
Flaky parallel tests--dist loadscope for fixture grouping
DB-heavy testsWorker-isolated databases with worker_id

Related Skills

  • ork:testing-unit — Unit testing patterns, pytest fixtures
  • ork:testing-e2e — End-to-end performance testing with Playwright
  • ork:performance — Core Web Vitals and optimization patterns

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.93%
按下载量换算162

Claude

31.02%
按下载量换算140

Cursor

16.36%
按下载量换算74

Gemini CLI

8.47%
按下载量换算38

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills