Test suite for smart home

The test suite for smart home is a web application that allows you to self-test your smart home Action. The test suite automatically generates and runs test cases based on the devices and traits associated with your account. When you complete the tests, you can view the test results or fill in the submission form to submit the test results to Google.

Launch test suite

Prerequisites

Before you can self-test your smart home Action, complete these prerequisites:

  • A quiet environment for text to speech to be clear for the Google Assistant. The test suite for smart home uses the speech synthesis API to simulate user queries.
  • A computer with speakers and a web browser.
  • A Google Home device with language set to English. Tests are only supported in English. Place this Google Home device next to your computer.
  • Give your devices names that are clear and easy to understand. Avoid using numbers for a device name, such as "Lamp1".
  • Make sure that Report State and Request Sync are implemented for your devices and traits.
  • A service account key. If you do not have one, see service account key.
  • Your agentUserId. If you do not have it, see retrieve your agentUserId.

If you already have completed all of the prerequisites, see self-test your Action.

Service account key

Retrieve your agentUserId

Self-test your Action

  1. In your web browser, open the test suite for smart home.

  2. Configure project settings:

    1. In the Agent User Id field, enter your agentUserId.
    2. Click the paper clip button that is next to the Service Account Key field. Then, from the file dialog, select your service account key. The Project ID is filled in automatically from the service account key.
    3. Click Next.
  3. Configure test settings:

    1. If certifying your smart home Action, leave the default Report State/Request Sync Timeout value unchanged. However, for testing, you may change the timeout value if your agent takes more time to report state to Home Graph.
    2. If certifying your smart home Action, make sure the Test Request Sync option is enabled—during testing, you will be prompted to add, update, or remove a device and check if the device list has changed in Home Graph. Change actions take place through the integration you are testing. Your integration under test must always have at least one device attached to the agent user.

    3. If you are using a Scene trait, select Test Scene trait.

  4. Run tests and view results:

    1. Click Next to start running tests. You will see the devices and traits that are being tested.
    2. Once the tests are complete, click Next to view the results. This will include the number of tests passed and failed, and a final score indicating percentage of passes.
  5. Submit test results:

    1. When you are ready to certify your smart home Action, click Submit.
    2. Download the test results by clicking the DOWNLOAD TEST RESULTS button.
    3. Click the GO TO SUBMISSION FORM to submit the test results to Google. Fill out all of the required fields, then click Submit.

Error messages

The following table lists some common error messages you may encounter and the suggested way to resolve them.

Error Message How to Resolve
HomeGraph API has not been used in project <_id_> before or it is disabled Make sure that you have enabled the HomeGraph API.
Requested Entity not found Check that your agentUserId is valid and is linked to your service.