gcp.diagflow.CxTestCase
Explore with Pulumi AI
You can use the built-in test feature to uncover bugs and prevent regressions. A test execution verifies that agent responses have not changed for end-user inputs defined in the test case.
To get more information about TestCase, see:
- API documentation
- How-to Guides
Example Usage
Dialogflowcx Test Case Full
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const agent = new gcp.diagflow.CxAgent("agent", {
    displayName: "dialogflowcx-agent",
    location: "global",
    defaultLanguageCode: "en",
    supportedLanguageCodes: [
        "fr",
        "de",
        "es",
    ],
    timeZone: "America/New_York",
    description: "Example description.",
    avatarUri: "https://storage.cloud.google.com/dialogflow-test-host-image/cloud-logo.png",
    enableStackdriverLogging: true,
    enableSpellCorrection: true,
    speechToTextSettings: {
        enableSpeechAdaptation: true,
    },
});
const intent = new gcp.diagflow.CxIntent("intent", {
    parent: agent.id,
    displayName: "MyIntent",
    priority: 1,
    trainingPhrases: [{
        parts: [{
            text: "training phrase",
        }],
        repeatCount: 1,
    }],
});
const page = new gcp.diagflow.CxPage("page", {
    parent: agent.startFlow,
    displayName: "MyPage",
    transitionRoutes: [{
        intent: intent.id,
        triggerFulfillment: {
            messages: [{
                text: {
                    texts: ["Training phrase response"],
                },
            }],
        },
    }],
    eventHandlers: [{
        event: "some-event",
        triggerFulfillment: {
            messages: [{
                text: {
                    texts: ["Handling some event"],
                },
            }],
        },
    }],
});
const basicTestCase = new gcp.diagflow.CxTestCase("basic_test_case", {
    parent: agent.id,
    displayName: "MyTestCase",
    tags: ["#tag1"],
    notes: "demonstrates a simple training phrase response",
    testConfig: {
        trackingParameters: ["some_param"],
        page: page.id,
    },
    testCaseConversationTurns: [
        {
            userInput: {
                input: {
                    languageCode: "en",
                    text: {
                        text: "training phrase",
                    },
                },
                injectedParameters: JSON.stringify({
                    some_param: "1",
                }),
                isWebhookEnabled: true,
                enableSentimentAnalysis: true,
            },
            virtualAgentOutput: {
                sessionParameters: JSON.stringify({
                    some_param: "1",
                }),
                triggeredIntent: {
                    name: intent.id,
                },
                currentPage: {
                    name: page.id,
                },
                textResponses: [{
                    texts: ["Training phrase response"],
                }],
            },
        },
        {
            userInput: {
                input: {
                    event: {
                        event: "some-event",
                    },
                },
            },
            virtualAgentOutput: {
                currentPage: {
                    name: page.id,
                },
                textResponses: [{
                    texts: ["Handling some event"],
                }],
            },
        },
        {
            userInput: {
                input: {
                    dtmf: {
                        digits: "12",
                        finishDigit: "3",
                    },
                },
            },
            virtualAgentOutput: {
                textResponses: [{
                    texts: ["I didn't get that. Can you say it again?"],
                }],
            },
        },
    ],
});
import pulumi
import json
import pulumi_gcp as gcp
agent = gcp.diagflow.CxAgent("agent",
    display_name="dialogflowcx-agent",
    location="global",
    default_language_code="en",
    supported_language_codes=[
        "fr",
        "de",
        "es",
    ],
    time_zone="America/New_York",
    description="Example description.",
    avatar_uri="https://storage.cloud.google.com/dialogflow-test-host-image/cloud-logo.png",
    enable_stackdriver_logging=True,
    enable_spell_correction=True,
    speech_to_text_settings={
        "enable_speech_adaptation": True,
    })
intent = gcp.diagflow.CxIntent("intent",
    parent=agent.id,
    display_name="MyIntent",
    priority=1,
    training_phrases=[{
        "parts": [{
            "text": "training phrase",
        }],
        "repeat_count": 1,
    }])
page = gcp.diagflow.CxPage("page",
    parent=agent.start_flow,
    display_name="MyPage",
    transition_routes=[{
        "intent": intent.id,
        "trigger_fulfillment": {
            "messages": [{
                "text": {
                    "texts": ["Training phrase response"],
                },
            }],
        },
    }],
    event_handlers=[{
        "event": "some-event",
        "trigger_fulfillment": {
            "messages": [{
                "text": {
                    "texts": ["Handling some event"],
                },
            }],
        },
    }])
basic_test_case = gcp.diagflow.CxTestCase("basic_test_case",
    parent=agent.id,
    display_name="MyTestCase",
    tags=["#tag1"],
    notes="demonstrates a simple training phrase response",
    test_config={
        "tracking_parameters": ["some_param"],
        "page": page.id,
    },
    test_case_conversation_turns=[
        {
            "user_input": {
                "input": {
                    "language_code": "en",
                    "text": {
                        "text": "training phrase",
                    },
                },
                "injected_parameters": json.dumps({
                    "some_param": "1",
                }),
                "is_webhook_enabled": True,
                "enable_sentiment_analysis": True,
            },
            "virtual_agent_output": {
                "session_parameters": json.dumps({
                    "some_param": "1",
                }),
                "triggered_intent": {
                    "name": intent.id,
                },
                "current_page": {
                    "name": page.id,
                },
                "text_responses": [{
                    "texts": ["Training phrase response"],
                }],
            },
        },
        {
            "user_input": {
                "input": {
                    "event": {
                        "event": "some-event",
                    },
                },
            },
            "virtual_agent_output": {
                "current_page": {
                    "name": page.id,
                },
                "text_responses": [{
                    "texts": ["Handling some event"],
                }],
            },
        },
        {
            "user_input": {
                "input": {
                    "dtmf": {
                        "digits": "12",
                        "finish_digit": "3",
                    },
                },
            },
            "virtual_agent_output": {
                "text_responses": [{
                    "texts": ["I didn't get that. Can you say it again?"],
                }],
            },
        },
    ])
package main
import (
	"encoding/json"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/diagflow"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		agent, err := diagflow.NewCxAgent(ctx, "agent", &diagflow.CxAgentArgs{
			DisplayName:         pulumi.String("dialogflowcx-agent"),
			Location:            pulumi.String("global"),
			DefaultLanguageCode: pulumi.String("en"),
			SupportedLanguageCodes: pulumi.StringArray{
				pulumi.String("fr"),
				pulumi.String("de"),
				pulumi.String("es"),
			},
			TimeZone:                 pulumi.String("America/New_York"),
			Description:              pulumi.String("Example description."),
			AvatarUri:                pulumi.String("https://storage.cloud.google.com/dialogflow-test-host-image/cloud-logo.png"),
			EnableStackdriverLogging: pulumi.Bool(true),
			EnableSpellCorrection:    pulumi.Bool(true),
			SpeechToTextSettings: &diagflow.CxAgentSpeechToTextSettingsArgs{
				EnableSpeechAdaptation: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		intent, err := diagflow.NewCxIntent(ctx, "intent", &diagflow.CxIntentArgs{
			Parent:      agent.ID(),
			DisplayName: pulumi.String("MyIntent"),
			Priority:    pulumi.Int(1),
			TrainingPhrases: diagflow.CxIntentTrainingPhraseArray{
				&diagflow.CxIntentTrainingPhraseArgs{
					Parts: diagflow.CxIntentTrainingPhrasePartArray{
						&diagflow.CxIntentTrainingPhrasePartArgs{
							Text: pulumi.String("training phrase"),
						},
					},
					RepeatCount: pulumi.Int(1),
				},
			},
		})
		if err != nil {
			return err
		}
		page, err := diagflow.NewCxPage(ctx, "page", &diagflow.CxPageArgs{
			Parent:      agent.StartFlow,
			DisplayName: pulumi.String("MyPage"),
			TransitionRoutes: diagflow.CxPageTransitionRouteArray{
				&diagflow.CxPageTransitionRouteArgs{
					Intent: intent.ID(),
					TriggerFulfillment: &diagflow.CxPageTransitionRouteTriggerFulfillmentArgs{
						Messages: diagflow.CxPageTransitionRouteTriggerFulfillmentMessageArray{
							&diagflow.CxPageTransitionRouteTriggerFulfillmentMessageArgs{
								Text: &diagflow.CxPageTransitionRouteTriggerFulfillmentMessageTextArgs{
									Texts: pulumi.StringArray{
										pulumi.String("Training phrase response"),
									},
								},
							},
						},
					},
				},
			},
			EventHandlers: diagflow.CxPageEventHandlerArray{
				&diagflow.CxPageEventHandlerArgs{
					Event: pulumi.String("some-event"),
					TriggerFulfillment: &diagflow.CxPageEventHandlerTriggerFulfillmentArgs{
						Messages: diagflow.CxPageEventHandlerTriggerFulfillmentMessageArray{
							&diagflow.CxPageEventHandlerTriggerFulfillmentMessageArgs{
								Text: &diagflow.CxPageEventHandlerTriggerFulfillmentMessageTextArgs{
									Texts: pulumi.StringArray{
										pulumi.String("Handling some event"),
									},
								},
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"some_param": "1",
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		tmpJSON1, err := json.Marshal(map[string]interface{}{
			"some_param": "1",
		})
		if err != nil {
			return err
		}
		json1 := string(tmpJSON1)
		_, err = diagflow.NewCxTestCase(ctx, "basic_test_case", &diagflow.CxTestCaseArgs{
			Parent:      agent.ID(),
			DisplayName: pulumi.String("MyTestCase"),
			Tags: pulumi.StringArray{
				pulumi.String("#tag1"),
			},
			Notes: pulumi.String("demonstrates a simple training phrase response"),
			TestConfig: &diagflow.CxTestCaseTestConfigArgs{
				TrackingParameters: pulumi.StringArray{
					pulumi.String("some_param"),
				},
				Page: page.ID(),
			},
			TestCaseConversationTurns: diagflow.CxTestCaseTestCaseConversationTurnArray{
				&diagflow.CxTestCaseTestCaseConversationTurnArgs{
					UserInput: &diagflow.CxTestCaseTestCaseConversationTurnUserInputArgs{
						Input: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputTypeArgs{
							LanguageCode: pulumi.String("en"),
							Text: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputTextArgs{
								Text: pulumi.String("training phrase"),
							},
						},
						InjectedParameters:      pulumi.String(json0),
						IsWebhookEnabled:        pulumi.Bool(true),
						EnableSentimentAnalysis: pulumi.Bool(true),
					},
					VirtualAgentOutput: diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs{
						SessionParameters: pulumi.String(json1),
						TriggeredIntent: &diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTriggeredIntentArgs{
							Name: intent.ID(),
						},
						CurrentPage: &diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs{
							Name: page.ID(),
						},
						TextResponses: diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArray{
							&diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs{
								Texts: pulumi.StringArray{
									pulumi.String("Training phrase response"),
								},
							},
						},
					},
				},
				&diagflow.CxTestCaseTestCaseConversationTurnArgs{
					UserInput: &diagflow.CxTestCaseTestCaseConversationTurnUserInputArgs{
						Input: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputTypeArgs{
							Event: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputEventArgs{
								Event: pulumi.String("some-event"),
							},
						},
					},
					VirtualAgentOutput: diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs{
						CurrentPage: &diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs{
							Name: page.ID(),
						},
						TextResponses: diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArray{
							&diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs{
								Texts: pulumi.StringArray{
									pulumi.String("Handling some event"),
								},
							},
						},
					},
				},
				&diagflow.CxTestCaseTestCaseConversationTurnArgs{
					UserInput: &diagflow.CxTestCaseTestCaseConversationTurnUserInputArgs{
						Input: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputTypeArgs{
							Dtmf: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputDtmfArgs{
								Digits:      pulumi.String("12"),
								FinishDigit: pulumi.String("3"),
							},
						},
					},
					VirtualAgentOutput: diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs{
						TextResponses: diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArray{
							&diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs{
								Texts: pulumi.StringArray{
									pulumi.String("I didn't get that. Can you say it again?"),
								},
							},
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var agent = new Gcp.Diagflow.CxAgent("agent", new()
    {
        DisplayName = "dialogflowcx-agent",
        Location = "global",
        DefaultLanguageCode = "en",
        SupportedLanguageCodes = new[]
        {
            "fr",
            "de",
            "es",
        },
        TimeZone = "America/New_York",
        Description = "Example description.",
        AvatarUri = "https://storage.cloud.google.com/dialogflow-test-host-image/cloud-logo.png",
        EnableStackdriverLogging = true,
        EnableSpellCorrection = true,
        SpeechToTextSettings = new Gcp.Diagflow.Inputs.CxAgentSpeechToTextSettingsArgs
        {
            EnableSpeechAdaptation = true,
        },
    });
    var intent = new Gcp.Diagflow.CxIntent("intent", new()
    {
        Parent = agent.Id,
        DisplayName = "MyIntent",
        Priority = 1,
        TrainingPhrases = new[]
        {
            new Gcp.Diagflow.Inputs.CxIntentTrainingPhraseArgs
            {
                Parts = new[]
                {
                    new Gcp.Diagflow.Inputs.CxIntentTrainingPhrasePartArgs
                    {
                        Text = "training phrase",
                    },
                },
                RepeatCount = 1,
            },
        },
    });
    var page = new Gcp.Diagflow.CxPage("page", new()
    {
        Parent = agent.StartFlow,
        DisplayName = "MyPage",
        TransitionRoutes = new[]
        {
            new Gcp.Diagflow.Inputs.CxPageTransitionRouteArgs
            {
                Intent = intent.Id,
                TriggerFulfillment = new Gcp.Diagflow.Inputs.CxPageTransitionRouteTriggerFulfillmentArgs
                {
                    Messages = new[]
                    {
                        new Gcp.Diagflow.Inputs.CxPageTransitionRouteTriggerFulfillmentMessageArgs
                        {
                            Text = new Gcp.Diagflow.Inputs.CxPageTransitionRouteTriggerFulfillmentMessageTextArgs
                            {
                                Texts = new[]
                                {
                                    "Training phrase response",
                                },
                            },
                        },
                    },
                },
            },
        },
        EventHandlers = new[]
        {
            new Gcp.Diagflow.Inputs.CxPageEventHandlerArgs
            {
                Event = "some-event",
                TriggerFulfillment = new Gcp.Diagflow.Inputs.CxPageEventHandlerTriggerFulfillmentArgs
                {
                    Messages = new[]
                    {
                        new Gcp.Diagflow.Inputs.CxPageEventHandlerTriggerFulfillmentMessageArgs
                        {
                            Text = new Gcp.Diagflow.Inputs.CxPageEventHandlerTriggerFulfillmentMessageTextArgs
                            {
                                Texts = new[]
                                {
                                    "Handling some event",
                                },
                            },
                        },
                    },
                },
            },
        },
    });
    var basicTestCase = new Gcp.Diagflow.CxTestCase("basic_test_case", new()
    {
        Parent = agent.Id,
        DisplayName = "MyTestCase",
        Tags = new[]
        {
            "#tag1",
        },
        Notes = "demonstrates a simple training phrase response",
        TestConfig = new Gcp.Diagflow.Inputs.CxTestCaseTestConfigArgs
        {
            TrackingParameters = new[]
            {
                "some_param",
            },
            Page = page.Id,
        },
        TestCaseConversationTurns = new[]
        {
            new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnArgs
            {
                UserInput = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputArgs
                {
                    Input = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputArgs
                    {
                        LanguageCode = "en",
                        Text = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputTextArgs
                        {
                            Text = "training phrase",
                        },
                    },
                    InjectedParameters = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["some_param"] = "1",
                    }),
                    IsWebhookEnabled = true,
                    EnableSentimentAnalysis = true,
                },
                VirtualAgentOutput = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs
                {
                    SessionParameters = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["some_param"] = "1",
                    }),
                    TriggeredIntent = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTriggeredIntentArgs
                    {
                        Name = intent.Id,
                    },
                    CurrentPage = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs
                    {
                        Name = page.Id,
                    },
                    TextResponses = new[]
                    {
                        new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs
                        {
                            Texts = new[]
                            {
                                "Training phrase response",
                            },
                        },
                    },
                },
            },
            new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnArgs
            {
                UserInput = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputArgs
                {
                    Input = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputArgs
                    {
                        Event = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputEventArgs
                        {
                            Event = "some-event",
                        },
                    },
                },
                VirtualAgentOutput = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs
                {
                    CurrentPage = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs
                    {
                        Name = page.Id,
                    },
                    TextResponses = new[]
                    {
                        new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs
                        {
                            Texts = new[]
                            {
                                "Handling some event",
                            },
                        },
                    },
                },
            },
            new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnArgs
            {
                UserInput = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputArgs
                {
                    Input = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputArgs
                    {
                        Dtmf = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputDtmfArgs
                        {
                            Digits = "12",
                            FinishDigit = "3",
                        },
                    },
                },
                VirtualAgentOutput = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs
                {
                    TextResponses = new[]
                    {
                        new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs
                        {
                            Texts = new[]
                            {
                                "I didn't get that. Can you say it again?",
                            },
                        },
                    },
                },
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.diagflow.CxAgent;
import com.pulumi.gcp.diagflow.CxAgentArgs;
import com.pulumi.gcp.diagflow.inputs.CxAgentSpeechToTextSettingsArgs;
import com.pulumi.gcp.diagflow.CxIntent;
import com.pulumi.gcp.diagflow.CxIntentArgs;
import com.pulumi.gcp.diagflow.inputs.CxIntentTrainingPhraseArgs;
import com.pulumi.gcp.diagflow.CxPage;
import com.pulumi.gcp.diagflow.CxPageArgs;
import com.pulumi.gcp.diagflow.inputs.CxPageTransitionRouteArgs;
import com.pulumi.gcp.diagflow.inputs.CxPageTransitionRouteTriggerFulfillmentArgs;
import com.pulumi.gcp.diagflow.inputs.CxPageEventHandlerArgs;
import com.pulumi.gcp.diagflow.inputs.CxPageEventHandlerTriggerFulfillmentArgs;
import com.pulumi.gcp.diagflow.CxTestCase;
import com.pulumi.gcp.diagflow.CxTestCaseArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestConfigArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestCaseConversationTurnArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestCaseConversationTurnUserInputArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestCaseConversationTurnUserInputInputArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestCaseConversationTurnUserInputInputTextArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTriggeredIntentArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestCaseConversationTurnUserInputInputEventArgs;
import com.pulumi.gcp.diagflow.inputs.CxTestCaseTestCaseConversationTurnUserInputInputDtmfArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var agent = new CxAgent("agent", CxAgentArgs.builder()
            .displayName("dialogflowcx-agent")
            .location("global")
            .defaultLanguageCode("en")
            .supportedLanguageCodes(            
                "fr",
                "de",
                "es")
            .timeZone("America/New_York")
            .description("Example description.")
            .avatarUri("https://storage.cloud.google.com/dialogflow-test-host-image/cloud-logo.png")
            .enableStackdriverLogging(true)
            .enableSpellCorrection(true)
            .speechToTextSettings(CxAgentSpeechToTextSettingsArgs.builder()
                .enableSpeechAdaptation(true)
                .build())
            .build());
        var intent = new CxIntent("intent", CxIntentArgs.builder()
            .parent(agent.id())
            .displayName("MyIntent")
            .priority(1)
            .trainingPhrases(CxIntentTrainingPhraseArgs.builder()
                .parts(CxIntentTrainingPhrasePartArgs.builder()
                    .text("training phrase")
                    .build())
                .repeatCount(1)
                .build())
            .build());
        var page = new CxPage("page", CxPageArgs.builder()
            .parent(agent.startFlow())
            .displayName("MyPage")
            .transitionRoutes(CxPageTransitionRouteArgs.builder()
                .intent(intent.id())
                .triggerFulfillment(CxPageTransitionRouteTriggerFulfillmentArgs.builder()
                    .messages(CxPageTransitionRouteTriggerFulfillmentMessageArgs.builder()
                        .text(CxPageTransitionRouteTriggerFulfillmentMessageTextArgs.builder()
                            .texts("Training phrase response")
                            .build())
                        .build())
                    .build())
                .build())
            .eventHandlers(CxPageEventHandlerArgs.builder()
                .event("some-event")
                .triggerFulfillment(CxPageEventHandlerTriggerFulfillmentArgs.builder()
                    .messages(CxPageEventHandlerTriggerFulfillmentMessageArgs.builder()
                        .text(CxPageEventHandlerTriggerFulfillmentMessageTextArgs.builder()
                            .texts("Handling some event")
                            .build())
                        .build())
                    .build())
                .build())
            .build());
        var basicTestCase = new CxTestCase("basicTestCase", CxTestCaseArgs.builder()
            .parent(agent.id())
            .displayName("MyTestCase")
            .tags("#tag1")
            .notes("demonstrates a simple training phrase response")
            .testConfig(CxTestCaseTestConfigArgs.builder()
                .trackingParameters("some_param")
                .page(page.id())
                .build())
            .testCaseConversationTurns(            
                CxTestCaseTestCaseConversationTurnArgs.builder()
                    .userInput(CxTestCaseTestCaseConversationTurnUserInputArgs.builder()
                        .input(CxTestCaseTestCaseConversationTurnUserInputInputArgs.builder()
                            .languageCode("en")
                            .text(CxTestCaseTestCaseConversationTurnUserInputInputTextArgs.builder()
                                .text("training phrase")
                                .build())
                            .build())
                        .injectedParameters(serializeJson(
                            jsonObject(
                                jsonProperty("some_param", "1")
                            )))
                        .isWebhookEnabled(true)
                        .enableSentimentAnalysis(true)
                        .build())
                    .virtualAgentOutput(CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs.builder()
                        .sessionParameters(serializeJson(
                            jsonObject(
                                jsonProperty("some_param", "1")
                            )))
                        .triggeredIntent(CxTestCaseTestCaseConversationTurnVirtualAgentOutputTriggeredIntentArgs.builder()
                            .name(intent.id())
                            .build())
                        .currentPage(CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs.builder()
                            .name(page.id())
                            .build())
                        .textResponses(CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs.builder()
                            .texts("Training phrase response")
                            .build())
                        .build())
                    .build(),
                CxTestCaseTestCaseConversationTurnArgs.builder()
                    .userInput(CxTestCaseTestCaseConversationTurnUserInputArgs.builder()
                        .input(CxTestCaseTestCaseConversationTurnUserInputInputArgs.builder()
                            .event(CxTestCaseTestCaseConversationTurnUserInputInputEventArgs.builder()
                                .event("some-event")
                                .build())
                            .build())
                        .build())
                    .virtualAgentOutput(CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs.builder()
                        .currentPage(CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs.builder()
                            .name(page.id())
                            .build())
                        .textResponses(CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs.builder()
                            .texts("Handling some event")
                            .build())
                        .build())
                    .build(),
                CxTestCaseTestCaseConversationTurnArgs.builder()
                    .userInput(CxTestCaseTestCaseConversationTurnUserInputArgs.builder()
                        .input(CxTestCaseTestCaseConversationTurnUserInputInputArgs.builder()
                            .dtmf(CxTestCaseTestCaseConversationTurnUserInputInputDtmfArgs.builder()
                                .digits("12")
                                .finishDigit("3")
                                .build())
                            .build())
                        .build())
                    .virtualAgentOutput(CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs.builder()
                        .textResponses(CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs.builder()
                            .texts("I didn't get that. Can you say it again?")
                            .build())
                        .build())
                    .build())
            .build());
    }
}
resources:
  agent:
    type: gcp:diagflow:CxAgent
    properties:
      displayName: dialogflowcx-agent
      location: global
      defaultLanguageCode: en
      supportedLanguageCodes:
        - fr
        - de
        - es
      timeZone: America/New_York
      description: Example description.
      avatarUri: https://storage.cloud.google.com/dialogflow-test-host-image/cloud-logo.png
      enableStackdriverLogging: true
      enableSpellCorrection: true
      speechToTextSettings:
        enableSpeechAdaptation: true
  page:
    type: gcp:diagflow:CxPage
    properties:
      parent: ${agent.startFlow}
      displayName: MyPage
      transitionRoutes:
        - intent: ${intent.id}
          triggerFulfillment:
            messages:
              - text:
                  texts:
                    - Training phrase response
      eventHandlers:
        - event: some-event
          triggerFulfillment:
            messages:
              - text:
                  texts:
                    - Handling some event
  intent:
    type: gcp:diagflow:CxIntent
    properties:
      parent: ${agent.id}
      displayName: MyIntent
      priority: 1
      trainingPhrases:
        - parts:
            - text: training phrase
          repeatCount: 1
  basicTestCase:
    type: gcp:diagflow:CxTestCase
    name: basic_test_case
    properties:
      parent: ${agent.id}
      displayName: MyTestCase
      tags:
        - '#tag1'
      notes: demonstrates a simple training phrase response
      testConfig:
        trackingParameters:
          - some_param
        page: ${page.id}
      testCaseConversationTurns:
        - userInput:
            input:
              languageCode: en
              text:
                text: training phrase
            injectedParameters:
              fn::toJSON:
                some_param: '1'
            isWebhookEnabled: true
            enableSentimentAnalysis: true
          virtualAgentOutput:
            sessionParameters:
              fn::toJSON:
                some_param: '1'
            triggeredIntent:
              name: ${intent.id}
            currentPage:
              name: ${page.id}
            textResponses:
              - texts:
                  - Training phrase response
        - userInput:
            input:
              event:
                event: some-event
          virtualAgentOutput:
            currentPage:
              name: ${page.id}
            textResponses:
              - texts:
                  - Handling some event
        - userInput:
            input:
              dtmf:
                digits: '12'
                finishDigit: '3'
          virtualAgentOutput:
            textResponses:
              - texts:
                  - I didn't get that. Can you say it again?
Create CxTestCase Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CxTestCase(name: string, args: CxTestCaseArgs, opts?: CustomResourceOptions);@overload
def CxTestCase(resource_name: str,
               args: CxTestCaseArgs,
               opts: Optional[ResourceOptions] = None)
@overload
def CxTestCase(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               display_name: Optional[str] = None,
               notes: Optional[str] = None,
               parent: Optional[str] = None,
               tags: Optional[Sequence[str]] = None,
               test_case_conversation_turns: Optional[Sequence[CxTestCaseTestCaseConversationTurnArgs]] = None,
               test_config: Optional[CxTestCaseTestConfigArgs] = None)func NewCxTestCase(ctx *Context, name string, args CxTestCaseArgs, opts ...ResourceOption) (*CxTestCase, error)public CxTestCase(string name, CxTestCaseArgs args, CustomResourceOptions? opts = null)
public CxTestCase(String name, CxTestCaseArgs args)
public CxTestCase(String name, CxTestCaseArgs args, CustomResourceOptions options)
type: gcp:diagflow:CxTestCase
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args CxTestCaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args CxTestCaseArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args CxTestCaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CxTestCaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CxTestCaseArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var cxTestCaseResource = new Gcp.Diagflow.CxTestCase("cxTestCaseResource", new()
{
    DisplayName = "string",
    Notes = "string",
    Parent = "string",
    Tags = new[]
    {
        "string",
    },
    TestCaseConversationTurns = new[]
    {
        new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnArgs
        {
            UserInput = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputArgs
            {
                EnableSentimentAnalysis = false,
                InjectedParameters = "string",
                Input = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputArgs
                {
                    Dtmf = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputDtmfArgs
                    {
                        Digits = "string",
                        FinishDigit = "string",
                    },
                    Event = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputEventArgs
                    {
                        Event = "string",
                    },
                    LanguageCode = "string",
                    Text = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnUserInputInputTextArgs
                    {
                        Text = "string",
                    },
                },
                IsWebhookEnabled = false,
            },
            VirtualAgentOutput = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs
            {
                CurrentPage = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs
                {
                    DisplayName = "string",
                    Name = "string",
                },
                SessionParameters = "string",
                TextResponses = new[]
                {
                    new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs
                    {
                        Texts = new[]
                        {
                            "string",
                        },
                    },
                },
                TriggeredIntent = new Gcp.Diagflow.Inputs.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTriggeredIntentArgs
                {
                    DisplayName = "string",
                    Name = "string",
                },
            },
        },
    },
    TestConfig = new Gcp.Diagflow.Inputs.CxTestCaseTestConfigArgs
    {
        Flow = "string",
        Page = "string",
        TrackingParameters = new[]
        {
            "string",
        },
    },
});
example, err := diagflow.NewCxTestCase(ctx, "cxTestCaseResource", &diagflow.CxTestCaseArgs{
	DisplayName: pulumi.String("string"),
	Notes:       pulumi.String("string"),
	Parent:      pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	TestCaseConversationTurns: diagflow.CxTestCaseTestCaseConversationTurnArray{
		&diagflow.CxTestCaseTestCaseConversationTurnArgs{
			UserInput: &diagflow.CxTestCaseTestCaseConversationTurnUserInputArgs{
				EnableSentimentAnalysis: pulumi.Bool(false),
				InjectedParameters:      pulumi.String("string"),
				Input: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputTypeArgs{
					Dtmf: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputDtmfArgs{
						Digits:      pulumi.String("string"),
						FinishDigit: pulumi.String("string"),
					},
					Event: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputEventArgs{
						Event: pulumi.String("string"),
					},
					LanguageCode: pulumi.String("string"),
					Text: &diagflow.CxTestCaseTestCaseConversationTurnUserInputInputTextArgs{
						Text: pulumi.String("string"),
					},
				},
				IsWebhookEnabled: pulumi.Bool(false),
			},
			VirtualAgentOutput: diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs{
				CurrentPage: &diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs{
					DisplayName: pulumi.String("string"),
					Name:        pulumi.String("string"),
				},
				SessionParameters: pulumi.String("string"),
				TextResponses: diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArray{
					&diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs{
						Texts: pulumi.StringArray{
							pulumi.String("string"),
						},
					},
				},
				TriggeredIntent: &diagflow.CxTestCaseTestCaseConversationTurnVirtualAgentOutputTriggeredIntentArgs{
					DisplayName: pulumi.String("string"),
					Name:        pulumi.String("string"),
				},
			},
		},
	},
	TestConfig: &diagflow.CxTestCaseTestConfigArgs{
		Flow: pulumi.String("string"),
		Page: pulumi.String("string"),
		TrackingParameters: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
})
var cxTestCaseResource = new CxTestCase("cxTestCaseResource", CxTestCaseArgs.builder()
    .displayName("string")
    .notes("string")
    .parent("string")
    .tags("string")
    .testCaseConversationTurns(CxTestCaseTestCaseConversationTurnArgs.builder()
        .userInput(CxTestCaseTestCaseConversationTurnUserInputArgs.builder()
            .enableSentimentAnalysis(false)
            .injectedParameters("string")
            .input(CxTestCaseTestCaseConversationTurnUserInputInputArgs.builder()
                .dtmf(CxTestCaseTestCaseConversationTurnUserInputInputDtmfArgs.builder()
                    .digits("string")
                    .finishDigit("string")
                    .build())
                .event(CxTestCaseTestCaseConversationTurnUserInputInputEventArgs.builder()
                    .event("string")
                    .build())
                .languageCode("string")
                .text(CxTestCaseTestCaseConversationTurnUserInputInputTextArgs.builder()
                    .text("string")
                    .build())
                .build())
            .isWebhookEnabled(false)
            .build())
        .virtualAgentOutput(CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs.builder()
            .currentPage(CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs.builder()
                .displayName("string")
                .name("string")
                .build())
            .sessionParameters("string")
            .textResponses(CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs.builder()
                .texts("string")
                .build())
            .triggeredIntent(CxTestCaseTestCaseConversationTurnVirtualAgentOutputTriggeredIntentArgs.builder()
                .displayName("string")
                .name("string")
                .build())
            .build())
        .build())
    .testConfig(CxTestCaseTestConfigArgs.builder()
        .flow("string")
        .page("string")
        .trackingParameters("string")
        .build())
    .build());
cx_test_case_resource = gcp.diagflow.CxTestCase("cxTestCaseResource",
    display_name="string",
    notes="string",
    parent="string",
    tags=["string"],
    test_case_conversation_turns=[{
        "user_input": {
            "enable_sentiment_analysis": False,
            "injected_parameters": "string",
            "input": {
                "dtmf": {
                    "digits": "string",
                    "finish_digit": "string",
                },
                "event": {
                    "event": "string",
                },
                "language_code": "string",
                "text": {
                    "text": "string",
                },
            },
            "is_webhook_enabled": False,
        },
        "virtual_agent_output": {
            "current_page": {
                "display_name": "string",
                "name": "string",
            },
            "session_parameters": "string",
            "text_responses": [{
                "texts": ["string"],
            }],
            "triggered_intent": {
                "display_name": "string",
                "name": "string",
            },
        },
    }],
    test_config={
        "flow": "string",
        "page": "string",
        "tracking_parameters": ["string"],
    })
const cxTestCaseResource = new gcp.diagflow.CxTestCase("cxTestCaseResource", {
    displayName: "string",
    notes: "string",
    parent: "string",
    tags: ["string"],
    testCaseConversationTurns: [{
        userInput: {
            enableSentimentAnalysis: false,
            injectedParameters: "string",
            input: {
                dtmf: {
                    digits: "string",
                    finishDigit: "string",
                },
                event: {
                    event: "string",
                },
                languageCode: "string",
                text: {
                    text: "string",
                },
            },
            isWebhookEnabled: false,
        },
        virtualAgentOutput: {
            currentPage: {
                displayName: "string",
                name: "string",
            },
            sessionParameters: "string",
            textResponses: [{
                texts: ["string"],
            }],
            triggeredIntent: {
                displayName: "string",
                name: "string",
            },
        },
    }],
    testConfig: {
        flow: "string",
        page: "string",
        trackingParameters: ["string"],
    },
});
type: gcp:diagflow:CxTestCase
properties:
    displayName: string
    notes: string
    parent: string
    tags:
        - string
    testCaseConversationTurns:
        - userInput:
            enableSentimentAnalysis: false
            injectedParameters: string
            input:
                dtmf:
                    digits: string
                    finishDigit: string
                event:
                    event: string
                languageCode: string
                text:
                    text: string
            isWebhookEnabled: false
          virtualAgentOutput:
            currentPage:
                displayName: string
                name: string
            sessionParameters: string
            textResponses:
                - texts:
                    - string
            triggeredIntent:
                displayName: string
                name: string
    testConfig:
        flow: string
        page: string
        trackingParameters:
            - string
CxTestCase Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The CxTestCase resource accepts the following input properties:
- DisplayName string
- 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.
- Parent string
- The agent to create the test case for. Format: projects//locations//agents/.
- List<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
- TestCase List<CxConversation Turns Test Case Test Case Conversation Turn> 
- 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. Structure is documented below.
- TestConfig CxTest Case Test Config 
- Config for the test case. Structure is documented below.
- DisplayName string
- 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.
- Parent string
- The agent to create the test case for. Format: projects//locations//agents/.
- []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
- TestCase []CxConversation Turns Test Case Test Case Conversation Turn Args 
- 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. Structure is documented below.
- TestConfig CxTest Case Test Config Args 
- Config for the test case. Structure is documented below.
- displayName String
- 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.
- parent String
- The agent to create the test case for. Format: projects//locations//agents/.
- List<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
- testCase List<CxConversation Turns Test Case Test Case Conversation Turn> 
- 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. Structure is documented below.
- testConfig CxTest Case Test Config 
- Config for the test case. Structure is documented below.
- displayName string
- 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.
- parent string
- The agent to create the test case for. Format: projects//locations//agents/.
- 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
- testCase CxConversation Turns Test Case Test Case Conversation Turn[] 
- 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. Structure is documented below.
- testConfig CxTest Case Test Config 
- Config for the test case. Structure is documented below.
- display_name str
- The human-readable name of the test case, unique within the agent. Limit of 200 characters.
- notes str
- Additional freeform notes about the test case. Limit of 400 characters.
- parent str
- The agent to create the test case for. Format: projects//locations//agents/.
- Sequence[str]
- 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
- test_case_ Sequence[Cxconversation_ turns Test Case Test Case Conversation Turn Args] 
- 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. Structure is documented below.
- test_config CxTest Case Test Config Args 
- Config for the test case. Structure is documented below.
- displayName String
- 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.
- parent String
- The agent to create the test case for. Format: projects//locations//agents/.
- List<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
- testCase List<Property Map>Conversation Turns 
- 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. Structure is documented below.
- testConfig Property Map
- Config for the test case. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the CxTestCase resource produces the following output properties:
- CreationTime string
- When the test was created. A timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastTest List<CxResults Test Case Last Test Result> 
- The latest test result. Structure is documented below.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- CreationTime string
- When the test was created. A timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- LastTest []CxResults Test Case Last Test Result 
- The latest test result. Structure is documented below.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- creationTime String
- When the test was created. A timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- lastTest List<CxResults Test Case Last Test Result> 
- The latest test result. Structure is documented below.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- creationTime string
- When the test was created. A timestamp in RFC3339 text format.
- id string
- The provider-assigned unique ID for this managed resource.
- lastTest CxResults Test Case Last Test Result[] 
- The latest test result. Structure is documented below.
- name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- creation_time str
- When the test was created. A timestamp in RFC3339 text format.
- id str
- The provider-assigned unique ID for this managed resource.
- last_test_ Sequence[Cxresults Test Case Last Test Result] 
- The latest test result. Structure is documented below.
- name str
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- creationTime String
- When the test was created. A timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- lastTest List<Property Map>Results 
- The latest test result. Structure is documented below.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
Look up Existing CxTestCase Resource
Get an existing CxTestCase resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: CxTestCaseState, opts?: CustomResourceOptions): CxTestCase@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        creation_time: Optional[str] = None,
        display_name: Optional[str] = None,
        last_test_results: Optional[Sequence[CxTestCaseLastTestResultArgs]] = None,
        name: Optional[str] = None,
        notes: Optional[str] = None,
        parent: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        test_case_conversation_turns: Optional[Sequence[CxTestCaseTestCaseConversationTurnArgs]] = None,
        test_config: Optional[CxTestCaseTestConfigArgs] = None) -> CxTestCasefunc GetCxTestCase(ctx *Context, name string, id IDInput, state *CxTestCaseState, opts ...ResourceOption) (*CxTestCase, error)public static CxTestCase Get(string name, Input<string> id, CxTestCaseState? state, CustomResourceOptions? opts = null)public static CxTestCase get(String name, Output<String> id, CxTestCaseState state, CustomResourceOptions options)resources:  _:    type: gcp:diagflow:CxTestCase    get:      id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- CreationTime string
- When the test was created. A timestamp in RFC3339 text format.
- DisplayName string
- The human-readable name of the test case, unique within the agent. Limit of 200 characters.
- LastTest List<CxResults Test Case Last Test Result> 
- The latest test result. Structure is documented below.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- Notes string
- Additional freeform notes about the test case. Limit of 400 characters.
- Parent string
- The agent to create the test case for. Format: projects//locations//agents/.
- List<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
- TestCase List<CxConversation Turns Test Case Test Case Conversation Turn> 
- 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. Structure is documented below.
- TestConfig CxTest Case Test Config 
- Config for the test case. Structure is documented below.
- CreationTime string
- When the test was created. A timestamp in RFC3339 text format.
- DisplayName string
- The human-readable name of the test case, unique within the agent. Limit of 200 characters.
- LastTest []CxResults Test Case Last Test Result Args 
- The latest test result. Structure is documented below.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- Notes string
- Additional freeform notes about the test case. Limit of 400 characters.
- Parent string
- The agent to create the test case for. Format: projects//locations//agents/.
- []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
- TestCase []CxConversation Turns Test Case Test Case Conversation Turn Args 
- 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. Structure is documented below.
- TestConfig CxTest Case Test Config Args 
- Config for the test case. Structure is documented below.
- creationTime String
- When the test was created. A timestamp in RFC3339 text format.
- displayName String
- The human-readable name of the test case, unique within the agent. Limit of 200 characters.
- lastTest List<CxResults Test Case Last Test Result> 
- The latest test result. Structure is documented below.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- notes String
- Additional freeform notes about the test case. Limit of 400 characters.
- parent String
- The agent to create the test case for. Format: projects//locations//agents/.
- List<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
- testCase List<CxConversation Turns Test Case Test Case Conversation Turn> 
- 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. Structure is documented below.
- testConfig CxTest Case Test Config 
- Config for the test case. Structure is documented below.
- creationTime string
- When the test was created. A timestamp in RFC3339 text format.
- displayName string
- The human-readable name of the test case, unique within the agent. Limit of 200 characters.
- lastTest CxResults Test Case Last Test Result[] 
- The latest test result. Structure is documented below.
- name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- notes string
- Additional freeform notes about the test case. Limit of 400 characters.
- parent string
- The agent to create the test case for. Format: projects//locations//agents/.
- 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
- testCase CxConversation Turns Test Case Test Case Conversation Turn[] 
- 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. Structure is documented below.
- testConfig CxTest Case Test Config 
- Config for the test case. Structure is documented below.
- creation_time str
- When the test was created. A timestamp in RFC3339 text format.
- display_name str
- The human-readable name of the test case, unique within the agent. Limit of 200 characters.
- last_test_ Sequence[Cxresults Test Case Last Test Result Args] 
- The latest test result. Structure is documented below.
- name str
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- notes str
- Additional freeform notes about the test case. Limit of 400 characters.
- parent str
- The agent to create the test case for. Format: projects//locations//agents/.
- Sequence[str]
- 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
- test_case_ Sequence[Cxconversation_ turns Test Case Test Case Conversation Turn Args] 
- 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. Structure is documented below.
- test_config CxTest Case Test Config Args 
- Config for the test case. Structure is documented below.
- creationTime String
- When the test was created. A timestamp in RFC3339 text format.
- displayName String
- The human-readable name of the test case, unique within the agent. Limit of 200 characters.
- lastTest List<Property Map>Results 
- The latest test result. Structure is documented below.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- notes String
- Additional freeform notes about the test case. Limit of 400 characters.
- parent String
- The agent to create the test case for. Format: projects//locations//agents/.
- List<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
- testCase List<Property Map>Conversation Turns 
- 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. Structure is documented below.
- testConfig Property Map
- Config for the test case. Structure is documented below.
Supporting Types
CxTestCaseLastTestResult, CxTestCaseLastTestResultArgs            
- ConversationTurns List<CxTest Case Last Test Result Conversation Turn> 
- The conversation turns uttered during the test case replay in chronological order. Structure is documented below.
- Environment string
- Environment where the test was run. If not set, it indicates the draft environment.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- TestResult string
- Whether the test case passed in the agent environment.- PASSED: The test passed.
- FAILED: The test did not pass.
Possible values are: PASSED,FAILED.
 
- TestTime string
- The time that the test was run. A timestamp in RFC3339 text format.
- ConversationTurns []CxTest Case Last Test Result Conversation Turn 
- The conversation turns uttered during the test case replay in chronological order. Structure is documented below.
- Environment string
- Environment where the test was run. If not set, it indicates the draft environment.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- TestResult string
- Whether the test case passed in the agent environment.- PASSED: The test passed.
- FAILED: The test did not pass.
Possible values are: PASSED,FAILED.
 
- TestTime string
- The time that the test was run. A timestamp in RFC3339 text format.
- conversationTurns List<CxTest Case Last Test Result Conversation Turn> 
- The conversation turns uttered during the test case replay in chronological order. Structure is documented below.
- environment String
- Environment where the test was run. If not set, it indicates the draft environment.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- testResult String
- Whether the test case passed in the agent environment.- PASSED: The test passed.
- FAILED: The test did not pass.
Possible values are: PASSED,FAILED.
 
- testTime String
- The time that the test was run. A timestamp in RFC3339 text format.
- conversationTurns CxTest Case Last Test Result Conversation Turn[] 
- The conversation turns uttered during the test case replay in chronological order. Structure is documented below.
- environment string
- Environment where the test was run. If not set, it indicates the draft environment.
- name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- testResult string
- Whether the test case passed in the agent environment.- PASSED: The test passed.
- FAILED: The test did not pass.
Possible values are: PASSED,FAILED.
 
- testTime string
- The time that the test was run. A timestamp in RFC3339 text format.
- conversation_turns Sequence[CxTest Case Last Test Result Conversation Turn] 
- The conversation turns uttered during the test case replay in chronological order. Structure is documented below.
- environment str
- Environment where the test was run. If not set, it indicates the draft environment.
- name str
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- test_result str
- Whether the test case passed in the agent environment.- PASSED: The test passed.
- FAILED: The test did not pass.
Possible values are: PASSED,FAILED.
 
- test_time str
- The time that the test was run. A timestamp in RFC3339 text format.
- conversationTurns List<Property Map>
- The conversation turns uttered during the test case replay in chronological order. Structure is documented below.
- environment String
- Environment where the test was run. If not set, it indicates the draft environment.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- testResult String
- Whether the test case passed in the agent environment.- PASSED: The test passed.
- FAILED: The test did not pass.
Possible values are: PASSED,FAILED.
 
- testTime String
- The time that the test was run. A timestamp in RFC3339 text format.
CxTestCaseLastTestResultConversationTurn, CxTestCaseLastTestResultConversationTurnArgs                
- UserInput CxTest Case Last Test Result Conversation Turn User Input 
- The user input. Structure is documented below.
- VirtualAgent CxOutput Test Case Last Test Result Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- UserInput CxTest Case Last Test Result Conversation Turn User Input 
- The user input. Structure is documented below.
- VirtualAgent CxOutput Test Case Last Test Result Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- userInput CxTest Case Last Test Result Conversation Turn User Input 
- The user input. Structure is documented below.
- virtualAgent CxOutput Test Case Last Test Result Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- userInput CxTest Case Last Test Result Conversation Turn User Input 
- The user input. Structure is documented below.
- virtualAgent CxOutput Test Case Last Test Result Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- user_input CxTest Case Last Test Result Conversation Turn User Input 
- The user input. Structure is documented below.
- virtual_agent_ Cxoutput Test Case Last Test Result Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- userInput Property Map
- The user input. Structure is documented below.
- virtualAgent Property MapOutput 
- The virtual agent output. Structure is documented below.
CxTestCaseLastTestResultConversationTurnUserInput, CxTestCaseLastTestResultConversationTurnUserInputArgs                    
- EnableSentiment boolAnalysis 
- Whether sentiment analysis is enabled.
- InjectedParameters string
- Parameters that need to be injected into the conversation during intent detection.
- Input
CxTest Case Last Test Result Conversation Turn User Input Input 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- IsWebhook boolEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- EnableSentiment boolAnalysis 
- Whether sentiment analysis is enabled.
- InjectedParameters string
- Parameters that need to be injected into the conversation during intent detection.
- Input
CxTest Case Last Test Result Conversation Turn User Input Input Type 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- IsWebhook boolEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- enableSentiment BooleanAnalysis 
- Whether sentiment analysis is enabled.
- injectedParameters String
- Parameters that need to be injected into the conversation during intent detection.
- input
CxTest Case Last Test Result Conversation Turn User Input Input 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- isWebhook BooleanEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- enableSentiment booleanAnalysis 
- Whether sentiment analysis is enabled.
- injectedParameters string
- Parameters that need to be injected into the conversation during intent detection.
- input
CxTest Case Last Test Result Conversation Turn User Input Input 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- isWebhook booleanEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- enable_sentiment_ boolanalysis 
- Whether sentiment analysis is enabled.
- injected_parameters str
- Parameters that need to be injected into the conversation during intent detection.
- input
CxTest Case Last Test Result Conversation Turn User Input Input 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- is_webhook_ boolenabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- enableSentiment BooleanAnalysis 
- Whether sentiment analysis is enabled.
- injectedParameters String
- Parameters that need to be injected into the conversation during intent detection.
- input Property Map
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- isWebhook BooleanEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
CxTestCaseLastTestResultConversationTurnUserInputInput, CxTestCaseLastTestResultConversationTurnUserInputInputArgs                      
- Dtmf
CxTest Case Last Test Result Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- Event
CxTest Case Last Test Result Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- LanguageCode string
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- Text
CxTest Case Last Test Result Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- Dtmf
CxTest Case Last Test Result Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- Event
CxTest Case Last Test Result Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- LanguageCode string
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- Text
CxTest Case Last Test Result Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- dtmf
CxTest Case Last Test Result Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- event
CxTest Case Last Test Result Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- languageCode String
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- text
CxTest Case Last Test Result Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- dtmf
CxTest Case Last Test Result Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- event
CxTest Case Last Test Result Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- languageCode string
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- text
CxTest Case Last Test Result Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- dtmf
CxTest Case Last Test Result Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- event
CxTest Case Last Test Result Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- language_code str
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- text
CxTest Case Last Test Result Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- dtmf Property Map
- The DTMF event to be handled. Structure is documented below.
- event Property Map
- The event to be triggered. Structure is documented below.
- languageCode String
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- text Property Map
- The natural language text to be processed. Structure is documented below.
CxTestCaseLastTestResultConversationTurnUserInputInputDtmf, CxTestCaseLastTestResultConversationTurnUserInputInputDtmfArgs                        
- Digits string
- The dtmf digits.
- FinishDigit string
- The finish digit (if any).
- Digits string
- The dtmf digits.
- FinishDigit string
- The finish digit (if any).
- digits String
- The dtmf digits.
- finishDigit String
- The finish digit (if any).
- digits string
- The dtmf digits.
- finishDigit string
- The finish digit (if any).
- digits str
- The dtmf digits.
- finish_digit str
- The finish digit (if any).
- digits String
- The dtmf digits.
- finishDigit String
- The finish digit (if any).
CxTestCaseLastTestResultConversationTurnUserInputInputEvent, CxTestCaseLastTestResultConversationTurnUserInputInputEventArgs                        
- Event string
- Name of the event.
- Event string
- Name of the event.
- event String
- Name of the event.
- event string
- Name of the event.
- event str
- Name of the event.
- event String
- Name of the event.
CxTestCaseLastTestResultConversationTurnUserInputInputText, CxTestCaseLastTestResultConversationTurnUserInputInputTextArgs                        
- Text string
- The natural language text to be processed. Text length must not exceed 256 characters.
- Text string
- The natural language text to be processed. Text length must not exceed 256 characters.
- text String
- The natural language text to be processed. Text length must not exceed 256 characters.
- text string
- The natural language text to be processed. Text length must not exceed 256 characters.
- text str
- The natural language text to be processed. Text length must not exceed 256 characters.
- text String
- The natural language text to be processed. Text length must not exceed 256 characters.
CxTestCaseLastTestResultConversationTurnVirtualAgentOutput, CxTestCaseLastTestResultConversationTurnVirtualAgentOutputArgs                      
- CurrentPage CxTest Case Last Test Result Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- Differences
List<CxTest Case Last Test Result Conversation Turn Virtual Agent Output Difference> 
- The list of differences between the original run and the replay for this output, if any. Structure is documented below.
- SessionParameters string
- The session parameters available to the bot at this point.
- Status
CxTest Case Last Test Result Conversation Turn Virtual Agent Output Status 
- Response error from the agent in the test result. If set, other output is empty. Structure is documented below.
- TextResponses List<CxTest Case Last Test Result Conversation Turn Virtual Agent Output Text Response> 
- The text responses from the agent for the turn. Structure is documented below.
- TriggeredIntent CxTest Case Last Test Result Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- CurrentPage CxTest Case Last Test Result Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- Differences
[]CxTest Case Last Test Result Conversation Turn Virtual Agent Output Difference 
- The list of differences between the original run and the replay for this output, if any. Structure is documented below.
- SessionParameters string
- The session parameters available to the bot at this point.
- Status
CxTest Case Last Test Result Conversation Turn Virtual Agent Output Status 
- Response error from the agent in the test result. If set, other output is empty. Structure is documented below.
- TextResponses []CxTest Case Last Test Result Conversation Turn Virtual Agent Output Text Response 
- The text responses from the agent for the turn. Structure is documented below.
- TriggeredIntent CxTest Case Last Test Result Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- currentPage CxTest Case Last Test Result Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- differences
List<CxTest Case Last Test Result Conversation Turn Virtual Agent Output Difference> 
- The list of differences between the original run and the replay for this output, if any. Structure is documented below.
- sessionParameters String
- The session parameters available to the bot at this point.
- status
CxTest Case Last Test Result Conversation Turn Virtual Agent Output Status 
- Response error from the agent in the test result. If set, other output is empty. Structure is documented below.
- textResponses List<CxTest Case Last Test Result Conversation Turn Virtual Agent Output Text Response> 
- The text responses from the agent for the turn. Structure is documented below.
- triggeredIntent CxTest Case Last Test Result Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- currentPage CxTest Case Last Test Result Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- differences
CxTest Case Last Test Result Conversation Turn Virtual Agent Output Difference[] 
- The list of differences between the original run and the replay for this output, if any. Structure is documented below.
- sessionParameters string
- The session parameters available to the bot at this point.
- status
CxTest Case Last Test Result Conversation Turn Virtual Agent Output Status 
- Response error from the agent in the test result. If set, other output is empty. Structure is documented below.
- textResponses CxTest Case Last Test Result Conversation Turn Virtual Agent Output Text Response[] 
- The text responses from the agent for the turn. Structure is documented below.
- triggeredIntent CxTest Case Last Test Result Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- current_page CxTest Case Last Test Result Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- differences
Sequence[CxTest Case Last Test Result Conversation Turn Virtual Agent Output Difference] 
- The list of differences between the original run and the replay for this output, if any. Structure is documented below.
- session_parameters str
- The session parameters available to the bot at this point.
- status
CxTest Case Last Test Result Conversation Turn Virtual Agent Output Status 
- Response error from the agent in the test result. If set, other output is empty. Structure is documented below.
- text_responses Sequence[CxTest Case Last Test Result Conversation Turn Virtual Agent Output Text Response] 
- The text responses from the agent for the turn. Structure is documented below.
- triggered_intent CxTest Case Last Test Result Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- currentPage Property Map
- The Page on which the utterance was spoken. Structure is documented below.
- differences List<Property Map>
- The list of differences between the original run and the replay for this output, if any. Structure is documented below.
- sessionParameters String
- The session parameters available to the bot at this point.
- status Property Map
- Response error from the agent in the test result. If set, other output is empty. Structure is documented below.
- textResponses List<Property Map>
- The text responses from the agent for the turn. Structure is documented below.
- triggeredIntent Property Map
- The Intent that triggered the response. Structure is documented below.
CxTestCaseLastTestResultConversationTurnVirtualAgentOutputCurrentPage, CxTestCaseLastTestResultConversationTurnVirtualAgentOutputCurrentPageArgs                          
- DisplayName string
- (Output) The human-readable name of the page, unique within the flow.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- DisplayName string
- (Output) The human-readable name of the page, unique within the flow.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- displayName String
- (Output) The human-readable name of the page, unique within the flow.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- displayName string
- (Output) The human-readable name of the page, unique within the flow.
- name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- display_name str
- (Output) The human-readable name of the page, unique within the flow.
- name str
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- displayName String
- (Output) The human-readable name of the page, unique within the flow.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
CxTestCaseLastTestResultConversationTurnVirtualAgentOutputDifference, CxTestCaseLastTestResultConversationTurnVirtualAgentOutputDifferenceArgs                        
- Description string
- A human readable description of the diff, showing the actual output vs expected output.
- Type string
- The type of diff.- INTENT: The intent.
- PAGE: The page.
- PARAMETERS: The parameters.
- UTTERANCE: The message utterance.
- FLOW: The flow.
Possible values are: INTENT,PAGE,PARAMETERS,UTTERANCE,FLOW.
 
- Description string
- A human readable description of the diff, showing the actual output vs expected output.
- Type string
- The type of diff.- INTENT: The intent.
- PAGE: The page.
- PARAMETERS: The parameters.
- UTTERANCE: The message utterance.
- FLOW: The flow.
Possible values are: INTENT,PAGE,PARAMETERS,UTTERANCE,FLOW.
 
- description String
- A human readable description of the diff, showing the actual output vs expected output.
- type String
- The type of diff.- INTENT: The intent.
- PAGE: The page.
- PARAMETERS: The parameters.
- UTTERANCE: The message utterance.
- FLOW: The flow.
Possible values are: INTENT,PAGE,PARAMETERS,UTTERANCE,FLOW.
 
- description string
- A human readable description of the diff, showing the actual output vs expected output.
- type string
- The type of diff.- INTENT: The intent.
- PAGE: The page.
- PARAMETERS: The parameters.
- UTTERANCE: The message utterance.
- FLOW: The flow.
Possible values are: INTENT,PAGE,PARAMETERS,UTTERANCE,FLOW.
 
- description str
- A human readable description of the diff, showing the actual output vs expected output.
- type str
- The type of diff.- INTENT: The intent.
- PAGE: The page.
- PARAMETERS: The parameters.
- UTTERANCE: The message utterance.
- FLOW: The flow.
Possible values are: INTENT,PAGE,PARAMETERS,UTTERANCE,FLOW.
 
- description String
- A human readable description of the diff, showing the actual output vs expected output.
- type String
- The type of diff.- INTENT: The intent.
- PAGE: The page.
- PARAMETERS: The parameters.
- UTTERANCE: The message utterance.
- FLOW: The flow.
Possible values are: INTENT,PAGE,PARAMETERS,UTTERANCE,FLOW.
 
CxTestCaseLastTestResultConversationTurnVirtualAgentOutputStatus, CxTestCaseLastTestResultConversationTurnVirtualAgentOutputStatusArgs                        
CxTestCaseLastTestResultConversationTurnVirtualAgentOutputTextResponse, CxTestCaseLastTestResultConversationTurnVirtualAgentOutputTextResponseArgs                          
- Texts List<string>
- A collection of text responses.
- Texts []string
- A collection of text responses.
- texts List<String>
- A collection of text responses.
- texts string[]
- A collection of text responses.
- texts Sequence[str]
- A collection of text responses.
- texts List<String>
- A collection of text responses.
CxTestCaseLastTestResultConversationTurnVirtualAgentOutputTriggeredIntent, CxTestCaseLastTestResultConversationTurnVirtualAgentOutputTriggeredIntentArgs                          
- DisplayName string
- (Output) The human-readable name of the intent, unique within the agent.
- Name string
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- DisplayName string
- (Output) The human-readable name of the intent, unique within the agent.
- Name string
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- displayName String
- (Output) The human-readable name of the intent, unique within the agent.
- name String
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- displayName string
- (Output) The human-readable name of the intent, unique within the agent.
- name string
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- display_name str
- (Output) The human-readable name of the intent, unique within the agent.
- name str
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- displayName String
- (Output) The human-readable name of the intent, unique within the agent.
- name String
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
CxTestCaseTestCaseConversationTurn, CxTestCaseTestCaseConversationTurnArgs              
- UserInput CxTest Case Test Case Conversation Turn User Input 
- The user input. Structure is documented below.
- VirtualAgent CxOutput Test Case Test Case Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- UserInput CxTest Case Test Case Conversation Turn User Input 
- The user input. Structure is documented below.
- VirtualAgent CxOutput Test Case Test Case Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- userInput CxTest Case Test Case Conversation Turn User Input 
- The user input. Structure is documented below.
- virtualAgent CxOutput Test Case Test Case Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- userInput CxTest Case Test Case Conversation Turn User Input 
- The user input. Structure is documented below.
- virtualAgent CxOutput Test Case Test Case Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- user_input CxTest Case Test Case Conversation Turn User Input 
- The user input. Structure is documented below.
- virtual_agent_ Cxoutput Test Case Test Case Conversation Turn Virtual Agent Output 
- The virtual agent output. Structure is documented below.
- userInput Property Map
- The user input. Structure is documented below.
- virtualAgent Property MapOutput 
- The virtual agent output. Structure is documented below.
CxTestCaseTestCaseConversationTurnUserInput, CxTestCaseTestCaseConversationTurnUserInputArgs                  
- EnableSentiment boolAnalysis 
- Whether sentiment analysis is enabled.
- InjectedParameters string
- Parameters that need to be injected into the conversation during intent detection.
- Input
CxTest Case Test Case Conversation Turn User Input Input 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- IsWebhook boolEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- EnableSentiment boolAnalysis 
- Whether sentiment analysis is enabled.
- InjectedParameters string
- Parameters that need to be injected into the conversation during intent detection.
- Input
CxTest Case Test Case Conversation Turn User Input Input Type 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- IsWebhook boolEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- enableSentiment BooleanAnalysis 
- Whether sentiment analysis is enabled.
- injectedParameters String
- Parameters that need to be injected into the conversation during intent detection.
- input
CxTest Case Test Case Conversation Turn User Input Input 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- isWebhook BooleanEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- enableSentiment booleanAnalysis 
- Whether sentiment analysis is enabled.
- injectedParameters string
- Parameters that need to be injected into the conversation during intent detection.
- input
CxTest Case Test Case Conversation Turn User Input Input 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- isWebhook booleanEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- enable_sentiment_ boolanalysis 
- Whether sentiment analysis is enabled.
- injected_parameters str
- Parameters that need to be injected into the conversation during intent detection.
- input
CxTest Case Test Case Conversation Turn User Input Input 
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- is_webhook_ boolenabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
- enableSentiment BooleanAnalysis 
- Whether sentiment analysis is enabled.
- injectedParameters String
- Parameters that need to be injected into the conversation during intent detection.
- input Property Map
- User input. Supports text input, event input, dtmf input in the test case. Structure is documented below.
- isWebhook BooleanEnabled 
- If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
CxTestCaseTestCaseConversationTurnUserInputInput, CxTestCaseTestCaseConversationTurnUserInputInputArgs                    
- Dtmf
CxTest Case Test Case Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- Event
CxTest Case Test Case Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- LanguageCode string
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- Text
CxTest Case Test Case Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- Dtmf
CxTest Case Test Case Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- Event
CxTest Case Test Case Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- LanguageCode string
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- Text
CxTest Case Test Case Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- dtmf
CxTest Case Test Case Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- event
CxTest Case Test Case Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- languageCode String
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- text
CxTest Case Test Case Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- dtmf
CxTest Case Test Case Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- event
CxTest Case Test Case Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- languageCode string
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- text
CxTest Case Test Case Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- dtmf
CxTest Case Test Case Conversation Turn User Input Input Dtmf 
- The DTMF event to be handled. Structure is documented below.
- event
CxTest Case Test Case Conversation Turn User Input Input Event 
- The event to be triggered. Structure is documented below.
- language_code str
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- text
CxTest Case Test Case Conversation Turn User Input Input Text 
- The natural language text to be processed. Structure is documented below.
- dtmf Property Map
- The DTMF event to be handled. Structure is documented below.
- event Property Map
- The event to be triggered. Structure is documented below.
- languageCode String
- The language of the input. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
- text Property Map
- The natural language text to be processed. Structure is documented below.
CxTestCaseTestCaseConversationTurnUserInputInputDtmf, CxTestCaseTestCaseConversationTurnUserInputInputDtmfArgs                      
- Digits string
- The dtmf digits.
- FinishDigit string
- The finish digit (if any).
- Digits string
- The dtmf digits.
- FinishDigit string
- The finish digit (if any).
- digits String
- The dtmf digits.
- finishDigit String
- The finish digit (if any).
- digits string
- The dtmf digits.
- finishDigit string
- The finish digit (if any).
- digits str
- The dtmf digits.
- finish_digit str
- The finish digit (if any).
- digits String
- The dtmf digits.
- finishDigit String
- The finish digit (if any).
CxTestCaseTestCaseConversationTurnUserInputInputEvent, CxTestCaseTestCaseConversationTurnUserInputInputEventArgs                      
- Event string
- Name of the event.
- Event string
- Name of the event.
- event String
- Name of the event.
- event string
- Name of the event.
- event str
- Name of the event.
- event String
- Name of the event.
CxTestCaseTestCaseConversationTurnUserInputInputText, CxTestCaseTestCaseConversationTurnUserInputInputTextArgs                      
- Text string
- The natural language text to be processed. Text length must not exceed 256 characters.
- Text string
- The natural language text to be processed. Text length must not exceed 256 characters.
- text String
- The natural language text to be processed. Text length must not exceed 256 characters.
- text string
- The natural language text to be processed. Text length must not exceed 256 characters.
- text str
- The natural language text to be processed. Text length must not exceed 256 characters.
- text String
- The natural language text to be processed. Text length must not exceed 256 characters.
CxTestCaseTestCaseConversationTurnVirtualAgentOutput, CxTestCaseTestCaseConversationTurnVirtualAgentOutputArgs                    
- CurrentPage CxTest Case Test Case Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- SessionParameters string
- The session parameters available to the bot at this point.
- TextResponses List<CxTest Case Test Case Conversation Turn Virtual Agent Output Text Response> 
- The text responses from the agent for the turn. Structure is documented below.
- TriggeredIntent CxTest Case Test Case Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- CurrentPage CxTest Case Test Case Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- SessionParameters string
- The session parameters available to the bot at this point.
- TextResponses []CxTest Case Test Case Conversation Turn Virtual Agent Output Text Response 
- The text responses from the agent for the turn. Structure is documented below.
- TriggeredIntent CxTest Case Test Case Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- currentPage CxTest Case Test Case Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- sessionParameters String
- The session parameters available to the bot at this point.
- textResponses List<CxTest Case Test Case Conversation Turn Virtual Agent Output Text Response> 
- The text responses from the agent for the turn. Structure is documented below.
- triggeredIntent CxTest Case Test Case Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- currentPage CxTest Case Test Case Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- sessionParameters string
- The session parameters available to the bot at this point.
- textResponses CxTest Case Test Case Conversation Turn Virtual Agent Output Text Response[] 
- The text responses from the agent for the turn. Structure is documented below.
- triggeredIntent CxTest Case Test Case Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- current_page CxTest Case Test Case Conversation Turn Virtual Agent Output Current Page 
- The Page on which the utterance was spoken. Structure is documented below.
- session_parameters str
- The session parameters available to the bot at this point.
- text_responses Sequence[CxTest Case Test Case Conversation Turn Virtual Agent Output Text Response] 
- The text responses from the agent for the turn. Structure is documented below.
- triggered_intent CxTest Case Test Case Conversation Turn Virtual Agent Output Triggered Intent 
- The Intent that triggered the response. Structure is documented below.
- currentPage Property Map
- The Page on which the utterance was spoken. Structure is documented below.
- sessionParameters String
- The session parameters available to the bot at this point.
- textResponses List<Property Map>
- The text responses from the agent for the turn. Structure is documented below.
- triggeredIntent Property Map
- The Intent that triggered the response. Structure is documented below.
CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPage, CxTestCaseTestCaseConversationTurnVirtualAgentOutputCurrentPageArgs                        
- DisplayName string
- (Output) The human-readable name of the page, unique within the flow.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- DisplayName string
- (Output) The human-readable name of the page, unique within the flow.
- Name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- displayName String
- (Output) The human-readable name of the page, unique within the flow.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- displayName string
- (Output) The human-readable name of the page, unique within the flow.
- name string
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- display_name str
- (Output) The human-readable name of the page, unique within the flow.
- name str
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
- displayName String
- (Output) The human-readable name of the page, unique within the flow.
- name String
- The unique identifier of the page. Format: projects//locations//agents//flows//pages/.
CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponse, CxTestCaseTestCaseConversationTurnVirtualAgentOutputTextResponseArgs                        
- Texts List<string>
- A collection of text responses.
- Texts []string
- A collection of text responses.
- texts List<String>
- A collection of text responses.
- texts string[]
- A collection of text responses.
- texts Sequence[str]
- A collection of text responses.
- texts List<String>
- A collection of text responses.
CxTestCaseTestCaseConversationTurnVirtualAgentOutputTriggeredIntent, CxTestCaseTestCaseConversationTurnVirtualAgentOutputTriggeredIntentArgs                        
- DisplayName string
- (Output) The human-readable name of the intent, unique within the agent.
- Name string
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- DisplayName string
- (Output) The human-readable name of the intent, unique within the agent.
- Name string
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- displayName String
- (Output) The human-readable name of the intent, unique within the agent.
- name String
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- displayName string
- (Output) The human-readable name of the intent, unique within the agent.
- name string
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- display_name str
- (Output) The human-readable name of the intent, unique within the agent.
- name str
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
- displayName String
- (Output) The human-readable name of the intent, unique within the agent.
- name String
- The unique identifier of the intent. Format: projects//locations//agents//intents/.
CxTestCaseTestConfig, CxTestCaseTestConfigArgs          
- Flow string
- Flow name to start the test case with. Format: projects//locations//agents//flows/. 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.
- Page string
- The page to start the test case with. Format: projects//locations//agents//flows//pages/. 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.
- TrackingParameters List<string>
- Session parameters to be compared when calculating differences.
- Flow string
- Flow name to start the test case with. Format: projects//locations//agents//flows/. 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.
- Page string
- The page to start the test case with. Format: projects//locations//agents//flows//pages/. 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.
- TrackingParameters []string
- Session parameters to be compared when calculating differences.
- flow String
- Flow name to start the test case with. Format: projects//locations//agents//flows/. 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.
- page String
- The page to start the test case with. Format: projects//locations//agents//flows//pages/. 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.
- trackingParameters List<String>
- Session parameters to be compared when calculating differences.
- flow string
- Flow name to start the test case with. Format: projects//locations//agents//flows/. 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.
- page string
- The page to start the test case with. Format: projects//locations//agents//flows//pages/. 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.
- trackingParameters string[]
- Session parameters to be compared when calculating differences.
- flow str
- Flow name to start the test case with. Format: projects//locations//agents//flows/. 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.
- page str
- The page to start the test case with. Format: projects//locations//agents//flows//pages/. 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.
- tracking_parameters Sequence[str]
- Session parameters to be compared when calculating differences.
- flow String
- Flow name to start the test case with. Format: projects//locations//agents//flows/. 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.
- page String
- The page to start the test case with. Format: projects//locations//agents//flows//pages/. 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.
- trackingParameters List<String>
- Session parameters to be compared when calculating differences.
Import
TestCase can be imported using any of these accepted formats:
- {{parent}}/testCases/{{name}}
When using the pulumi import command, TestCase can be imported using one of the formats above. For example:
$ pulumi import gcp:diagflow/cxTestCase:CxTestCase default {{parent}}/testCases/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the google-betaTerraform Provider.