class ProjectsLocationsAgentsTestCases extends Resource (View source)

The "testCases" collection of methods.

Typical usage is:

 $dialogflowService = new Google\Service\Dialogflow(...);
 $testCases = $dialogflowService->projects_locations_agents_testCases;

Methods

batchDelete(string $parent, GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest $postBody, array $optParams = [])

Batch deletes test cases. (testCases.batchDelete)

batchRun(string $parent, GoogleCloudDialogflowCxV3BatchRunTestCasesRequest $postBody, array $optParams = [])

Kicks off a batch run of test cases. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: BatchRunTestCasesMetadata - response: BatchRunTestCasesResponse (testCases.batchRun)

calculateCoverage(string $agent, array $optParams = [])

Calculates the test coverage for an agent. (testCases.calculateCoverage)

create(string $parent, GoogleCloudDialogflowCxV3TestCase $postBody, array $optParams = [])

Creates a test case for the given agent. (testCases.create)

export(string $parent, GoogleCloudDialogflowCxV3ExportTestCasesRequest $postBody, array $optParams = [])

Exports the test cases under the agent to a Cloud Storage bucket or a local file. Filter can be applied to export a subset of test cases. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: ExportTestCasesMetadata - response: ExportTestCasesResponse (testCases.export)

get(string $name, array $optParams = [])

Gets a test case. (testCases.get)

import(string $parent, GoogleCloudDialogflowCxV3ImportTestCasesRequest $postBody, array $optParams = [])

Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test cases and won't overwrite any existing ones. The provided ID in the imported test case is neglected. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: ImportTestCasesMetadata - response: ImportTestCasesResponse (testCases.import)

listProjectsLocationsAgentsTestCases(string $parent, array $optParams = [])

Fetches a list of test cases for a given agent.

patch(string $name, GoogleCloudDialogflowCxV3TestCase $postBody, array $optParams = [])

Updates the specified test case. (testCases.patch)

run(string $name, GoogleCloudDialogflowCxV3RunTestCaseRequest $postBody, array $optParams = [])

Kicks off a test case run. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: RunTestCaseMetadata - response: RunTestCaseResponse (testCases.run)

Details

GoogleProtobufEmpty batchDelete(string $parent, GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest $postBody, array $optParams = [])

Batch deletes test cases. (testCases.batchDelete)

Parameters

string $parent

Required. The agent to delete test cases from. Format: projects//locations//agents/.

GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleProtobufEmpty

Exceptions

Exception

GoogleLongrunningOperation batchRun(string $parent, GoogleCloudDialogflowCxV3BatchRunTestCasesRequest $postBody, array $optParams = [])

Kicks off a batch run of test cases. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: BatchRunTestCasesMetadata - response: BatchRunTestCasesResponse (testCases.batchRun)

Parameters

string $parent

Required. Agent name. Format: projects//locations//agents/.

GoogleCloudDialogflowCxV3BatchRunTestCasesRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudDialogflowCxV3CalculateCoverageResponse calculateCoverage(string $agent, array $optParams = [])

Calculates the test coverage for an agent. (testCases.calculateCoverage)

Parameters

string $agent

Required. The agent to calculate coverage for. Format: projects//locations//agents/.

array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3CalculateCoverageResponse

Exceptions

Exception

GoogleCloudDialogflowCxV3TestCase create(string $parent, GoogleCloudDialogflowCxV3TestCase $postBody, array $optParams = [])

Creates a test case for the given agent. (testCases.create)

Parameters

string $parent

Required. The agent to create the test case for. Format: projects//locations//agents/.

GoogleCloudDialogflowCxV3TestCase $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3TestCase

Exceptions

Exception

GoogleLongrunningOperation export(string $parent, GoogleCloudDialogflowCxV3ExportTestCasesRequest $postBody, array $optParams = [])

Exports the test cases under the agent to a Cloud Storage bucket or a local file. Filter can be applied to export a subset of test cases. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: ExportTestCasesMetadata - response: ExportTestCasesResponse (testCases.export)

Parameters

string $parent

Required. The agent where to export test cases from. Format: projects//locations//agents/.

GoogleCloudDialogflowCxV3ExportTestCasesRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudDialogflowCxV3TestCase get(string $name, array $optParams = [])

Gets a test case. (testCases.get)

Parameters

string $name

Required. The name of the testcase. Format: projects//locations//agents//testCases/.

array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3TestCase

Exceptions

Exception

GoogleLongrunningOperation import(string $parent, GoogleCloudDialogflowCxV3ImportTestCasesRequest $postBody, array $optParams = [])

Imports the test cases from a Cloud Storage bucket or a local file. It always creates new test cases and won't overwrite any existing ones. The provided ID in the imported test case is neglected. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: ImportTestCasesMetadata - response: ImportTestCasesResponse (testCases.import)

Parameters

string $parent

Required. The agent to import test cases to. Format: projects//locations//agents/.

GoogleCloudDialogflowCxV3ImportTestCasesRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudDialogflowCxV3ListTestCasesResponse listProjectsLocationsAgentsTestCases(string $parent, array $optParams = [])

Fetches a list of test cases for a given agent.

(testCases.listProjectsLocationsAgentsTestCases)

Parameters

string $parent

Required. The agent to list all pages for. Format: projects//locations//agents/.

array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3ListTestCasesResponse

Exceptions

Exception

GoogleCloudDialogflowCxV3TestCase patch(string $name, GoogleCloudDialogflowCxV3TestCase $postBody, array $optParams = [])

Updates the specified test case. (testCases.patch)

Parameters

string $name

The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: projects//locations//agents//testCases/.

GoogleCloudDialogflowCxV3TestCase $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDialogflowCxV3TestCase

Exceptions

Exception

GoogleLongrunningOperation run(string $name, GoogleCloudDialogflowCxV3RunTestCaseRequest $postBody, array $optParams = [])

Kicks off a test case run. This method is a long-running operation. The returned Operation type has the following method-specific fields: - metadata: RunTestCaseMetadata - response: RunTestCaseResponse (testCases.run)

Parameters

string $name

Required. Format of test case name to run: projects//locations//agents//testCases/.

GoogleCloudDialogflowCxV3RunTestCaseRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception