configuring-test-provider
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseConfiguring a Test Provider
配置测试提供商
Configures an available test provider on a DevOps Center pipeline, making its test suites available for assignment to pipeline stages.
Confirmation required: Yes — explicit confirmation before the provider is configured.
在DevOps Center流水线中配置可用的测试提供商,使其测试套件可分配至流水线阶段。
需要确认: 是 — 在配置提供商前需获得用户明确确认。
Prerequisites
前提条件
Load first — Prerequisites 1–4 (org login, Agentforce DX plugin, DevOps Center org auth, pipeline identified). Prerequisite 5 (stage) is not required: providers are configured at the pipeline level, not the stage level.
checking-devops-prerequisites| Variable | Source |
|---|---|
| Established in Prerequisite 1 |
| Identified in Prerequisite 4 (pipeline selection) |
| Resolved by fetching the pipeline's test providers (below) |
首先加载 — 前提条件1–4(组织登录、Agentforce DX插件、DevOps Center组织授权、流水线已确定)。前提条件5(阶段)不需要:提供商是在流水线级别配置,而非阶段级别。
checking-devops-prerequisites| 变量 | 来源 |
|---|---|
| 在前提条件1中确立 |
| 在前提条件4(流水线选择)中确定 |
| 通过获取流水线的测试提供商(如下)解析得到 |
Step 1 — Fetch test providers to resolve the provider ID
步骤1 — 获取测试提供商以解析提供商ID
Get all test providers for the pipeline so you can resolve the and confirm which providers are still available to configure:
testProviderIdbash
sf api request rest \
"/services/data/v67.0/connect/devopstesting/pipeline/<pipelineId>/testProviders?status=all" \
--target-org <doce-org-alias>Each provider entry includes , , and a status (Configured vs. Available). Present a short summary grouped by status:
testProviderIdtestProviderNametext
Test providers for <pipelineName>:
✓ Configured:
- Code Analyzer (63 suites)
- Apex Unit Tests (5 suites)
Available (not yet configured):
- Flow Tests- Only an Available provider can be configured. If the pipeline has no available providers, report that and stop — do NOT fabricate a provider or ID.
获取流水线的所有测试提供商,以便解析并确认哪些提供商仍可配置:
testProviderIdbash
sf api request rest \
"/services/data/v67.0/connect/devopstesting/pipeline/<pipelineId>/testProviders?status=all" \
--target-org <doce-org-alias>每个提供商条目包含、和状态(已配置 vs 可用)。按状态分组展示简短摘要:
testProviderIdtestProviderNametext
Test providers for <pipelineName>:
✓ Configured:
- Code Analyzer (63 suites)
- Apex Unit Tests (5 suites)
Available (not yet configured):
- Flow Tests- 仅可用提供商可配置。如果流水线没有可用提供商,需告知用户并停止操作 — 请勿虚构提供商或ID。
If the named provider is already Configured
若指定提供商已配置
Do not present the confirmation gate and do not POST to the configure endpoint (Steps 2–3) — that would create a duplicate . Instead:
DevopsPipelineTestProvider- State plainly that the provider is already configured, including its synced suite count and last-sync time if returned (e.g. "Flow Tests is already configured on with 3 suites synced (last sync 2026-06-23).").
<pipelineName> - Diagnose the user's actual goal and redirect by name:
- If the user says the provider's suites don't appear when assigning tests to a stage, this is a stage-assignment gap, not a provider-configuration gap — the suites already exist at the pipeline level; they just need to be linked to the stage. Redirect to .
managing-suite-assignments - If the user expects newly created suites that aren't yet synced, redirect to (re-sync via
syncing-test-providers) to pull them in.POST /connect/devops/sync
- If the user says the provider's suites don't appear when assigning tests to a stage, this is a stage-assignment gap, not a provider-configuration gap — the suites already exist at the pipeline level; they just need to be linked to the stage. Redirect to
- Do not loop back to configuring — finish cleanly after the explanation and redirect.
请勿展示确认环节,也请勿调用配置端点(步骤2–3)—— 否则会创建重复的记录。请执行以下操作:
DevopsPipelineTestProvider- 明确告知用户该提供商已配置,若返回同步套件数量和最后同步时间则一并说明(例如:"Flow Tests已在上配置,已同步3个套件(最后同步时间2026-06-23)。")。
<pipelineName> - 判断用户的实际需求并按名称引导至对应技能:
- 如果用户表示在为阶段分配测试时看不到该提供商的套件,这是阶段分配问题,而非提供商配置问题——套件已在流水线级别存在,只需关联至阶段。引导至****。
managing-suite-assignments - 如果用户希望获取新创建的未同步套件,引导至****(通过
syncing-test-providers重新同步)以拉取这些套件。POST /connect/devops/sync
- 如果用户表示在为阶段分配测试时看不到该提供商的套件,这是阶段分配问题,而非提供商配置问题——套件已在流水线级别存在,只需关联至阶段。引导至**
- 解释并引导后结束操作,请勿回到配置流程。
Step 2 — Confirmation gate
步骤2 — 确认环节
Required — do not call the API before the user confirms.
"I'll configureon the<testProviderName>pipeline. This will make its suites available for assignment to stages. Confirm?"<pipelineName>
Do not proceed until the user gives an affirmative response.
必须执行 — 在用户确认前请勿调用API。
"我将在流水线中配置<pipelineName>。配置完成后,其套件可分配至各个阶段。请确认是否继续?"<testProviderName>
获得用户肯定答复后再继续。
Step 3 — Configure the provider
步骤3 — 配置提供商
On confirmation, call the configure endpoint with the provider ID:
bash
sf api request rest \
"/services/data/v67.0/connect/devops/pipeline/<pipelineId>/testProvider" \
--method POST \
--body '{"testProviderId": "<testProviderId>"}' \
--target-org <doce-org-alias>确认后,调用配置端点并传入提供商ID:
bash
sf api request rest \
"/services/data/v67.0/connect/devops/pipeline/<pipelineId>/testProvider" \
--method POST \
--body '{"testProviderId": "<testProviderId>"}' \
--target-org <doce-org-alias>On success
成功后
"Provideris now configured on the<testProviderName>pipeline. Its suites are available for assignment to stages."<pipelineName>
Newly configured suites can then be assigned to stages with .
managing-suite-assignments"提供商已在<testProviderName>流水线中配置完成。其套件可分配至各个阶段。"<pipelineName>
新配置的套件可通过分配至阶段。
managing-suite-assignmentsCritical gotcha
关键注意事项
This endpoint creates a new provider configuration record (). Use it ONLY to configure a provider for the first time. To re-sync an already-configured provider for new suites, use () — calling this configure endpoint on an already-configured provider produces duplicate records.
POST .../pipeline/<pipelineId>/testProviderDevopsPipelineTestProvidersyncing-test-providersPOST /connect/devops/syncDevopsPipelineTestProviderPOST .../pipeline/<pipelineId>/testProviderDevopsPipelineTestProvidersyncing-test-providersPOST /connect/devops/syncDevopsPipelineTestProviderError Handling
错误处理
Never expose raw API error messages, stack traces, or JSON payloads to the user. Map response status codes to plain-language messages:
| Status | User-facing message |
|---|---|
| 400 | "The request was invalid. Check that the provider ID and pipeline ID are correct." |
| 403 | "You don't have permission to configure test providers on this pipeline." |
| 404 | "The pipeline or test provider was not found." |
| 409 | "That provider appears to already be configured on this pipeline. To pick up new suites, re-sync it instead." |
| 500 | "A server error occurred. Try again in a few minutes." |
请勿向用户展示原始API错误信息、堆栈跟踪或JSON负载。将响应状态码转换为通俗易懂的提示:
| 状态码 | 用户提示信息 |
|---|---|
| 400 | "请求无效。请检查提供商ID和流水线ID是否正确。" |
| 403 | "您没有权限在此流水线上配置测试提供商。" |
| 404 | "未找到该流水线或测试提供商。" |
| 409 | "该提供商似乎已在此流水线上配置。若要获取新套件,请重新同步它。" |
| 500 | "发生服务器错误。请稍后重试。" |
Related skills
相关技能
- — loaded first to establish org and pipeline context.
checking-devops-prerequisites - — once a provider is configured, use this to re-sync it later and pull in newly added suites.
syncing-test-providers - — after configuring a provider, use this to assign or map its suites to a pipeline stage.
managing-suite-assignments - — to recommend which of the newly available suites to run.
recommending-devops-tests
- — 首先加载以确立组织和流水线上下文。
checking-devops-prerequisites - — 提供商配置完成后,可使用此技能重新同步以拉取新增的套件。
syncing-test-providers - — 配置提供商后,可使用此技能将其套件分配或映射至流水线阶段。
managing-suite-assignments - — 推荐应运行哪些新可用的套件。
recommending-devops-tests