# Google Cloud Dialogflow Cx V3 Client - Class TestCase (0.11.1)

0.11.1 (latest) 0.11.0 0.10.2 0.9.2 0.8.1 0.7.2 0.6.0 0.5.2 0.4.1 0.3.4 0.2.1 0.1.1 Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class TestCase.

Represents a test case.

Generated from protobuf message `google.cloud.dialogflow.cx.v3.TestCase`

## Namespace

Google \\ Cloud \\ Dialogflow \\ Cx \\ V3

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The unique identifier of the test case. [TestCases.CreateTestCase](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.TestCasesClient#_Google_Cloud_Dialogflow_Cx_V3_Client_TestCasesClient__createTestCase__) will populate the name automatically. Otherwise use format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`. |
| `↳ tags` | `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. |
| `↳ display_name` | `string` Required. The human-readable name of the test case, unique within the agent. Limit of 200 characters. |
| `↳ notes` | `string` Additional freeform notes about the test case. Limit of 400 characters. |
| `↳ test_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TestConfig` Config for the test case. |
| `↳ test_case_conversation_turns` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.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. |
| `↳ creation_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. When the test was created. |
| `↳ last_test_result` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TestCaseResult` The latest test result. |

### getName

The unique identifier of the test case.

[TestCases.CreateTestCase](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.TestCasesClient#_Google_Cloud_Dialogflow_Cx_V3_Client_TestCasesClient__createTestCase__)
will populate the name automatically. Otherwise use format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setName

The unique identifier of the test case.

[TestCases.CreateTestCase](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Client.TestCasesClient#_Google_Cloud_Dialogflow_Cx_V3_Client_TestCasesClient__createTestCase__)
will populate the name automatically. Otherwise use format:
`projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTags

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setTags

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDisplayName

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setDisplayName

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getNotes

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setNotes

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTestConfig

Config for the test case.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TestConfig|null` |   |

### hasTestConfig

### clearTestConfig

### setTestConfig

Config for the test case.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TestConfig` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTestCaseConversationTurns

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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ConversationTurn>` |   |

### setTestCaseConversationTurns

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ConversationTurn>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCreationTime

Output only. When the test was created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCreationTime

### clearCreationTime

### setCreationTime

Output only. When the test was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getLastTestResult

The latest test result.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TestCaseResult|null` |   |

### hasLastTestResult

### clearLastTestResult

### setLastTestResult

The latest test result.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TestCaseResult` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |