Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Unit and Integration Tests

Leala Smith edited this page Mar 3, 2018 · 6 revisions

Run unit tests

Unit tests for the AVS Device SDK for C++ use the Google Test framework. Use this command to run all unit tests:

make all test

Make sure that all tests pass before you begin integration testing.

Run unit tests with Sensory enabled

If the project was built with the Sensory wake word detector, the following files must be downloaded from GitHub and placed in <source dir>/KWD/inputs/SensoryModels for the integration tests to run properly:

Run unit tests with KITT.ai enabled

If the project was built with the KITT.ai wake word detector, the following files must be downloaded from GitHub and placed in <source dir>/KWD/inputs/KittAiModels:

  • common.res
  • alexa.umdl - It's important that you download the alexa.umdl in resources/alexa/alexa-avs-sample-app for the KITT.ai unit tests to run properly.

Run integration tests

Integration tests ensure that your build can make a request and receive a response from AVS.

  • All requests to AVS require auth credentials
  • The integration tests for Alerts require your system to be in UTC

Important: Integration tests reference an AlexaClientSDKConfig.json file, which you must create. See the Create the AlexaClientSDKConfig.json file section (above), if you have not already done this.

To run the integration tests use this command:

make all integration

Network integration test

If your project is built on a GNU/Linux-based platform (Ubuntu, Debian, etc.), there is an optional integration test that tests the ACL for use on slow networks.

This cmake option is required when you build the SDK:

cmake <absolute-path-to-source> -DNETWORK_INTEGRATION_TESTS=ON -DNETWORK_INTERFACE=eth0

Note: The name of the network interface can be located with this command ifconfig -a. IMPORTANT: This test requires root permissions.

Run integration tests with Sensory enabled

If the project was built with the Sensory wake word detector, the following files must be downloaded from GitHub and placed in <source dir>/Integration/inputs/SensoryModels for the integration tests to run properly:

Run integration tests with KITT.ai

If the project was built with the KITT.ai wake word detector, the following files must be downloaded from GitHub and placed in <source dir>/Integration/inputs/KittAiModels for the integration tests to run properly:

  • common.res
  • alexa.umdl - It's important that you download the alexa.umdl in resources/alexa/alexa-avs-sample-app for the KITT.ai integration tests to run properly.
Clone this wiki locally