skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
forcedotcom/sf-skills264 installs

polling-test-results

Polls a DevOps Center async test execution by runId until it completes, fails, or times out — using read-only SOQL on the execution record at provider-specific intervals (Apex 15s/5m, Code Analyzer 10s/3m, Provar UI 60s/20m, Flow 20s/8m) — then surfaces results. Use this skill when a test suite run is in progress and the user is waiting on results, or immediately after running a suite. TRIGGER when: a test suite run is in progress and the user is waiting on results, or immediately after running a suite and a runId is available. DO NOT TRIGGER when: there is no active runId.

How do I install this agent skill?

npx skills add https://github.com/forcedotcom/sf-skills --skill polling-test-results
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill is safe. It automates polling for Salesforce DevOps Center test results using the official Salesforce CLI (sf). It performs read-only queries and does not exhibit any malicious patterns or unauthorized data access.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

polling-test-results

Confirmation required: No — polling is automatic and read-only. No user confirmation gate is needed.

What it does: Polls the DevOps Center org for the status of an async test execution until it completes, times out, or fails.


Prerequisites

You need an active runId (returned by the running-devops-test-suite skill) and the confirmed doce-org-alias. If org context is not yet established, load checking-devops-prerequisites first (Prerequisites 1–3).


Inputs required

InputSource
runIdReturned by the running-devops-test-suite skill
testTypeDerived from the suite's test provider (Apex, Code Analyzer, UI/Provar, Flow)
doce-org-aliasEstablished via checking-devops-prerequisites

Polling configuration

Test typePoll intervalMax waitTimeout action
Apex unit tests15 seconds5 minutesSurface runId, offer retry
Code Analyzer10 seconds3 minutesSurface runId, offer retry
UI tests (Provar)60 seconds20 minutesSurface runId, mark as pending
Flow tests20 seconds8 minutesSurface runId, offer retry

Poll query

Query the execution record by runId on each interval:

sf data query \
  --query "SELECT Id, Status, TestsRan, TestsPassed, TestsFailed, CoveragePercentage FROM DevopsTestExecution WHERE Id = '<runId>' LIMIT 1" \
  --target-org <doce-org-alias> \
  --json

Check the Status field on each poll:

  • Queued / Running → wait and poll again
  • Completed → proceed to result analysis
  • Failed → surface error and offer retry or skip

On timeout

Surface the runId to the user:

"The test run is taking longer than expected. Your run ID is <runId>. You can check the status manually in DevOps Center, or I can keep waiting — what would you prefer?"

Do not automatically retry after timeout. Wait for user instruction.

On completion

Pass the full result payload to the analyzing-test-failures skill for reasoning. Surface Coverage, SuccessCount, FailureCount, and QualityGateStatus inline. Do not surface raw JSON to the user.


Related skills

  • Runs are started by running-devops-test-suite (including its retrigger mode)
  • Failure analysis is handled by analyzing-test-failures

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/forcedotcom/sf-skills/polling-test-results">View polling-test-results on skillZs</a>