Service Client: Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCasesClient

Client stub representing the remote TestCases gRPC service. Delegates call dispatching to Google::gRPC::Client.

target

The endpoint target address. Defaults to dialogflow.googleapis.com:443.

credentials

The authentication credentials provider. Defaults to application default credentials via Google::Auth.

NAME

Google::Cloud::Dialogflow::Cx::V3::TestCase - Compiled Protocol Buffers messages for google/cloud/dialogflow/cx/v3/test_case.proto

SYNOPSIS

use Google::Cloud::Dialogflow::Cx::V3::TestCase;

my $msg = Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCase->new({
    name => $name,
    tags => $tags,
    display_name => $display_name,
    notes => $notes,
});

# Read or update a field
my $val = $msg->name();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCase->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/dialogflow/cx/v3/test_case.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCase

Represents a test case.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The unique identifier of the test case. [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase] will populate the name automatically. Otherwise use format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.

  • $msg->tags() / $msg->tags($value)

    Type: String

    Tags are short descriptions that users may apply to test cases for organizational and filtering purposes. Each tag should start with "#" and has a limit of 30 characters.

  • $msg->display_name() / $msg->display_name($value)

    Type: String

    Required. The human-readable name of the test case, unique within the agent. Limit of 200 characters.

  • $msg->notes() / $msg->notes($value)

    Type: String

    Additional freeform notes about the test case. Limit of 400 characters.

  • $msg->test_config() / $msg->test_config($value)

    Type: Message (Google::Cloud::Dialogflow::Cx::V3::TestCase::TestConfig)

    Config for the test case.

  • $msg->test_case_conversation_turns() / $msg->test_case_conversation_turns($value)

    Type: Message (Google::Cloud::Dialogflow::Cx::V3::TestCase::ConversationTurn)

    The conversation turns uttered when the test case was created, in chronological order. These include the canonical set of agent utterances that should occur when the agent is working properly.

  • $msg->creation_time() / $msg->creation_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    Output only. When the test was created.

  • $msg->last_test_result() / $msg->last_test_result($value)

    Type: Message (Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCaseResult)

    The latest test result.

Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCaseResult

Represents a result from running a test case in an agent environment.

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    The resource name for the test case result. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`.

  • $msg->environment() / $msg->environment($value)

    Type: String

    Environment where the test was run. If not set, it indicates the draft environment.

  • $msg->conversation_turns() / $msg->conversation_turns($value)

    Type: Message (Google::Cloud::Dialogflow::Cx::V3::TestCase::ConversationTurn)

    The conversation turns uttered during the test case replay in chronological order.

  • $msg->test_result() / $msg->test_result($value)

    Type: Enum (Google::Cloud::Dialogflow::Cx::V3::TestResult)

    Whether the test case passed in the agent environment.

  • $msg->test_time() / $msg->test_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    The time that the test was run.

Google::Cloud::Dialogflow::Cx::V3::TestCase::TestConfig

Represents configurations for a test case.

Inherits from Protobuf::Message.

Accessors

  • $msg->tracking_parameters() / $msg->tracking_parameters($value)

    Type: String

    Session parameters to be compared when calculating differences.

  • $msg->flow() / $msg->flow($value)

    Type: String

    Flow name to start the test case with. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.

    Only one of `flow` and `page` should be set to indicate the starting point
    of the test case. If neither is set, the test case will start with start
    page on the default start flow.
  • $msg->page() / $msg->page($value)

    Type: String

    The [page][google.cloud.dialogflow.cx.v3.Page] to start the test case with. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.

    Only one of `flow` and `page` should be set to indicate the starting point
    of the test case. If neither is set, the test case will start with start
    page on the default start flow.

Google::Cloud::Dialogflow::Cx::V3::TestCase::ConversationTurn

One interaction between a human and virtual agent. The human provides some input and the virtual agent provides a response.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::TestRunDifference

The description of differences between original and replayed agent output.

Inherits from Protobuf::Message.

Accessors

Enum: TestRunDifference::DiffType

  • DIFF_TYPE_UNSPECIFIED => 0

  • INTENT => 1

  • PAGE => 2

  • PARAMETERS => 3

  • UTTERANCE => 4

  • FLOW => 5

Google::Cloud::Dialogflow::Cx::V3::TestCase::TransitionCoverage

Transition coverage represents the percentage of all possible page transitions (page-level transition routes and event handlers, excluding transition route groups) present within any of a parent's test cases.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::TransitionRouteGroupCoverage

Transition route group coverage represents the percentage of all possible transition routes present within any of a parent's test cases. The results are grouped by the transition route group.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::IntentCoverage

Intent coverage represents the percentage of all possible intents in the agent that are triggered in any of a parent's test cases.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::CalculateCoverageRequest

The request message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage].

Inherits from Protobuf::Message.

Accessors

Enum: CalculateCoverageRequest::CoverageType

  • COVERAGE_TYPE_UNSPECIFIED => 0

  • INTENT => 1

  • PAGE_TRANSITION => 2

  • TRANSITION_ROUTE_GROUP => 3

Google::Cloud::Dialogflow::Cx::V3::TestCase::CalculateCoverageResponse

The response message for [TestCases.CalculateCoverage][google.cloud.dialogflow.cx.v3.TestCases.CalculateCoverage].

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::ListTestCasesRequest

The request message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The agent to list all pages for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    The maximum number of items to return in a single page. By default 20. Note that when TestCaseView = FULL, the maximum page size allowed is 20. When TestCaseView = BASIC, the maximum page size allowed is 500.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    The next_page_token value returned from a previous list request.

  • $msg->view() / $msg->view($value)

    Type: Enum (Google::Cloud::Dialogflow::Cx::V3::ListTestCasesRequest::TestCaseView)

    Specifies whether response should include all fields or just the metadata.

Enum: ListTestCasesRequest::TestCaseView

  • TEST_CASE_VIEW_UNSPECIFIED => 0

  • BASIC => 1

  • FULL => 2

Google::Cloud::Dialogflow::Cx::V3::TestCase::ListTestCasesResponse

The response message for [TestCases.ListTestCases][google.cloud.dialogflow.cx.v3.TestCases.ListTestCases].

Inherits from Protobuf::Message.

Accessors

  • $msg->test_cases() / $msg->test_cases($value)

    Type: Message (Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCase)

    The list of test cases. There will be a maximum number of items returned based on the page_size field in the request.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    Token to retrieve the next page of results, or empty if there are no more results in the list.

Google::Cloud::Dialogflow::Cx::V3::TestCase::BatchDeleteTestCasesRequest

The request message for [TestCases.BatchDeleteTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchDeleteTestCases].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The agent to delete test cases from. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.

  • $msg->names() / $msg->names($value)

    Type: String

    Required. Format of test case names: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.

Google::Cloud::Dialogflow::Cx::V3::TestCase::CreateTestCaseRequest

The request message for [TestCases.CreateTestCase][google.cloud.dialogflow.cx.v3.TestCases.CreateTestCase].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The agent to create the test case for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.

  • $msg->test_case() / $msg->test_case($value)

    Type: Message (Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCase)

    Required. The test case to create.

Google::Cloud::Dialogflow::Cx::V3::TestCase::UpdateTestCaseRequest

The request message for [TestCases.UpdateTestCase][google.cloud.dialogflow.cx.v3.TestCases.UpdateTestCase].

Inherits from Protobuf::Message.

Accessors

  • $msg->test_case() / $msg->test_case($value)

    Type: Message (Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCase)

    Required. The test case to update.

  • $msg->update_mask() / $msg->update_mask($value)

    Type: Message (Google::Protobuf::FieldMask::FieldMask)

    Required. The mask to specify which fields should be updated. The [`creationTime`][google.cloud.dialogflow.cx.v3.TestCase.creation_time] and [`lastTestResult`][google.cloud.dialogflow.cx.v3.TestCase.last_test_result] cannot be updated.

Google::Cloud::Dialogflow::Cx::V3::TestCase::GetTestCaseRequest

The request message for [TestCases.GetTestCase][google.cloud.dialogflow.cx.v3.TestCases.GetTestCase].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.

Google::Cloud::Dialogflow::Cx::V3::TestCase::RunTestCaseRequest

The request message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. Format of test case name to run: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.

  • $msg->environment() / $msg->environment($value)

    Type: String

    Optional. Environment name. If not set, draft environment is assumed. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.

Google::Cloud::Dialogflow::Cx::V3::TestCase::RunTestCaseResponse

The response message for [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase].

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::RunTestCaseMetadata

Metadata returned for the [TestCases.RunTestCase][google.cloud.dialogflow.cx.v3.TestCases.RunTestCase] long running operation. This message currently has no fields.

Inherits from Protobuf::Message.

Google::Cloud::Dialogflow::Cx::V3::TestCase::BatchRunTestCasesRequest

The request message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. Agent name. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.

  • $msg->environment() / $msg->environment($value)

    Type: String

    Optional. If not set, draft environment is assumed. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/environments/<EnvironmentID>`.

  • $msg->test_cases() / $msg->test_cases($value)

    Type: String

    Required. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.

Google::Cloud::Dialogflow::Cx::V3::TestCase::BatchRunTestCasesResponse

The response message for [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases].

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::BatchRunTestCasesMetadata

Metadata returned for the [TestCases.BatchRunTestCases][google.cloud.dialogflow.cx.v3.TestCases.BatchRunTestCases] long running operation.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::TestError

Error info for running a test.

Inherits from Protobuf::Message.

Accessors

  • $msg->test_case() / $msg->test_case($value)

    Type: String

    The test case resource name.

  • $msg->status() / $msg->status($value)

    Type: Message (Google::Rpc::Status::Status)

    The status associated with the test.

  • $msg->test_time() / $msg->test_time($value)

    Type: Message (Google::Protobuf::Timestamp::Timestamp)

    The timestamp when the test was completed.

Google::Cloud::Dialogflow::Cx::V3::TestCase::ImportTestCasesRequest

The request message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The agent to import test cases to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.

  • $msg->gcs_uri() / $msg->gcs_uri($value)

    Type: String

    The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to import test cases from. The format of this URI must be `gs://<bucket-name>/<object-name>`.

    Dialogflow performs a read operation for the Cloud Storage object on the caller's behalf, so your request authentication must have read permissions for the object. For more information, see [Dialogflow access control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).

  • $msg->content() / $msg->content($value)

    Type: Bytes

    Uncompressed raw byte content for test cases.

Google::Cloud::Dialogflow::Cx::V3::TestCase::ImportTestCasesResponse

The response message for [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases].

Inherits from Protobuf::Message.

Accessors

  • $msg->names() / $msg->names($value)

    Type: String

    The unique identifiers of the new test cases. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.

Google::Cloud::Dialogflow::Cx::V3::TestCase::ImportTestCasesMetadata

Metadata returned for the [TestCases.ImportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ImportTestCases] long running operation.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCaseError

Error info for importing a test.

Inherits from Protobuf::Message.

Accessors

Google::Cloud::Dialogflow::Cx::V3::TestCase::ExportTestCasesRequest

The request message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The agent where to export test cases from. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>`.

  • $msg->gcs_uri() / $msg->gcs_uri($value)

    Type: String

    The [Google Cloud Storage](https://cloud.google.com/storage/docs/) URI to export the test cases to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If unspecified, the serialized test cases is returned inline.

    Dialogflow performs a write operation for the Cloud Storage object on the caller's behalf, so your request authentication must have write permissions for the object. For more information, see [Dialogflow access control](https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage).

  • $msg->data_format() / $msg->data_format($value)

    Type: Enum (Google::Cloud::Dialogflow::Cx::V3::ExportTestCasesRequest::DataFormat)

    The data format of the exported test cases. If not specified, `BLOB` is assumed.

  • $msg->filter() / $msg->filter($value)

    Type: String

    The filter expression used to filter exported test cases, see [API Filtering](https://aip.dev/160). The expression is case insensitive and supports the following syntax:

    name = <value> [OR name = <value>] ...

    For example:

    * "name = t1 OR name = t2" matches the test case with the exact resource name "t1" or "t2".

Enum: ExportTestCasesRequest::DataFormat

  • DATA_FORMAT_UNSPECIFIED => 0

  • BLOB => 1

  • JSON => 2

Google::Cloud::Dialogflow::Cx::V3::TestCase::ExportTestCasesResponse

The response message for [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases].

Inherits from Protobuf::Message.

Accessors

  • $msg->gcs_uri() / $msg->gcs_uri($value)

    Type: String

    The URI to a file containing the exported test cases. This field is populated only if `gcs_uri` is specified in [ExportTestCasesRequest][google.cloud.dialogflow.cx.v3.ExportTestCasesRequest].

  • $msg->content() / $msg->content($value)

    Type: Bytes

    Uncompressed raw byte content for test cases.

Google::Cloud::Dialogflow::Cx::V3::TestCase::ExportTestCasesMetadata

Metadata returned for the [TestCases.ExportTestCases][google.cloud.dialogflow.cx.v3.TestCases.ExportTestCases] long running operation. This message currently has no fields.

Inherits from Protobuf::Message.

Google::Cloud::Dialogflow::Cx::V3::TestCase::ListTestCaseResultsRequest

The request message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults].

Inherits from Protobuf::Message.

Accessors

  • $msg->parent() / $msg->parent($value)

    Type: String

    Required. The test case to list results for. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. Specify a `-` as a wildcard for TestCase ID to list results across multiple test cases.

  • $msg->page_size() / $msg->page_size($value)

    Type: Int32

    The maximum number of items to return in a single page. By default 100 and at most 1000.

  • $msg->page_token() / $msg->page_token($value)

    Type: String

    The next_page_token value returned from a previous list request.

  • $msg->filter() / $msg->filter($value)

    Type: String

    The filter expression used to filter test case results. See [API Filtering](https://aip.dev/160).

    The expression is case insensitive. Only 'AND' is supported for logical operators. The supported syntax is listed below in detail:

    <field> <operator> <value> [AND <field> <operator> <value>] ...
    [AND latest]

    The supported fields and operators are: field operator `environment` `=`, `IN` (Use value `draft` for draft environment) `test_time` `>`, `<`

    `latest` only returns the latest test result in all results for each test case.

    Examples: * "environment=draft AND latest" matches the latest test result for each test case in the draft environment. * "environment IN (e1,e2)" matches any test case results with an environment resource name of either "e1" or "e2". * "test_time > 1602540713" matches any test case results with test time later than a unix timestamp in seconds 1602540713.

Google::Cloud::Dialogflow::Cx::V3::TestCase::ListTestCaseResultsResponse

The response message for [TestCases.ListTestCaseResults][google.cloud.dialogflow.cx.v3.TestCases.ListTestCaseResults].

Inherits from Protobuf::Message.

Accessors

  • $msg->test_case_results() / $msg->test_case_results($value)

    Type: Message (Google::Cloud::Dialogflow::Cx::V3::TestCase::TestCaseResult)

    The list of test case results.

  • $msg->next_page_token() / $msg->next_page_token($value)

    Type: String

    Token to retrieve the next page of results, or empty if there are no more results in the list.

Google::Cloud::Dialogflow::Cx::V3::TestCase::GetTestCaseResultRequest

The request message for [TestCases.GetTestCaseResult][google.cloud.dialogflow.cx.v3.TestCases.GetTestCaseResult].

Inherits from Protobuf::Message.

Accessors

  • $msg->name() / $msg->name($value)

    Type: String

    Required. The name of the testcase. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`.

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Dialogflow::Cx::V3::TestCase::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.