Repository navigation
feat: run conversation-level test specs with agent test run --spec @W-24861403@ #520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
balajisrinivasan09
wants to merge
6
commits into
main
Choose a base branch
from
bsrinivasan/W-24861403-clt-run
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4f8b4dc
feat: run conversation-level test specs with agent test run --spec (W…
balajisrinivasan09 524128d
test: stringify warn args before join in express-context delete test
balajisrinivasan09 3f4a8e3
fix: read conversation scorer outcomes nested under content (W-24861403)
balajisrinivasan09 d3d3c9d
Merge remote-tracking branch 'origin/main' into bsrinivasan/W-2486140…
balajisrinivasan09 6cae4f5
fix: bump @salesforce/agents to 2.6.0 for conversation-level specs (W…
balajisrinivasan09 886e19f
chore: regenerate agent test run schema for agents 2.6.0 (W-24861403)
balajisrinivasan09 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,18 @@ | ||
| { | ||
| "$schema": "http://json-schema.org/draft-07/schema#", | ||
| "$ref": "#/definitions/AgentTestRunResult", | ||
| "$ref": "#/definitions/AgentTestRunCommandResult", | ||
| "definitions": { | ||
| "AgentTestRunCommandResult": { | ||
| "anyOf": [ | ||
| { | ||
| "$ref": "#/definitions/AgentTestRunResult" | ||
| }, | ||
| { | ||
| "$ref": "#/definitions/ConversationTestRunResult" | ||
| } | ||
| ], | ||
| "description": "`--api-name` starts (and with `--wait`, polls) a saved test; `--spec` runs a conversation-level spec without saving." | ||
| }, | ||
| "AgentTestRunResult": { | ||
| "anyOf": [ | ||
| { | ||
|
|
@@ -33,10 +44,7 @@ | |
| } | ||
| } | ||
| }, | ||
| "required": [ | ||
| "runId", | ||
| "status" | ||
| ] | ||
| "required": ["runId", "status"] | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 to the Trust Agent note: most of this file is a formatting change. Regenerating it without the reflow would shrink the diff down to the new |
||
| }, | ||
| { | ||
| "type": "object", | ||
|
|
@@ -67,13 +75,7 @@ | |
| } | ||
| } | ||
| }, | ||
| "required": [ | ||
| "runId", | ||
| "startTime", | ||
| "status", | ||
| "subjectName", | ||
| "testCases" | ||
| ] | ||
| "required": ["runId", "startTime", "status", "subjectName", "testCases"] | ||
| }, | ||
| { | ||
| "type": "object", | ||
|
|
@@ -93,23 +95,13 @@ | |
| } | ||
| } | ||
| }, | ||
| "required": [ | ||
| "runId", | ||
| "status", | ||
| "testCases" | ||
| ] | ||
| "required": ["runId", "status", "testCases"] | ||
| } | ||
| ] | ||
| }, | ||
| "TestStatus": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "NEW", | ||
| "IN_PROGRESS", | ||
| "COMPLETED", | ||
| "ERROR", | ||
| "TERMINATED" | ||
| ] | ||
| "enum": ["NEW", "IN_PROGRESS", "COMPLETED", "ERROR", "TERMINATED"] | ||
| }, | ||
| "TestCaseResult": { | ||
| "type": "object", | ||
|
|
@@ -130,9 +122,7 @@ | |
| "type": "string" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "utterance" | ||
| ], | ||
| "required": ["utterance"], | ||
| "additionalProperties": false | ||
| }, | ||
| "generatedData": { | ||
|
|
@@ -157,13 +147,7 @@ | |
| "type": "string" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "actionsSequence", | ||
| "invokedActions", | ||
| "sessionId", | ||
| "outcome", | ||
| "topic" | ||
| ], | ||
| "required": ["actionsSequence", "invokedActions", "sessionId", "outcome", "topic"], | ||
| "additionalProperties": false | ||
| }, | ||
| "testResults": { | ||
|
|
@@ -184,22 +168,12 @@ | |
| "type": "number" | ||
| }, | ||
| "result": { | ||
| "type": [ | ||
| "null", | ||
| "string" | ||
| ], | ||
| "enum": [ | ||
| null, | ||
| "PASS", | ||
| "FAILURE" | ||
| ] | ||
| "type": ["null", "string"], | ||
| "enum": [null, "PASS", "FAILURE"] | ||
| }, | ||
| "metricLabel": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "Accuracy", | ||
| "Precision" | ||
| ] | ||
| "enum": ["Accuracy", "Precision"] | ||
| }, | ||
| "metricExplainability": { | ||
| "type": "string" | ||
|
|
@@ -238,14 +212,7 @@ | |
| "type": "number" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "status", | ||
| "startTime", | ||
| "inputs", | ||
| "generatedData", | ||
| "testResults", | ||
| "testNumber" | ||
| ], | ||
| "required": ["status", "startTime", "inputs", "generatedData", "testResults", "testNumber"], | ||
| "additionalProperties": false | ||
| }, | ||
| "AgentforceStudioTestCaseResult": { | ||
|
|
@@ -264,11 +231,7 @@ | |
| } | ||
| } | ||
| }, | ||
| "required": [ | ||
| "subjectResponse", | ||
| "testNumber", | ||
| "testScorerResults" | ||
| ], | ||
| "required": ["subjectResponse", "testNumber", "testScorerResults"], | ||
| "additionalProperties": false | ||
| }, | ||
| "TestScorerResult": { | ||
|
|
@@ -281,11 +244,105 @@ | |
| "type": "string" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "scorerName", | ||
| "scorerResponse" | ||
| ], | ||
| "required": ["scorerName", "scorerResponse"], | ||
| "additionalProperties": false | ||
| }, | ||
| "ConversationTestRunResult": { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "status": { | ||
| "type": "string", | ||
| "const": "COMPLETED" | ||
| }, | ||
| "testScope": { | ||
| "type": "string", | ||
| "const": "CONVERSATION_LEVEL" | ||
| }, | ||
| "runStatus": { | ||
| "type": "string", | ||
| "description": "The server's run status: `Completed` or `Failed`." | ||
| }, | ||
| "errorRepresentation": { | ||
| "type": "object", | ||
| "properties": { | ||
| "errorCode": { | ||
| "type": "string" | ||
| }, | ||
| "errorMessage": { | ||
| "type": "string" | ||
| }, | ||
| "retryable": { | ||
| "type": "boolean" | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "summary": { | ||
| "type": "object", | ||
| "additionalProperties": { | ||
| "anyOf": [ | ||
| { | ||
| "not": {} | ||
| }, | ||
| { | ||
| "type": "number" | ||
| } | ||
| ] | ||
| }, | ||
| "properties": { | ||
| "totalNumberOfTestCases": { | ||
| "type": "number" | ||
| }, | ||
| "taskResolutionPassPercent": { | ||
| "type": "number" | ||
| }, | ||
| "acceptanceCriteriaPassPercent": { | ||
| "type": "number" | ||
| } | ||
| }, | ||
| "description": "Omitted until the run is complete." | ||
| }, | ||
| "testCases": { | ||
| "type": "array", | ||
| "items": { | ||
| "$ref": "#/definitions/ConversationTestCaseResult" | ||
| } | ||
| } | ||
| }, | ||
| "required": ["runStatus", "status", "testCases", "testScope"], | ||
| "description": "`agent test run --spec` result: a conversation-level run without saving a suite." | ||
| }, | ||
| "ConversationTestCaseResult": { | ||
| "type": "object", | ||
| "properties": { | ||
| "testNumber": { | ||
| "type": "number", | ||
| "description": "The 1-based `number` sent in the request." | ||
| }, | ||
| "subjectResponse": { | ||
| "type": "string", | ||
| "description": "JSON string: the simulated conversation (turns, topics, actions, completion reason)." | ||
| }, | ||
| "testScorerResults": { | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "properties": { | ||
| "scorerName": { | ||
| "type": "string" | ||
| }, | ||
| "scorerResponse": { | ||
| "type": "string" | ||
| } | ||
| }, | ||
| "required": ["scorerName"], | ||
| "additionalProperties": false | ||
| } | ||
| } | ||
| }, | ||
| "required": ["testNumber"], | ||
| "additionalProperties": false | ||
| } | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: a turn-level spec doesn't have to be deployed to run.