# Google Cloud Dialogflow Cx V3 Client - Class TestCaseResult (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 TestCaseResult.

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

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

## Namespace

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

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The resource name for the test case result. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/testCases/<TestCaseID>/results/<TestCaseResultID>`. |
| `↳ environment` | `string` Environment where the test was run. If not set, it indicates the draft environment. |
| `↳ conversation_turns` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.ConversationTurn>` The conversation turns uttered during the test case replay in chronological order. |
| `↳ test_result` | `int` Whether the test case passed in the agent environment. |
| `↳ test_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The time that the test was run. |

### getName

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

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

### setName

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

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

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

### getEnvironment

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

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

### setEnvironment

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

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

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

### getConversationTurns

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

| **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>` |   |

### setConversationTurns

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

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

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

### getTestResult

Whether the test case passed in the agent environment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [TestResult](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TestResult). |

### setTestResult

Whether the test case passed in the agent environment.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [TestResult](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.TestResult). |

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

### getTestTime

The time that the test was run.

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

### hasTestTime

### clearTestTime

### setTestTime

The time that the test was run.

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

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