<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macOS: 27.3.0 -",
    "visionOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SiriEvaluations",
  "identifier" : "/documentation/SiriEvaluations/SiriService/run(scenario:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Siri Evaluations"
    ],
    "preciseIdentifier" : "s:15SiriEvaluations0A7ServiceO3run8scenarioAA0A15ScenarioSubjectVAA0aF0V_tYaKFZ"
  },
  "title" : "run(scenario:)"
}
-->

# run(scenario:)

Runs a scenario through Siri and returns what Siri did, for your evaluation to grade.

```
static func run(scenario: SiriScenario) async throws -> SiriScenarioSubject
```

## Discussion

Call it from your evaluation’s `subject(from:)`, with any setup the scenario needs before it. If you
clean up after it, record a failure instead of throwing: a `subject(from:)` that throws discards the
run, so the scenario drops out of every average. It runs only in a UI test target.

If the run stops partway, the turns that ran are graded and the report’s Diagnostics shows how
many completed. If it can’t start, it throws.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)