afv-library/skills/testing-agentforce/assets/basic-test-spec.yaml
Steve Hetzel dca920f42e
Complete topic-to-subagent terminology update across skills
Comprehensive update replacing "topic" with "subagent" terminology throughout
the developing-agentforce and testing-agentforce skills to align with Agent
Script's `subagent` block naming.

Key changes:
- "Topic Selector" → "Subagent Router" in all agent templates and docs
- "Topic/action" → "Subagent/action" in documentation
- "Topic map" → "Subagent map" in diagram references
- Updated all architecture documentation to use "subagent" terminology
- Updated 19 .agent template files with new labels and comments
- Updated 8 reference documentation files with consistent terminology

API contract preservation:
- Test spec YAML files preserve "topic" terminology to match Testing Center API
- Added clarifying comments explaining topic/subagent equivalence in YAML files
- Field names like `expectedTopic` unchanged (Salesforce API requirement)

Preserved terms:
- "off-topic" (standard phrase for out-of-scope)
- "expectedTopic" field (Testing Center API)
- "platform topics" (Salesforce guardrail features)

32 files changed, 379 insertions(+), 366 deletions(-)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-04-24 10:00:40 -06:00

64 lines
3.6 KiB
YAML

# Basic Test Specification Template
# Compatible with: sf agent test create --spec <file> --api-name <name>
#
# Usage:
# 1. Replace <placeholders> with actual values
# 2. Create: sf agent test create --spec basic-test-spec.yaml --api-name <Test_Name> --target-org <alias>
# 3. Run: sf agent test run --api-name <Test_Name> --wait 10 --result-format json --target-org <alias>
#
# 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: "<Agent_Name> Basic Tests"
# Required: Must be AGENT
subjectType: AGENT
# Required: Agent BotDefinition DeveloperName (API name)
subjectName: <Agent_Name>
testCases:
# ═══════════════════════════════════════════════════════════════
# TOPIC ROUTING TESTS
# Test that user messages route to the correct topic
# ═══════════════════════════════════════════════════════════════
- utterance: "<User message that should trigger primary topic>"
expectedTopic: <topic_name>
- utterance: "<User message that should trigger secondary topic>"
expectedTopic: <another_topic_name>
# ═══════════════════════════════════════════════════════════════
# ACTION INVOCATION TESTS
# expectedActions is a FLAT list of action name strings
# ═══════════════════════════════════════════════════════════════
- utterance: "<User message that should trigger action>"
expectedTopic: <topic_name>
expectedActions:
- <action_name>
# ═══════════════════════════════════════════════════════════════
# OUTCOME VALIDATION TESTS
# expectedOutcome is optional — omitting causes harmless ERROR
# in output_validation (test still passes topic/action checks)
# ═══════════════════════════════════════════════════════════════
- utterance: "<User message with expected outcome>"
expectedTopic: <topic_name>
expectedOutcome: "Agent should provide a helpful response about <topic>"
# ═══════════════════════════════════════════════════════════════
# ESCALATION TEST
# Standard topics like Escalation use localDeveloperName
# ═══════════════════════════════════════════════════════════════
- utterance: "I want to talk to a real person"
expectedTopic: Escalation