Exemplo n.º 1
0
def sample_batch_delete_test_cases():
    # Create a client
    client = dialogflowcx_v3beta1.TestCasesClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3beta1.BatchDeleteTestCasesRequest(
        parent="parent_value",
        names=['names_value_1', 'names_value_2'],
    )

    # Make the request
    client.batch_delete_test_cases(request=request)
Exemplo n.º 2
0
def sample_get_test_case():
    # Create a client
    client = dialogflowcx_v3beta1.TestCasesClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3beta1.GetTestCaseRequest(name="name_value", )

    # Make the request
    response = client.get_test_case(request=request)

    # Handle the response
    print(response)
Exemplo n.º 3
0
def sample_list_test_cases():
    # Create a client
    client = dialogflowcx_v3beta1.TestCasesClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3beta1.ListTestCasesRequest(
        parent="parent_value", )

    # Make the request
    page_result = client.list_test_cases(request=request)

    # Handle the response
    for response in page_result:
        print(response)
def sample_update_test_case():
    # Create a client
    client = dialogflowcx_v3beta1.TestCasesClient()

    # Initialize request argument(s)
    test_case = dialogflowcx_v3beta1.TestCase()
    test_case.display_name = "display_name_value"

    request = dialogflowcx_v3beta1.UpdateTestCaseRequest(test_case=test_case, )

    # Make the request
    response = client.update_test_case(request=request)

    # Handle the response
    print(response)
Exemplo n.º 5
0
def sample_calculate_coverage():
    # Create a client
    client = dialogflowcx_v3beta1.TestCasesClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3beta1.CalculateCoverageRequest(
        agent="agent_value",
        type_="TRANSITION_ROUTE_GROUP",
    )

    # Make the request
    response = client.calculate_coverage(request=request)

    # Handle the response
    print(response)
def sample_run_test_case():
    # Create a client
    client = dialogflowcx_v3beta1.TestCasesClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3beta1.RunTestCaseRequest(name="name_value", )

    # Make the request
    operation = client.run_test_case(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
def sample_batch_run_test_cases():
    # Create a client
    client = dialogflowcx_v3beta1.TestCasesClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3beta1.BatchRunTestCasesRequest(
        parent="parent_value",
        test_cases=['test_cases_value_1', 'test_cases_value_2'],
    )

    # Make the request
    operation = client.batch_run_test_cases(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)
def sample_export_test_cases():
    # Create a client
    client = dialogflowcx_v3beta1.TestCasesClient()

    # Initialize request argument(s)
    request = dialogflowcx_v3beta1.ExportTestCasesRequest(
        gcs_uri="gcs_uri_value",
        parent="parent_value",
    )

    # Make the request
    operation = client.export_test_cases(request=request)

    print("Waiting for operation to complete...")

    response = operation.result()

    # Handle the response
    print(response)