{
  "slug": "k6-run-scenario-selects-configured-workloads-df5a3289e89c",
  "title": "k6 run --scenario selects configured workloads",
  "tools": [
    "k6"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-09-21T15:17:03.000Z",
  "announced_at": "2026-09-21T15:17:03.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When debugging a script with multiple configured scenarios, run `k6 run --scenario <name> <script.js>` to run only the named workload. Separate multiple scenario names with commas.",
    "examples": [
      "k6 run --scenario homepage script.js",
      "k6 run --scenario homepage,contacts script.js"
    ],
    "gotchas": [
      "Version: v2.3.0",
      "--scenario <name>[,<name>...]: Select one or more configured scenarios by name; separate names with commas. Without it, all configured scenarios run. Names must match the configured scenarios.",
      "<script.js> (required): Script containing the configured scenarios.",
      "--vus: Load shortcut; cannot be combined with `--scenario`.",
      "--duration: Load shortcut; cannot be combined with `--scenario`.",
      "Prerequisite: Use k6 v2.3.0 or later, where `--scenario` was introduced.",
      "Prerequisite: The script must configure the scenario name or names in its `scenarios` object.",
      "Scenario names must match configured scenarios.",
      "Load shortcuts such as `--vus` and `--duration` cannot be combined with selection; configure workload in each scenario instead.",
      "Selected scenarios retain their executor, load, timing, function, environment, tags, and browser options.",
      "Without `--scenario`, k6 runs all configured scenarios.",
      "k6 warns and skips thresholds tagged for configured scenarios that are excluded, while keeping global thresholds and other filters."
    ]
  },
  "why_it_matters": "When editing or debugging a script with multiple scenarios, run only the workload under development.",
  "before": "Without `--scenario`, k6 runs all configured scenarios. The release note describes environment-variable selection code or splitting scripts as prior workarounds.",
  "sources": [
    "https://github.com/grafana/k6/releases/tag/v2.3.0",
    "https://grafana.com/docs/k6/v2.3.x/using-k6/scenarios/#run-selected-scenarios"
  ],
  "rank": 0.98054,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-65a244af489b5976-0:gate",
    "evidence_hash": "dba6ea361338a6ce929886692010d6448197e9e669546fe9ff9e6f7cea7e9e36"
  },
  "review": {
    "draft_hash": "d66641a079a505303ceec68e8efd5c641359cc4af076ee0c089bacbe0cfead0f",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.80 (>= 0.6 needed)."
  }
}
