Skip to content

feat(#97): CLI batch mode for sequential load tests - #101

Open
Allan-Nava wants to merge 2 commits into
mainfrom
feat/cli-batch-runs
Open

Allan-Nava wants to merge 2 commits into
mainfrom
feat/cli-batch-runs

Conversation

@Allan-Nava

Copy link
Copy Markdown
Member

Description

Add crowdsim batch <config.json> subcommand to run multiple load tests sequentially from a configuration file. Enables CI/CD automation and multi-stage test campaigns.

Changes

  • bin/crowdsim: New cmd_batch() function

    • Reads JSON config with array of jobs
    • Each job specifies profile, target, peak rate, shape, steps
    • Executes sequentially, logs pass/fail
    • Collects exit codes (0 = all pass, 1 = any failure)
  • examples/batch-config.json (new): Example config

    • Three sequential jobs: baseline (50 req/s), load (100 req/s), spike (200 req/s)
    • Shows config structure

Config Format

{
  "name": "Campaign name",
  "jobs": [
    { "name": "test1", "profile": "...", "target": "...", "peak": 50, "shape": "mix", "steps": 4 },
    { "name": "test2", "profile": "...", "target": "...", "peak": 100, "shape": "mix", "steps": 6 }
  ]
}

Usage

crowdsim batch examples/batch-config.json

Output:

Testing

  • Syntax verified (no node --check for bash)
  • Example config is valid JSON

Related

Closes #97 (partial — webhooks/hooks deferred to v1.20.1)

🤖 Generated with Claude Code

allan added 2 commits September 21, 2026 14:45
- cmd_batch <config.json> runs multiple load tests in sequence
- Each job specifies profile, target, peak rate
- Exit 0 if all pass, 1 if any fail
- Example config with 3 sequential tests (baseline, load, spike)

Usage:  crowdsim batch examples/batch-config.json
@Allan-Nava Allan-Nava self-assigned this Sep 21, 2026
@Allan-Nava Allan-Nava added the area:release versioning, tags, CHANGELOG label Sep 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:release versioning, tags, CHANGELOG

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI: bulk runs and automation helpers

1 participant