Simulator

The simulator in the Actions console lets you test your Action through an easy-to-use web interface that simulates hardware devices and their settings. You can also access debug information such as the request and response that your fulfillment receives and sends.

Test a project

When testing your Actions project, the following restrictions apply:

  • Actions are testable for up to 30 days. After 30 days, you have to create a new version for testing.
  • 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.
  • By default, the simulator uses the version of your Action that's in Draft. See how to select another version to test.

Input methods

You can click the button in the response text field to specify the input method for testing.

The following list describes the input types and the devices they're available on:

  • Auto detect - Automatically detect voice, keyboard, or touch input.
  • Touch - Used for interactive experiences and elements, like suggestion chips. Available for Smart Display and Phone devices.
  • Voice - Used for voice-only input. Available for Smart Display, Phone, and Speaker devices.
  • Keyboard - Used for text-only input. Available for Phone devices.

The default input method is auto detect. Based on the surface you select, input types are also disabled and enabled accordingly.

The input method is included in every request to your fulfillment in the RawInput object as an inputType field.

  {
  "inputType": "VOICE",
  "query": "Tell me a fact about Google's headquarters"
  }

Specify a device

The simulator can mimic different devices and allow you to test your Action's device-specific experiences.

To change the device simulated:

  1. Click the device drop-down in the upper left corner. Smart Display is selected by default.

  2. Choose from the following devices to simulate:

    • Smart Display - Assistant-enabled devices like the Nest Hub that have display and speaker capabilities.
    • Phone - Assistant-enabled phones that have display and speaker capabilities.
    • Speaker - Assistant-enabled smart speaker that has speaker capabilities.
    • KaiOS - Assistant-enabled phones using KaiOS.

Select a language

You can select a language from the second drop-down menu to set the language and region that you want to simulate. See the localization documentation for more information on creating multi-language Actions.

Set a location

You can manually set the coordinates and address of the device. This feature lets you test any location targeting features that you've set in the console and region-specific responses that you've configured in your fulfillment.

To obtain the simulated location for use in your Action, use the user information helper to ask the user for permission to access it.

Settings

Click the Settings button in the upper left to access additional options for the simulator.

Select a version

You can specify the Actions project version that you want to test (either published or draft versions). To select the project version:

  1. In the simulator, click the Settings button in the upper right corner.

  2. Click the drop-down next to Select a version and choose a version to test.

    In the version drop-down menu, select the version of your Actions project that you want to test and click DONE. You see all of the versions that you've submitted in addition to a Draft version, which signifies the current state of your project before submission.

Account linking

Account linking allows your Action to utilize Google Sign-In, OAuth and Google Sign-In, or OAuth.

If you haven't set up account linking for your Action, click Set up account linking under Settings to go to the Account linking section of the console.

To link an account:

  1. In the Actions console simulator, enter "talk to my test app" in the input area of the simulator to test your Action.

  2. Send a query initializing your Action's account linking flow.

  3. Sign in using the prompt.

  4. Confirm account linking was successful.

The linked account persists until the account is unlinked, so you can update the Action while using the same linked account.

To unlink an account, click Settings and click Unlink under Account linking.

On device testing

This setting allows you to enable or disable testing on a physical device. In order to test on a device, you need to be logged into the same account you used to create the Actions on Google project.

Audio playback

Toggle this option to mute or enable audio playback during testing.

Development Sandbox

When you enable this options, payment methods are not charged. See the transactions documentation for more information.

Simulate unverified users

This option simulates when a user is on a device where Voice Match is set for someone else.