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 created your smart home Action and set up account linking in the Actions 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, 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 console and 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 Google Assistant settings. Make sure you are logged in as the same account as in the console.
- Open Home Control in the Google 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. The Google 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 Google Home app 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 Google Home and 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 test suite for smart home 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 more_vert more icon in the upper right corner of the console.
- Click Manage user access. This redirects you to the Google Cloud Platform 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.
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 Google Assistant and Home apps.