[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe Actions simulator provides a web interface to test your Action by simulating various devices and their settings, including input methods and languages.\u003c/p\u003e\n"],["\u003cp\u003eYou can test different versions of your Action, including draft and published versions, and utilize features like Account Linking and a dedicated Test URL for isolated testing environments.\u003c/p\u003e\n"],["\u003cp\u003eThe simulator allows you to set a device's location for region-specific testing, offers audio playback control and Development Sandbox for payment testing, and can simulate unverified users for comprehensive testing scenarios.\u003c/p\u003e\n"],["\u003cp\u003eActions are testable for up to 30 days, and after 30 days you need to create a new version for testing on devices logged in with the same Google account as your Actions Console.\u003c/p\u003e\n"],["\u003cp\u003eInput methods for testing your action include Auto detect, Touch, Voice, and Keyboard, each having specific availability across different device types.\u003c/p\u003e\n"]]],["The Actions console simulator tests Actions projects via a web interface mimicking hardware devices. Key actions include: testing Actions projects with restrictions (30-day test period), selecting different input methods (auto-detect, touch, voice, keyboard), simulating various devices (Smart Display, Phone, Speaker, KaiOS), choosing languages and setting locations, and managing versions. Users can set test URLs, link or unlink accounts, test on physical devices, control audio playback, and utilize a development sandbox with uncharged payment methods.\n"],null,["# Simulator\n\nThe simulator in the [Actions console](https://console.actions.google.com) lets\nyou test your Action through an easy-to-use web interface that simulates hardware\ndevices and their settings. You can also access debug information such as the\nrequest and response that your fulfillment receives and sends.\n| **Note:** If you have unsaved changes to your fulfillment code in the inline editor and navigate to the simulator, you are prompted to deploy the changes to your code or use the previously saved and deployed code.\n\nTest a project\n--------------\n\nWhen testing your Actions project, the following restrictions apply:\n\n- Actions are testable for up to 30 days. After 30 days, you have to create a new version for testing.\n- In-development Actions can be tested on any supported hardware device (Android 6.0+, iOS 9.1+, and voice-activated speakers). The device must be logged into the same Google account you use in the Actions console. Saying *\"OK Google, talk to my test app\"* invokes the current draft version of your Action.\n- By default, the simulator uses the version of your Action that's in **Draft** . See how to [select another version to test](#select_a_version).\n\n| **Note:** When you're ready to submit your project for approval, the current state of your project's draft is assigned a version, and the state of the project is immutable. Future changes you make apply to the draft version of your project, which you then resubmit for approval as a new version.\n\nInput methods\n-------------\n\nYou can click the button in the response text field to specify the input method\nfor testing.\n\nThe following list describes the input types and the [devices](#specify_a_device)\nthey're available on:\n\n- **Auto detect** - Automatically detect voice, keyboard, or touch input.\n- **Touch** - Used for interactive experiences and elements, like suggestion chips. Available for Smart Display and Phone devices.\n- **Voice** - Used for voice-only input. Available for Smart Display, Phone, and Speaker devices.\n- **Keyboard** - Used for text-only input. Available for Phone devices.\n\nThe default input method is auto-detect. Based on the surface you select,\ninput types are also disabled and enabled accordingly.\n\nThe input method is included in every request to your fulfillment in the\n[`RawInput`](/assistant/conversational/reference/rest/Shared.Types/AppRequest#rawinput)\nobject as an [`inputType`](/assistant/conversational/reference/rest/Shared.Types/InputType)\nfield. \n\n {\n \"inputType\": \"VOICE\",\n \"query\": \"Tell me a fact about Google's headquarters\"\n }\n\n| **Note:** While the simulator lets you type responses for devices that don't actually have the keyboard input method (Smart Display, Speaker), the `inputType` field still correctly shows a value of `VOICE`.\n\nSpecify a device\n----------------\n\nThe simulator can mimic different devices and allow you to test your Action's\ndevice-specific experiences.\n\nTo change the simulated device, follow these steps:\n\n1. Click the device drop-down in the upper left corner. **Smart Display** is\n selected by default.\n\n2. Choose from the following devices to simulate:\n\n - **Smart Display** - Assistant-enabled devices like the Nest Hub that have display and speaker capabilities.\n - **Phone** - Assistant-enabled phones that have display and speaker capabilities.\n - **Speaker** - Assistant-enabled smart speaker that has speaker capabilities.\n - **KaiOS** - Assistant-enabled phones using [KaiOS](/assistant/surfaces/feature-entry-level-phones#kaios).\n\nSelect a language\n-----------------\n\nYou can select a language from the second drop-down menu to set the language and\nregion that you want to simulate. See the\n[localization documentation](/assistant/console/localization) for more\ninformation on creating multi-language Actions.\n| **Note:** When changing the language settings, the invocation phrase to invoke your Action changes to the corresponding language.\n\nSet a location\n--------------\n\nYou can manually set the coordinates and address of the device. This feature\nlets you test any location-targeting features that you've set in the console\nand region-specific responses that you've configured in your fulfillment.\n\nTo obtain the simulated location for use in your Action, use the\n[user information helper](/assistant/conversational/df-asdk/helpers#user_information)\nto ask the user for permission to access it.\n| **Note:** See the [localization documentation](/assistant/console/localization) for more information on creating multi-region Actions.\n\nSettings\n--------\n\nClick the **Settings** button in the upper left to access additional options for the simulator.\n\n### Select a version\n\nYou can specify the Actions project version that you want to test (either\npublished or draft versions). To select the project version, follow these\nsteps:\n\n1. In the simulator, click the **Settings** button in the upper right corner.\n\n2. Click the drop-down next to **Select a version** and choose a version to test.\n\nIn the version drop-down menu, select the version of your Actions project that\nyou want to test and click **DONE** . You see all of the versions that you've\nsubmitted in addition to a **Draft** version, which signifies the current state\nof your project before submission.\n\n### Test URL\n\nTo avoid changes to your production environment when you want to test your\nActions project, you can provide a distinct URL to use in place of your\nproduction webhook. Test URLs are configured [per version](#select_a_version) of\nan Actions project. One Actions project can have multiple versions with unique\ntest URLs, allowing you to test multiple versions of your Action in the\nsimulator without impacting production.\n\nWhen the Test URL setting is enabled, the simulator overrides the production\nwebhook URL for your Actions project and instead uses the test webhook URL that\nyou provided.\n| **Note:** The Test URL setting only determines what webhook the simulator calls when testing. The setting is not intended to support end users testing your Actions outside the simulator.\n\n**Before you configure a test URL in the simulator:**\n\n- Determine the URL that you want to use for testing a version of\n your Actions project.\n\n- Configure the server that you want to use for testing to accept\n requests at the URL.\n\n**To configure a test URL in the simulator:**\n\n1. In the upper right corner of the simulator, click **Settings**.\n\n2. Enable **Test URL**.\n\n3. In the **Test URL** box, type the URL that you want to use for testing.\n\nThe test URL that you specified is displayed in the simulator.\n\n### Account linking\n\n[Account linking](/assistant/identity) allows your Action to utilize\n[Google Sign-In](/assistant/identity/google-sign-in),\n[OAuth-based Google Sign-in \"Streamlined\" linking](/assistant/identity/google-sign-in-oauth),\nor [OAuth](/assistant/identity/oauth2).\n\nIf you haven't set up account linking for your Action,\nclick **Set up account linking** under **Settings** to go to the **Account linking**\nsection of the console.\n\nTo link an account, follow these steps:\n\n1. In the Actions console simulator, enter \"talk to my test app\" in the input\n area of the simulator to test your Action.\n\n | **Note:** If you've already specified an invocation name and saved your invocation information, you can start the conversation by saying *\"Talk to\n | \\\u003cinvocation name\\\u003e\"* instead.\n2. Send a query initializing your Action's account linking flow.\n\n3. Sign in using the prompt.\n\n | **Note:** The simulator presents a Google Sign-in modal dialog if the test user has multiple accounts. If the test user only has one account, that account is used automatically. Make sure pop-ups are not blocked by your browser.\n4. Confirm account linking was successful.\n\nThe linked account persists until the account is unlinked, so you can update the Action while using the same linked account.\n\nTo unlink an account, click **Settings \\\u003e Unlink** under **Account linking**.\n\n### On-device testing\n\nThis setting allows you to enable or disable testing on a physical device.\nIn order to test on a device, you need to be logged into the same account you\nused to create the Actions on Google project.\n\n### Audio playback\n\nToggle this option to mute or enable audio playback during testing.\n\n### Development Sandbox\n\nWhen you enable this option, payment methods are not charged. See the\n[transactions documentation](/assistant/transactions) for more information.\n\n### Simulate unverified users\n\nThis option simulates when a user is on a device where Voice Match is set for someone else."]]