# Basic Test Specification Template # Compatible with: sf agent test create --spec --api-name # # Usage: # 1. Replace with actual values # 2. Create: sf agent test create --spec basic-test-spec.yaml --api-name --target-org # 3. Run: sf agent test run --api-name --wait 10 --result-format json --target-org # # IMPORTANT: This YAML is parsed by @salesforce/agents — NOT a generic AiEvaluationDefinition format. # Only the fields below are recognized. Do NOT add apiVersion, kind, metadata, or settings. # # NOTE: The Testing Center API uses "topic" terminology. In Agent Script, topics are called # "subagents" (e.g., the `subagent` block). When writing tests, use "topic" to match the API, # but understand that each expectedTopic value maps to a subagent in your .agent file. # Required: Display name for the test (MasterLabel) — deploy FAILS without this name: " Basic Tests" # Required: Must be AGENT subjectType: AGENT # Required: Agent BotDefinition DeveloperName (API name) subjectName: testCases: # ═══════════════════════════════════════════════════════════════ # TOPIC ROUTING TESTS # Test that user messages route to the correct topic # ═══════════════════════════════════════════════════════════════ - utterance: "" expectedTopic: - utterance: "" expectedTopic: # ═══════════════════════════════════════════════════════════════ # ACTION INVOCATION TESTS # expectedActions is a FLAT list of action name strings # ═══════════════════════════════════════════════════════════════ - utterance: "" expectedTopic: expectedActions: - # ═══════════════════════════════════════════════════════════════ # OUTCOME VALIDATION TESTS # expectedOutcome is optional — omitting causes harmless ERROR # in output_validation (test still passes topic/action checks) # ═══════════════════════════════════════════════════════════════ - utterance: "" expectedTopic: expectedOutcome: "Agent should provide a helpful response about " # ═══════════════════════════════════════════════════════════════ # ESCALATION TEST # Standard topics like Escalation use localDeveloperName # ═══════════════════════════════════════════════════════════════ - utterance: "I want to talk to a real person" expectedTopic: Escalation