polling-test-results
About polling-test-results
A skill that tracks asynchronous DevOps Center test executions until completion, timeout, or failure. It adjusts polling intervals and wait limits by test type, then passes completed results to a failure-analysis skill.
Key features
- 01Polls execution status by run ID
- 02Adjusts polling by test type
- 03Handles completion, failure, and timeout
- 04Passes results for failure analysis
Use cases
- 01Monitoring a newly started test run
- 02Checking whether a long-running test has finished
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ forcedotcom/ sf-skills --skill polling-test-resultsAfter installing, type/polling-test-resultsin Claude Code to confirm it loaded.
Details
From the project READMEpolling-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
| Input | Source |
|---|---|
runId | Returned by the running-devops-test-suite skill |
testType | Derived from the suite's test provider (Apex, Code Analyzer, UI/Provar, Flow) |
doce-org-alias | Established via checking-devops-prerequisites |
Polling configuration
| Test type | Poll interval | Max wait | Timeout action |
|---|---|---|---|
| Apex unit tests | 15 seconds | 5 minutes | Surface runId, offer retry |
| Code Analyzer | 10 seconds | 3 minutes | Surface runId, offer retry |
| UI tests (Provar) | 60 seconds | 20 minutes | Surface runId, mark as pending |
| Flow tests | 20 seconds | 8 minutes | Surface 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 againCompleted→ proceed to result analysisFailed→ 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