Dx Devops Test Suite Run

作者 forcedotcome5164d94d751无许可证1K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Runs DevOps Center test suites on a pipeline stage (Pre-Promote, Post-Promote, or Review event) end to end: triggers async execution via the Connect API after an explicit confirmation gate, then polls by runId at provider-specific intervals until it completes, fails, or times out, and hands results to failure analysis. Also retriggers a quality gate after fixes, but only once coverage meets the threshold. Use this skill when a user wants to run, kick off, or launch test suites on a stage, re-run a quality gate, or watch an in-progress run to completion. TRIGGER when: the user wants to run/launch suites on a stage, execute tests before or after promotion, re-run a quality gate after fixing failures, unblock a blocked promotion after adding tests, or poll/watch an in-progress run. DO NOT TRIGGER when: running sf apex run test directly (use platform-apex-test-run), or configuring a NEW gate or threshold (use dx-devops-test-pipeline-configure).

仅含说明DevOps & Cloud
AI 生成的概览

在流水线阶段触发并轮询 DevOps Center 测试套件运行,然后把失败交给分析环节。

功能
该技能在流水线阶段为 Pre-Promote、Post-Promote 或 Review 事件触发 DevOps Center 测试套件执行,在此之前会展示配置摘要并取得用户的明确确认。随后它按各提供方对应的间隔通过 runId 轮询运行,直到运行通过、失败、出错或超时,并展示覆盖率、成功与失败数量以及质量门状态。它还能在修复后重新触发质量门,但仅在覆盖率满足所配置阈值时才会执行。失败会移交给单独的失败分析技能。
适用场景
当用户想要在某个阶段运行、启动或发起测试套件,在提升前后执行测试,或持续观察正在进行的运行直至完成时,可使用该技能。它也适用于修复失败后重新运行质量门,或在补充测试后解除被阻塞的提升。它不适用于直接运行 sf apex run test,也不适用于配置新的质量门或阈值。
运行要求
需要 Salesforce CLI(sf)2.67.0 或更高版本、Salesforce API v67.0 或更高版本,以及已通过身份验证的 DevOps Center 组织别名。需要已确认的 pipelineId、stageId、事件和测试套件 ID。该技能不附带脚本,仅为说明文档,并包含关于前置条件、轮询、重新触发模式和错误处理的参考文档。

Run a DevOps Center Test Suite

Triggers a DevOps Center test suite execution and watches it to completion. Running and polling are two halves of one operation — never poll without first having (or being handed) a runId.

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. Always query the org with sf data query or sf api request rest.


Prerequisites

Run the prerequisite checks in references/prerequisite-checks.md — Prerequisites 1–4 and Prerequisite 5 (stage), since this skill operates on a specific stage. You need the confirmed doce-org-alias, pipelineId, and stageId.

Inputs required

InputHow to obtain
pipelineIdPrerequisite 4 (pipeline selection)
stageIdPrerequisite 5 (pipeline stage confirmation)
eventConfirm with user: Pre-Promote, Post-Promote, or Review
testSuiteIdsConfirmed suite IDs from selection or recommendation
doce-org-aliasPrerequisite 1

Step 1 — Trigger execution

Confirmation gate

This call mutates org state — do not proceed without explicit user confirmation. Before calling the API, show:

"I'm about to run tests with the following configuration:

  • Pipeline: <pipelineName>
  • Stage: <stageName>
  • Event: <event>
  • Suite(s): <suiteName(s)>
  • Org: <doce-org-alias>

Shall I proceed?"

Do not make the API call until the user confirms.

API call

bash
sf api request rest \  "/services/data/v67.0/connect/devopstesting/pipeline/<pipelineId>/stage/execute" \  --method POST \  --body '{    "stageId": "<stageId>",    "event": "<event>",    "testSuiteIds": ["<suiteId1>", "<suiteId2>"]  }' \  --target-org <doce-org-alias>
FieldTypeDescription
stageIdstringThe ID of the pipeline stage to execute tests on
eventstringPre-Promote, Post-Promote, or Review
testSuiteIdsstring[]One or more test suite IDs to execute

On success

Extract the runId (execution ID) from the response. Inform the user:

"Tests are running in <doce-org-alias>. I'll update you when results are ready."

Then proceed immediately to Step 2 (polling) with the runId.

On error

See references/error-handling.md. If the org rejects execution (e.g. environmentId: null, or classIdList is null or empty — no tests to execute), read the actual error, explain the root cause and required fix in plain language, and finish cleanly. Do not retry in a loop and do not fabricate a runId or results.


Step 2 — Poll until completion

Confirmation required: No — polling is automatic and read-only.

Poll the execution record by runId at the provider-appropriate interval. Full intervals, timeout behavior, and the poll query are in references/polling-configuration.md.

Summary of the loop (the runId is a DevopsTestSuiteExecution Id — poll that object, not DevopsTestExecution):

  • Query DevopsTestSuiteExecution by runId each interval for Status, Coverage, SuccessCount, FailureCount, QualityGateStatus.
  • InProgress → wait and poll again.
  • Passed / Failed → surface Coverage, SuccessCount, FailureCount, and QualityGateStatus inline (no raw JSON). If FailureCount > 0, fetch the child DevopsTestExecution failure rows and hand off to dx-devops-test-failures-analyze.
  • Error → the run itself errored (not test failures); surface ResultDetails/Message in plain language and offer retry or skip.
  • Timeout → surface the runId, do NOT auto-retry, wait for user instruction.

Retrigger mode (re-running a quality gate)

Use when a promotion was blocked by a gate failure and the coverage gap has since been addressed. All preconditions, gate, and the retrigger API call are in references/retrigger-mode.md. Key rule: do not retrigger unless the latest Coverage meets or exceeds the DevopsQualityGateRule threshold. After the retrigger returns a new runId, hand it to Step 2 (polling).


Related skills

  • dx-devops-test-failures-analyze — receives the failure payload on completion; can also create a fix work item.
  • dx-devops-test-suite-assignments-configure — recommend which suites to run, or assign a suite to the stage if it isn't linked yet.
  • dx-devops-test-pipeline-configure — configure a new quality gate or threshold (this skill only re-runs existing gates).

来源与署名

来源:forcedotcom/sf-skills位于skills/dx-devops-test-suite-run提交e5164d9

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 forcedotcom/sf-skills 的技能

Service Itsm Teams Itservice Configure

forcedotcom

Configure the "Set Up Salesforce IT Service" checklist for Microsoft Teams Employee Service (ITSM) — the employee side, covering app enablement, marketplace install guidance, user access assignment, and Digital Experience Site selection. Use this for: 'turn on Salesforce IT Service', 'set up IT Service on Teams', 'assign Teams for Employee permission set', 'give employees access to Teams for Employee Service', 'manage user access for Teams ITSM', 'grant users the permission sets needed for Teams Employee Service', 'select a digital experience site for Teams', 'install Salesforce IT Service app on Teams', or any request to complete the IT Service half of the Teams ITSM Go page checklist (including the Manage User Access step). DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Desk/fulfiller half of the checklist (service-itsm-teams-itdesk-configure).

待分类1K昨天更新

Service Itsm Teams Coordinate

forcedotcom

End-to-end autopilot orchestrator for setting up Microsoft Teams integration in Salesforce Service Cloud ITSM — runs the whole flow (enable the Teams for Employee Service Go feature, register the Microsoft Entra app, populate Named Credentials, configure the IT Desk and IT Service checklists, turn on Swarming, and optionally embed the Agentforce agent) in one continuous pass, stopping only at the points a human must act. Use when the user asks to set up Microsoft Teams for ITSM end to end, 'set up teams for it service', 'do the whole teams itsm setup', 'configure microsoft teams for employee service', or wants a guided Teams ITSM walkthrough. Delegates each stage to a specialized child skill while driving the sequence itself. DO NOT TRIGGER when the user asks to enable Teams alone, configure just the IT Desk or IT Service checklist alone, or enable Swarming alone — delegate directly to the specific child skill in those cases.

待分类1K昨天更新

Service Itsm Teams Itdesk Configure

forcedotcom

Configure the "Set Up Salesforce IT Desk" checklist for Microsoft Teams Employee Service (ITSM) — the fulfiller/agent side, covering app enablement, marketplace install guidance, user access assignment, and Swarming collaboration-tool setup. Use this for: 'turn on Salesforce IT Desk', 'set up IT Desk on Teams', 'assign Teams for IT Desk permission set', 'set Teams as collaboration tool for swarming', 'install Salesforce IT Desk app on Teams', or any request to complete the IT Desk half of the Teams ITSM Go page checklist. DO NOT TRIGGER for the base Teams Salesforce Go page toggle or Azure/Entra app setup (service-itsm-teams-configure) or for the IT Service/employee half of the checklist (service-itsm-teams-itservice-configure).

待分类1K昨天更新

Service Itsm Teams Debug

forcedotcom

通过针对 Salesforce 组织运行通过/失败配置检查清单,诊断 Microsoft Teams 员工服务(ITSM)配置故障。

DevOps & Cloud1K昨天更新

Service Itsm Teams Employee Agent Configure

forcedotcom

Configure the embedded Agentforce Employee Agent so it replies inside the Microsoft Teams ITSM custom client ('Salesforce Employee Assist' / 'Ask AI Agent'). Use this for: 'set up employee agent in Teams', 'embed Agentforce agent in Teams', 'make the IT Service Employee Agent reply in Teams', 'Teams Ask AI Agent not responding', 'agent joins then leaves without replying', 'configure MIAW deployment for Teams employee agent', 'Teams embedded messaging agent setup'. Builds the whole stack headlessly (zero Setup-UI clicks): the Web messaging channel with User Verification ON, the Enhanced Chat User Verification Key Set (JWKS_URL) it requires, the Teams_AgentForce custom-client deployment, the routing flow to the agent, and the Agent Access permission set that lets the portal user reach the agent. DO NOT TRIGGER for enabling the Teams feature Salesforce Go page toggle (service-itsm-teams-configure) or for configuring notification preferences.

待分类1K昨天更新

Service Itsm Swarming Configure

forcedotcom

通过 Connect API 调用启用 Salesforce Swarming ITSM 功能,并将协作工具设为 Teams。

DevOps & Cloud1K昨天更新