@@ -98,6 +98,26 @@ service Environments {
9898 };
9999 option (google.api.method_signature ) = "name" ;
100100 }
101+
102+ // Kicks off a continuous test under the specified [Environment][google.cloud.dialogflow.cx.v3.Environment].
103+ rpc RunContinuousTest (RunContinuousTestRequest ) returns (google.longrunning.Operation ) {
104+ option (google.api.http ) = {
105+ post : "/v3/{environment=projects/*/locations/*/agents/*/environments/*}:runContinuousTest"
106+ body : "*"
107+ };
108+ option (google.longrunning.operation_info ) = {
109+ response_type : "RunContinuousTestResponse"
110+ metadata_type : "RunContinuousTestMetadata"
111+ };
112+ }
113+
114+ // Fetches a list of continuous test results for a given environment.
115+ rpc ListContinuousTestResults (ListContinuousTestResultsRequest ) returns (ListContinuousTestResultsResponse ) {
116+ option (google.api.http ) = {
117+ get : "/v3/{parent=projects/*/locations/*/agents/*/environments/*}/continuousTestResults"
118+ };
119+ option (google.api.method_signature ) = "parent" ;
120+ }
101121}
102122
103123// Represents an environment for an agent. You can create multiple versions
@@ -261,3 +281,96 @@ message LookupEnvironmentHistoryResponse {
261281 // results in the list.
262282 string next_page_token = 2 ;
263283}
284+
285+ // Represents a result from running a test case in an agent environment.
286+ message ContinuousTestResult {
287+ option (google.api.resource ) = {
288+ type : "dialogflow.googleapis.com/ContinuousTestResult"
289+ pattern : "projects/{project}/locations/{location}/agents/{agent}/environments/{environment}/continuousTestResults/{continuous_test_result}"
290+ };
291+
292+ // The overall result for a continuous test run in an agent environment.
293+ enum AggregatedTestResult {
294+ // Not specified. Should never be used.
295+ AGGREGATED_TEST_RESULT_UNSPECIFIED = 0 ;
296+
297+ // All the tests passed.
298+ PASSED = 1 ;
299+
300+ // At least one test did not pass.
301+ FAILED = 2 ;
302+ }
303+
304+ // The resource name for the continuous test result. Format:
305+ // `projects/<Project ID>/locations/<Location ID>/agents/<Agent
306+ // ID>/environments/<Environment
307+ // ID>/continuousTestResults/<ContinuousTestResult ID>`.
308+ string name = 1 ;
309+
310+ // The result of this continuous test run, i.e. whether all the tests in this
311+ // continuous test run pass or not.
312+ AggregatedTestResult result = 2 ;
313+
314+ // A list of individual test case results names in this continuous test run.
315+ repeated string test_case_results = 3 [(google.api.resource_reference ) = {
316+ type : "dialogflow.googleapis.com/TestCaseResult"
317+ }];
318+
319+ // Time when the continuous testing run starts.
320+ google.protobuf.Timestamp run_time = 4 ;
321+ }
322+
323+ // The request message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3.Environments.RunContinuousTest].
324+ message RunContinuousTestRequest {
325+ // Required. Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
326+ // ID>/environments/<Environment ID>`.
327+ string environment = 1 [
328+ (google.api.field_behavior ) = REQUIRED ,
329+ (google.api.resource_reference ) = {
330+ type : "dialogflow.googleapis.com/Environment"
331+ }
332+ ];
333+ }
334+
335+ // The response message for [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3.Environments.RunContinuousTest].
336+ message RunContinuousTestResponse {
337+ // The result for a continuous test run.
338+ ContinuousTestResult continuous_test_result = 1 ;
339+ }
340+
341+ // Metadata returned for the [Environments.RunContinuousTest][google.cloud.dialogflow.cx.v3.Environments.RunContinuousTest] long running
342+ // operation.
343+ message RunContinuousTestMetadata {
344+ // The test errors.
345+ repeated TestError errors = 1 ;
346+ }
347+
348+ // The request message for [Environments.ListContinuousTestResults][google.cloud.dialogflow.cx.v3.Environments.ListContinuousTestResults].
349+ message ListContinuousTestResultsRequest {
350+ // Required. The environment to list results for.
351+ // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/
352+ // environments/<Environment ID>`.
353+ string parent = 1 [
354+ (google.api.field_behavior ) = REQUIRED ,
355+ (google.api.resource_reference ) = {
356+ child_type : "dialogflow.googleapis.com/ContinuousTestResult"
357+ }
358+ ];
359+
360+ // The maximum number of items to return in a single page. By default 100 and
361+ // at most 1000.
362+ int32 page_size = 2 ;
363+
364+ // The next_page_token value returned from a previous list request.
365+ string page_token = 3 ;
366+ }
367+
368+ // The response message for [Environments.ListTestCaseResults][].
369+ message ListContinuousTestResultsResponse {
370+ // The list of continuous test results.
371+ repeated ContinuousTestResult continuous_test_results = 1 ;
372+
373+ // Token to retrieve the next page of results, or empty if there are no more
374+ // results in the list.
375+ string next_page_token = 2 ;
376+ }
0 commit comments