Some products and features are in the process of being renamed. Generative playbook and flow features are also being migrated to a single consolidated console. See the details.
Required. Format of test case name to run: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>.
Authorization requires the following IAM permission on the specified resource name:
dialogflow.testcases.run
Request body
The request body contains data with the following structure:
JSON representation
{"environment": string}
Fields
environment
string
Optional. Environment name. If not set, draft environment is assumed. Format: projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>.
Response body
If successful, the response body contains an instance of Operation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[[["\u003cp\u003eThis method initiates a test case run, which is a long-running operation, returning an \u003ccode\u003eOperation\u003c/code\u003e with \u003ccode\u003eRunTestCaseMetadata\u003c/code\u003e and \u003ccode\u003eRunTestCaseResponse\u003c/code\u003e fields.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request is a POST method using a specific URL format that includes the test case's name as a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe required \u003ccode\u003ename\u003c/code\u003e parameter in the URL specifies the test case to be run, and its format is \u003ccode\u003eprojects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can optionally contain an \u003ccode\u003eenvironment\u003c/code\u003e field, where if not specified, it defaults to the draft environment.\u003c/p\u003e\n"],["\u003cp\u003eThe call requires specific OAuth scopes, namely either \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.agents.testCases.run\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nKicks off a test case run.\n\nThis method is a [long-running operation](https://cloud.google.com/dialogflow/cx/docs/how/long-running-operation). The returned `Operation` type has the following method-specific fields:\n\n- `metadata`: [RunTestCaseMetadata](/dialogflow/cx/docs/reference/rest/v3/RunTestCaseMetadata)\n- `response`: [RunTestCaseResponse](/dialogflow/cx/docs/reference/rest/v3/RunTestCaseResponse)\n\n### HTTP request\n\n`POST https://{endpoint}/v3/{name=projects/*/locations/*/agents/*/testCases/*}:run`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/cx/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/dialogflow/cx/docs/reference/rest/v3/projects.locations.operations#Operation).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/dialogflow`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]