Once you have created your smart home Action, you should test it to verify that it behaves as expected. You can also share the smart home Action with additional users so that they can test your Action before you submit it to Google for launch.
Set up for testing
Before proceeding, make sure that you have set up account linking and created your smart home Action in the Actions on Google Console.
In order to test your Action manually or run the test suite, you will first need to enable device testing for your Action and link it to your Google account. Performing this setup allows you to test on Google Assistant surfaces and on the Google Home app (GHA), using the same account you used to sign in to the Actions console.
Enable device testing
Device testing is enabled through the Actions Console.
Go to the Actions on Google console
- Select your project.
- Log in to the Actions console, then click Test > Simulator.
Click Start testing.
Link your project
To link your Action to your Google account, follow these steps:
On your phone, open the Assistant settings. Make sure you are logged in as the same account as in the Actions Console.
- Open Home Control in the Assistant settings.
- Select the plus (+) icon in the bottom right corner.
- You should see your smart home Action with the [test] prefix and the display name you set.
- Select that item. Assistant will then authenticate
with your cloud service and send a
SYNCrequest, asking your service to provide a list of devices for the user.
Open the GHA and verify that you can see your smart home device. If so, you should now be able to invoke your smart home Action through any Assistant surface (including the GHA and Google Assistant app on your phone).
Run tests for your Action
Testing your Action on a physical device, such as an Assistant-enabled smartphone, helps you to test the user experience and verify that your Action behaves as expected.
You should test different sample queries and commands based on the traits that your Action uses; refer to the trait documentation for examples of user queries and commands.
In addition to testing manually, you can use the automated Google Home Test Suite to validate use cases based on the device types and traits associated with your Action. The test suite runs a series of tests using your local development machine's speakers or attached headphones, and a Google Home device.
Share an Action
You can invite additional users to your project so they can test your smart home Action. This is useful when you want to share the project with other members of your development team so they can all test, or when sharing your project with quality assurance (QA) testers in preparation for production launch.
Share access to your project
You must share your project with other users to give them access to test your Action.
- Click the Actions Console. more icon in the upper-right corner of the
- Click Manage user access. This redirects you to the Google Cloud Console IAM permissions page.
- Click ADD at the top of the page.
- Enter the email address of the user you want to add.
- Click Select a role and choose Project > Viewer.
- Click SAVE.
The user is now able to see the Action in their console. Be aware that the system does not proactively notify users added to a project.
Users that have shared access to your Action can test it on Assistant-enabled devices such as their smartphones. Testing shared Actions on the simulator is not supported.
Before they can test the smart home Action, users must set up for testing.
After completing these steps, users should be able to test the Action in their Assistant app and GHA.