Run local conversation tests
cs_run_conversation_testsRun YAML conversation tests against a published Copilot Studio agent to verify wording and tool usage, reporting pass/fail with observed topic, tool, and citations.
Instructions
Run a YAML test file (tests: name, utterance, expect, continueConversation) against the published agent through cs_chat and report pass/fail. expect asserts on wording (contains, containsAny, notContains, regex, minLength, noSignIn) and on what the agent did (usedTool, notUsedTool, usedTopic, notUsedTopic, citedKnowledge), so a test can tell a real tool call from an answer that merely sounds right. Every result reports the observed topic, tool and citations whether or not it asserted on them. The CLI-native complement to portal evaluations. Pass writeExample to create a starter file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| botId | No | Agent (bot) id. Defaults to workspace sync metadata or CPS_AGENT_ID. | |
| tests | No | ||
| clientId | No | Entra app (client) id for MSAL. Defaults to CPS_CLIENT_ID, then the first-party VS Code id. | |
| tenantId | No | Entra tenant id. Defaults to the workspace sync metadata, then CPS_TENANT_ID. | |
| transport | No | auto detects the agent's authentication mode via Dataverse; directline for no-auth/manual-auth agents; sdk for Entra SSO agents | |
| workspace | No | Path to (or inside) the agent workspace. Defaults to CPS_WORKSPACE or the current directory. | |
| schemaName | No | ||
| stopOnFail | No | ||
| dataverseUrl | No | ||
| writeExample | No | Path to write an example test file, then return | |
| environmentId | No | Power Platform environment id (GUID). Defaults to workspace sync metadata or CPS_ENVIRONMENT_ID. | |
| tokenEndpoint | No | Explicit DirectLine token endpoint | |
| conversationId | No | Continue an earlier conversation from cs_chat | |
| directLineSecret | No |