PluginBench
Skill
Pass
Audit score 90

dx-devops-test-suite-assignments-configure

forcedotcom/sf-skills

Recommend and manage DevOps Center test suite assignments to pipeline stages.

What is dx-devops-test-suite-assignments-configure?

Analyzes commit diffs to recommend relevant test suites and flag coverage gaps, or assigns and maps suites to pipeline stages via the testSuiteStages API. Use this when you need to determine which suites to run for a change, assign suites to stages, bulk-map multiple suites, or add/remove test classes within a suite.

  • Mode A: Analyzes commit diffs against suite metadata to recommend relevant existing suites and identify coverage gaps (pure reasoning, no writes)
  • Mode B: Assigns a single suite to a stage as a one-off operation
  • Mode C: Bulk-maps multiple suites to a stage with mandatory impact preview before confirmation
  • Mode D: Adds or removes individual test classes within a suite assignment with governance rules
  • Queries DevOps Center org data via sf data query and sf api request rest to surface suite-stage metadata
  • Prevents writes until explicit user confirmation; rejects tests are excluded from payloads

How to install dx-devops-test-suite-assignments-configure

npx skills add https://github.com/forcedotcom/sf-skills --skill dx-devops-test-suite-assignments-configure
Prerequisites
  • Salesforce CLI v2.67.0 or later
  • DevOps Center plugin installed
  • Org login and DevOps Center org authentication (doce-org-alias)
  • Pipeline identified in the org
  • For Modes B–D: stage ID required
Claude Code
Cursor
Windsurf
Cline

How to use dx-devops-test-suite-assignments-configure

  1. 1.Run prerequisite checks from references/prerequisite-checks.md and stop if any fail
  2. 2.Select the mode based on your task: recommend suites (A), assign one suite (B), bulk-map suites (C), or add/remove classes (D)
  3. 3.For Mode A: provide the commit diff; the skill analyzes and recommends suites with gap flagging
  4. 4.For Modes B–D: review the confirmation prompt (Mode C includes mandatory impact-preview table) and approve before the API write executes
  5. 5.For Mode D: review the final test list, approve, and rejected tests are automatically excluded from the payload

Use cases

Good for
  • Determine which test suites should run for a specific commit or code change
  • Assign an unlinked test suite to a pipeline stage
  • Configure suite-to-stage mappings as part of a testing strategy
  • Add or remove test classes from an existing suite assignment
  • Flag test coverage gaps when a commit has no assigned suite coverage
Who it's for
  • DevOps Center administrators managing test suite assignments
  • Developers configuring pipeline testing strategies
  • Teams implementing governance rules for test class inclusion/exclusion

dx-devops-test-suite-assignments-configure FAQ

When should I use this skill vs. dx-devops-test-suite-run?

Use this skill to recommend, assign, or configure which suites run on a stage. Use dx-devops-test-suite-run to actually execute a suite that is already assigned.

Can I generate new tests as part of suite assignment?

No. This skill manages existing suite assignments only. To author new tests, use platform-apex-test-generate; to run them, use platform-apex-test-run.

What happens if I decline the confirmation prompt?

The skill stops without writing any changes to the org. No suite assignments, mappings, or class modifications are applied.

Where does DevOps Center data come from?

All suite and stage metadata lives in the Salesforce org, not the local repo. The skill queries it via sf data query and sf api request rest.

What if a recommended suite is not yet in the org?

Configure or re-sync the test provider using dx-devops-test-pipeline-configure, then return to this skill to assign it.

Full instructions (SKILL.md)

Source of truth, from forcedotcom/sf-skills.


name: dx-devops-test-suite-assignments-configure description: "Recommends and manages DevOps Center test suite assignments for pipeline stages. Mode A analyzes a commit diff against assigned suite metadata to recommend relevant existing suites and flag coverage gaps (pure reasoning). Modes B-D assign a single suite, bulk-map multiple suites with a mandatory impact preview, or add/remove test classes with governance rules, via the testSuiteStages Connect API. Use this skill to recommend suites for a commit, assign or map suites to stages, or add/remove tests in a suite. TRIGGER when: the user asks which suites to run for a commit/diff or what covers their changes; a suite is unlinked and the user wants it assigned; the user wants to configure suite-to-stage mappings, assign multiple suites, or add/remove/sync tests in a suite. DO NOT TRIGGER when: configuring or syncing a test provider (use dx-devops-test-pipeline-configure), running suites (use dx-devops-test-suite-run), or authoring/running tests directly (use platform-apex-test-generate or platform-apex-test-run)." metadata: version: "1.0" domains: ["Developer Experience"] minApiVersion: "67.0" relatedSkills: - "dx-devops-test-failures-analyze" - "dx-devops-test-pipeline-configure" - "dx-devops-test-suite-run" - "platform-apex-test-generate" - "platform-apex-test-run" cliTools: - tool: ["sf"] semver: ">=2.67.0"

Configure DevOps Center Suite Assignments

Recommends which existing test suites to run for a change, and manages how suites are assigned and mapped to pipeline stages. These operations share the same suite-stage metadata: a recommendation surfaces relevant suites and flags gaps, and those gaps lead directly into assignment.

API version: All DevOps testing system calls target Salesforce API v67.0 (minimum required).

Important: All DevOps Center data lives in the Salesforce org — NOT the local repo. Never search the filesystem for suite configuration. Always query the org with sf data query or sf api request rest.


Step 1 — Run prerequisites first (always)

Run the prerequisite checks in references/prerequisite-checks.md before any query or system call. On any failure, surface the plain-language message and stop.

  • Mode A (recommend): Prerequisites 1–4 (org login, plugin, DevOps Center org auth, pipeline identified). No stage required — recommendation reads the pipeline-level Review trigger.
  • Modes B–D (assign/map/classes): Prerequisites 1–4 and Prerequisite 5 (stage). You need doce-org-alias, pipelineId, and stageId.

Step 2 — Select the mode

If the user wants to…ModeFollow
Know which suites to run for a commit/diff, or what covers their changesA — Recommend suitesreferences/recommendation-logic.md
Assign one suite to a stage as a one-offB — Assign a single suitereferences/suite-assignment-modes.md
Bulk-map multiple suites to a stage as a testing strategyC — Map multiple suitesreferences/suite-assignment-modes.md
Add/remove individual test classes within a suite assignmentD — Add/remove classesreferences/suite-assignment-modes.md

Mode A is pure reasoning (no writes). Modes B–D mutate org state via the same testSuiteStages endpoint (references/api-endpoint.md).

How A feeds B–D: When recommendation flags a relevant suite that is not assigned to the stage, that gap is the input to Mode B/C. When it flags a new method with no suite coverage, direct the developer to author tests manually (v1 constraint — never suggest generating tests here).


Step 3 — Governance & confirmation (Modes B–D)

Modes B–D must confirm before any write:

  • Mode B — single confirmation prompt naming the suite, stage, and event.
  • Mode C — a mandatory impact-preview table (Suite / Stage / Event / Action) before the confirmation gate.
  • Mode D — re-present the final test list before confirming. Rejected tests must be EXCLUDED from the payload. If tests were modified during review, re-present the final list before requesting confirmation. Never call without explicit approval.

Do not call the API until the user gives an affirmative response. If the user declines, stop without writing. Full wording for each gate is in references/suite-assignment-modes.md.

Mode A (recommendation) makes no writes and needs no confirmation gate.


Step 4 — Execute and report

Follow the chosen reference file:

  • references/recommendation-logic.md — Mode A: diff classification, provider matching, ranking, gap flagging, output format.
  • references/suite-assignment-modes.md — Modes B–D: inputs, confirmation wording, success messages.
  • references/api-endpoint.md — the shared testSuiteStages POST payload schema (Modes B–D).
  • references/error-handling.md — status-code → plain-language tables.

Never expose raw API errors, stack traces, or JSON to the user.


Related skills

  • dx-devops-test-pipeline-configure — if the suite you want to assign doesn't appear yet, configure or re-sync the provider; also configures quality gates on a stage after mapping.
  • dx-devops-test-suite-run — execute a recommended/assigned suite on a stage.
  • dx-devops-test-failures-analyze — analyze failures and improvement suggestions for the tests within a suite.