stress-batch-tests

A manually run test system for sending many concurrent requests to different AI capabilities and producing Markdown or HTML reports. It is separate from the normal automated test suite, which checks smaller individual cases.

In plain words
What is it for?
Use it to stress-test text, audio, image, video, and other commands; prepare test data; parse command results; and generate batch performance reports.
Why use it?
It measures concurrency, rate limiting, response times, and batch behavior without changing the product code. Keeping it separate prevents long-running load tests from running in the default test or CI process.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/modelstudioai/cli/stress-batch-tests
Clone the repo
git clone --depth 1 https://github.com/modelstudioai/cli
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,328 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03328
Opus 5 $0.00000 $0.01664
Sonnet 5 $0.00000 $0.00666
Haiku 4.5 $0.00000 $0.00333

Measured yesterday against content hash fe645cc2f8d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

stress-batch-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/stress-batch-tests.md · 223 lines

How it starts

The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.

批量压测脚本(多能力统一入口)

使用者文档(方案说明、命令示例、fixtures、默认值表):../stress-testing.md

触发条件

  • 新增、修改或排查 packages/cli/tests/stress/**/*.mjs 批量压测代码
  • 用户要求并发压测 bl 各能力(文本 / 语音 / 图像 / 视频等)、生成 Markdown/HTML 报告
  • 修改对应命令的 JSON 输出字段后,需同步 packages/cli/tests/stress/lib/parsers.mjs 与各 targets/*.mjs 的成功判定
  • 在 monorepo 根 package.json 调整 test:stress 入口

不要为压测去改 CLI 产品行为(除非用户明确要求修 CLI bug);压测侧通过子进程参数与解析逻辑适配现有命令。

与 E2E / vp test 的关系

维度 E2E(Vitest) 批量压测(.mjs
路径 packages/cli/tests/e2e/*.e2e.test.ts packages/cli/tests/stress/run.mjs + targets/*.mjslib/*.mjs
运行 vp test(真实 API 需 BAILIAN_E2E=1 仅手动 pnpm run test:stress -- <target> -- ...
目的 回归:help、缺参、dry-run、单条集成 并发、限流、耗时统计、批量报告、前置资源 fixtures
CI 可纳入 vp test(skip 块默认跳过) 禁止默认 CI / vp test 自动执行

vp test 只收集 *.test.ts / *.spec.ts 等,不会执行 tests/stress/*.mjs。勿将压测逻辑写成 Vitest 用例并放进默认测试流。

E2E 规范见 cli-e2e-tests.md

文件与入口

packages/cli/tests/stress/
├── run.mjs                 # 路由入口(解析 target、全局 flags、`--`)
├── lib/
│   ├── argv-parse.mjs      # 共用 --count/-n、-c、-m、--voice、--report-dir 等
│   ├── stress-config.mjs   # count/concurrency 配置加载与解析
│   ├── cli-runner.mjs      # spawn main.ts、限流重试、线程池
│   ├── fixtures.mjs        # prerequisites.json + 前置音频/图/视频生成
│   ├── parsers.mjs         # 各命令 stdout / 文件解析
│   ├── paths.mjs
│   ├── rate-limit.mjs
│   ├── finish-run.mjs      # 写报告;套件模式返回摘要而不 exit
│   ├── run-suite.mjs       # 全量套件编排
│   ├── suite-catalog.mjs   # 用例顺序与中文名
│   ├── suite-report.mjs    # SUITE_REPORT.md / .html
│   ├── trace-ids.mjs       # requestId / taskId 提取
│   └── report.mjs          # REPORT.md / REPORT.html / results.json
└── targets/
    ├── text-chat.mjs
    ├── speech-synthesize.mjs
    ├── speech-recognize.mjs
    ├── image-generate.mjs
    ├── image-edit.mjs
    ├── video-t2v.mjs
    ├── video-i2v.mjs
    ├── video-ref.mjs
    └── video-edit.mjs

Read the full file on GitHub · 223 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 223 lines · 0 tokens per session scan A fe645cc2f8d3

Subscribe to this mod's changes

stress-batch-tests is an agent published in the GitHub repository modelstudioai/cli (320 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,328 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.