![]() |
AlexaClientSDK
1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | ACLTestContext |
class | AlertsTest |
class | AlexaAuthorizationDelegateTest |
class | AlexaCommunicationsLibraryTest |
class | AlexaDirectiveSequencerLibraryTest |
class | AudioInputProcessorTest |
class | AudioPlayerTest |
class | AuthDelegateTestContext |
class | AVSCommunication |
class | holdToTalkButton |
class | NetworkIntegrationTests |
class | SDKTestContext |
class | ServerDisconnectIntegrationTest |
class | SpeechSynthesizerTest |
class | tapToTalkButton |
class | TestAlertObserver |
class | TestClient |
A test observer that mocks out the ChannelObserverInterface#onFocusChanged() call. More... | |
class | TestDirectiveHandler |
class | TestExceptionEncounteredSender |
class | TestMediaPlayer |
class | TestMessageSender |
class | TestSpeechSynthesizerObserver |
class | testStateProvider |
Functions | |
static const std::string | TAG ("TestMediaPlayer") |
String to identify log entries originating from this file. More... | |
static const std::chrono::seconds | WAIT_FOR_TIMEOUT_DURATION (25) |
static const std::chrono::seconds | SHORT_TIMEOUT_DURATION (5) |
static const std::string | TAG ("AlertsIntegrationTest") |
String to identify log entries originating from this file. More... | |
TEST_F (AlertsTest, DISABLED_test_handleOneTimerWithLocalStop) | |
TEST_F (AlertsTest, DISABLED_test_handleMultipleTimersWithLocalStop) | |
TEST_F (AlertsTest, DISABLED_test_stealChannelFromActiveAlert) | |
TEST_F (AlertsTest, test_disconnectAndReconnectBeforeLocalStop) | |
TEST_F (AlertsTest, test_disconnectAndReconnect) | |
TEST_F (AlertsTest, test_removeAllAlertsBeforeAlertIsActive) | |
TEST_F (AlertsTest, DISABLED_test_cancelAlertBeforeItIsActive) | |
TEST_F (AlertsTest, test_removeStorageBeforeAlarmIsSet) | |
TEST_F (AlertsTest, DISABLED_testTimer_userShortUnrelatedBargeInOnActive) | |
TEST_F (AlertsTest, DISABLED_testTimer_UserLongUnrelatedBargeInOnActive) | |
TEST_F (AlertsTest, DISABLED_test_userSpeakingWhenAlertShouldBeActive) | |
TEST_F (AlertsTest, DISABLED_test_handleOneTimerWithVocalStop) | |
static const std::chrono::seconds | TIME_OUT (60) |
Timeout in seconds for AuthDelegate to wait for LWA response. More... | |
TEST_F (AlexaAuthorizationDelegateTest, test_refreshAuthToken) | |
TEST_F (AlexaAuthorizationDelegateTest, test_invalidClientIdWithUnrecoverableError) | |
TEST_F (AlexaCommunicationsLibraryTest, test_sendEvent) | |
TEST_F (AlexaCommunicationsLibraryTest, test_sendInvalidEvent) | |
TEST_F (AlexaCommunicationsLibraryTest, test_sendEventWithAttachment) | |
TEST_F (AlexaCommunicationsLibraryTest, test_sendEventAndReceiveDirective) | |
TEST_F (AlexaCommunicationsLibraryTest, test_sendEventsSerially) | |
TEST_F (AlexaCommunicationsLibraryTest, test_sendEventsConcurrently) | |
TEST_F (AlexaCommunicationsLibraryTest, test_receiveDirectiveOnDownchannel) | |
TEST_F (AlexaCommunicationsLibraryTest, test_persistentConnection) | |
TEST_F (AlexaCommunicationsLibraryTest, test_multipleConnectionStatusObservers) | |
static const std::string | TAG ("AlexaDirectiveSequencerLibraryTest") |
String to identify log entries originating from this file. More... | |
static const std::chrono::seconds | WAIT_FOR_TIMEOUT_DURATION (5) |
static const std::chrono::seconds | SEND_EVENT_TIMEOUT_DURATION (20) |
static const std::chrono::seconds | RESPONSE_DELAY (2) |
bool | getToken (TestDirectiveHandler::DirectiveParams params, std::string &returnToken) |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_sendEventWithDirective) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_sendDirectiveGroupWithoutBlocking) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_sendDirectiveWithDifferentDialogRequestID) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, DISABLED_test_dropQueueAfterBargeIn) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, DISABLED_test_sendDirectiveWithoutADialogRequestID) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_sendDirectivesForPreHandling) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_cancelDirectivesWhileInQueue) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_oneBlockingDirectiveAtTheFront) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_oneBlockingDirectiveInTheMiddle) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_noDirectiveHandlerRegisteredForADirectiveAtTheFront) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, DISABLED_test_noDirectiveHandlerRegisteredForADirectiveInTheMiddle) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_twoDirectiveHandlersRegisteredForADirective) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_multiturnScenario) | |
TEST_F (AlexaDirectiveSequencerLibraryTest, test_getAttachmentWithContentId) | |
static const std::chrono::seconds | LONG_TIMEOUT_DURATION (10) |
static const std::chrono::seconds | SHORT_TIMEOUT_DURATION (2) |
static const std::chrono::seconds | NO_TIMEOUT_DURATION (0) |
static const std::string | TAG ("AlexaDirectiveSequencerLibraryTest") |
String to identify log entries originating from this file. More... | |
template<typename T > | |
std::vector< T > | readAudioFromFile (const std::string &fileName, const int &headerPosition, bool *errorOccurred) |
TEST_F (AudioInputProcessorTest, DISABLED_test_tapToTalkJoke) | |
TEST_F (AudioInputProcessorTest, DISABLED_test_tapToTalkTimeOpus) | |
TEST_F (AudioInputProcessorTest, DISABLED_test_tapToTalkSilence) | |
TEST_F (AudioInputProcessorTest, test_tapToTalkNoAudio) | |
TEST_F (AudioInputProcessorTest, test_tapToTalkMultiturn) | |
TEST_F (AudioInputProcessorTest, DISABLED_test_tapToTalkMultiturnWithoutUserResponse) | |
TEST_F (AudioInputProcessorTest, test_tapToTalkCancel) | |
TEST_F (AudioInputProcessorTest, test_holdToTalkJoke) | |
TEST_F (AudioInputProcessorTest, DISABLED_test_holdToTalkMultiturn) | |
TEST_F (AudioInputProcessorTest, DISABLED_test_holdToTalkMultiTurnWithSilence) | |
TEST_F (AudioInputProcessorTest, DISABLED_test_holdToTalkMultiturnWithTimeOut) | |
TEST_F (AudioInputProcessorTest, test_holdToTalkNoAudio) | |
TEST_F (AudioInputProcessorTest, test_holdToTalkCancel) | |
TEST_F (AudioInputProcessorTest, test_audioWithoutAnyTrigger) | |
static const std::chrono::seconds | WAIT_FOR_TIMEOUT_DURATION (15) |
static const std::chrono::seconds | NO_TIMEOUT_DURATION (0) |
static const std::chrono::seconds | SONG_TIMEOUT_DURATION (120) |
static const std::string | TAG ("AudioPlayerIntegrationTest") |
String to identify log entries originating from this file. More... | |
TEST_F (AudioPlayerTest, test_singASong) | |
TEST_F (AudioPlayerTest, DISABLED_test_flashBriefing) | |
static const std::string | TAG ("NetworkIntegrationTests") |
TEST_F (NetworkIntegrationTests, test_connectAfterSlowConnection) | |
TEST_F (NetworkIntegrationTests, test_connectBeforeSlowConnection) | |
TEST_F (NetworkIntegrationTests, test_reConnectAfterDelay) | |
TEST_F (NetworkIntegrationTests, test_sendEventAfterDelayPass) | |
TEST_F (NetworkIntegrationTests, test_sendEventAfterDelayFails) | |
static const std::string | TAG ("ServerDisconnectIntegrationTest") |
String to identify log entries originating from this file. More... | |
TEST_F (ServerDisconnectIntegrationTest, DISABLED_test_sendEvent) | |
static const std::chrono::seconds | WAIT_FOR_TIMEOUT_DURATION (15) |
static const std::chrono::seconds | SEND_EVENT_TIMEOUT_DURATION (20) |
static const std::chrono::seconds | DIRECTIVE_TIMEOUT_DURATION (7) |
static const std::chrono::seconds | WANTING_TIMEOUT_DURATION (1) |
static const std::chrono::seconds | WAIT_FOR_MEDIA_PLAYER_TIMEOUT_DURATION (60) |
static const std::string | TAG ("SpeechSynthesizerIntegrationTest") |
String to identify log entries originating from this file. More... | |
TEST_F (SpeechSynthesizerTest, DISABLED_test_handleMultipleConsecutiveSpeaks) | |
TEST_F (SpeechSynthesizerTest, test_bargeInOnOneSpeech) | |
TEST_F (SpeechSynthesizerTest, test_bargeInOnMultipleSpeaksAtTheBeginning) | |
TEST_F (SpeechSynthesizerTest, DISABLED_test_bargeInOnMultipleSpeaksInTheMiddle) | |
TEST_F (SpeechSynthesizerTest, test_multiturnScenario) | |
TEST_F (SpeechSynthesizerTest, test_handleNoDirectives) | |
Variables | |
static const std::string | DEFAULT_AVS_GATEWAY = "https://alexa.na.gateway.devices.a2z.com" |
Default AVS gateway to connect to. More... | |
static const std::string | JSON_MESSAGE_EVENT_KEY = "event" |
JSON key to get the event object of a message. More... | |
static const std::string | JSON_MESSAGE_DIRECTIVE_KEY = "directive" |
JSON key to get the directive object of a message. More... | |
static const std::string | JSON_MESSAGE_HEADER_KEY = "header" |
JSON key to get the header object of a message. More... | |
static const std::string | JSON_MESSAGE_NAMESPACE_KEY = "namespace" |
JSON key to get the namespace value of a header. More... | |
static const std::string | JSON_MESSAGE_NAME_KEY = "name" |
JSON key to get the name value of a header. More... | |
static const std::string | JSON_MESSAGE_MESSAGE_ID_KEY = "messageId" |
JSON key to get the messageId value of a header. More... | |
static const std::string | JSON_MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId" |
JSON key to get the dialogRequestId value of a header. More... | |
static const std::string | JSON_MESSAGE_PAYLOAD_KEY = "payload" |
JSON key to get the payload object of a message. More... | |
static const avsCommon::utils::mediaPlayer::MediaPlayerState | DEFAULT_MEDIA_PLAYER_STATE |
Default media player state for reporting all playback eventing. More... | |
static std::atomic< avsCommon::utils::mediaPlayer::MediaPlayerInterface::SourceId > | g_sourceId {0} |
A counter used to increment the source id when a new source is set. More... | |
static const std::string | RECOGNIZE_JOKE_AUDIO_FILE_NAME = "/recognize_joke_test.wav" |
static const std::string | RECOGNIZE_WHATS_UP_AUDIO_FILE_NAME = "/recognize_whats_up_test.wav" |
static const std::string | RECOGNIZE_WEATHER_AUDIO_FILE_NAME = "/recognize_weather_test.wav" |
static const std::string | RECOGNIZE_TIMER_AUDIO_FILE_NAME = "/recognize_timer_test.wav" |
static const std::string | RECOGNIZE_LONG_TIMER_AUDIO_FILE_NAME = "/recognize_long_timer_test.wav" |
static const std::string | RECOGNIZE_VERY_LONG_TIMER_AUDIO_FILE_NAME = "/recognize_very_long_timer_test.wav" |
static const std::string | RECOGNIZE_STOP_AUDIO_FILE_NAME = "/recognize_stop_test.wav" |
static const std::string | RECOGNIZE_CANCEL_TIMER_AUDIO_FILE_NAME = "/recognize_cancel_timer_test.wav" |
static const std::string | NAME_RECOGNIZE = "Recognize" |
static const std::string | NAME_SET_ALERT_FAILED = "SetAlertFailed" |
static const std::string | NAME_ALERT_STOPPED = "AlertStopped" |
static const std::string | NAME_ALERT_ENTERED_BACKGROUND = "AlertEnteredBackground" |
static const std::string | NAME_ALERT_ENTERED_FOREGROUND = "AlertEnteredForeground" |
static const std::string | NAME_DELETE_ALERT_SUCCEEDED = "DeleteAlertSucceeded" |
static const std::string | NAME_DELETE_ALERT_FAILED = "DeleteAlertFailed" |
static const std::string | NAME_ALERT_STARTED = "AlertStarted" |
static const std::string | NAME_SPEECH_STARTED = "SpeechStarted" |
static const std::string | NAME_SPEECH_FINISHED = "SpeechFinished" |
static const std::string | NAME_SET_ALERT_SUCCEEDED = "SetAlertSucceeded" |
static const std::string | DIALOG_ACTIVITY_ID = "Dialog" |
static const std::string | CONTENT_ACTIVITY_ID = "Content" |
static const std::string | ALERTS_ACTIVITY_ID = "Alerts" |
Sample alerts activity id. More... | |
static const avsCommon::utils::AudioFormat::Encoding | COMPATIBLE_ENCODING |
The compatible encoding for AIP. More... | |
static const avsCommon::utils::AudioFormat::Endianness | COMPATIBLE_ENDIANNESS |
The compatible endianness for AIP. More... | |
static const unsigned int | COMPATIBLE_SAMPLE_RATE = 16000 |
The compatible sample rate for AIP. More... | |
static const unsigned int | COMPATIBLE_SAMPLE_SIZE_IN_BITS = 16 |
The compatible bits per sample. More... | |
static const unsigned int | COMPATIBLE_NUM_CHANNELS = 1 |
The compatible number of channels. More... | |
static const std::string | JSON_MESSAGE_EVENT_KEY = "event" |
JSON key to get the event object of a message. More... | |
static const std::string | JSON_MESSAGE_DIRECTIVE_KEY = "directive" |
JSON key to get the directive object of a message. More... | |
static const std::string | JSON_MESSAGE_HEADER_KEY = "header" |
JSON key to get the header object of a message. More... | |
static const std::string | JSON_MESSAGE_NAMESPACE_KEY = "namespace" |
JSON key to get the namespace value of a header. More... | |
static const std::string | JSON_MESSAGE_NAME_KEY = "name" |
JSON key to get the name value of a header. More... | |
static const std::string | JSON_MESSAGE_MESSAGE_ID_KEY = "messageId" |
JSON key to get the messageId value of a header. More... | |
static const std::string | JSON_MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId" |
JSON key to get the dialogRequestId value of a header. More... | |
static const std::string | JSON_MESSAGE_PAYLOAD_KEY = "payload" |
JSON key to get the payload object of a message. More... | |
static std::string | g_configPath |
Path to the AlexaClientSDKConfig.json file (from command line arguments). More... | |
static std::string | g_inputPath |
Path to resources (e.g. audio files) for tests (from command line arguments). More... | |
static const std::string | SYNCHRONIZE_STATE_JSON |
This is a basic synchronize JSON message which may be used to initiate a connection with AVS. More... | |
static const std::string | BAD_SYNCHRONIZE_STATE_JSON = "{" |
This is a partial JSON string that should not be parseable. More... | |
static const std::string | CT_RECOGNIZE_EVENT_JSON = RECOGNIZE_EVENT_JSON(CLOSE_TALK) |
This string specifies a Recognize event using the CLOSE_TALK profile. More... | |
static const std::string | NF_RECOGNIZE_EVENT_JSON = RECOGNIZE_EVENT_JSON(NEAR_FIELD) |
This string specifies a Recognize event using the NEAR_FIELD profile. More... | |
static const std::string | EXPECT_SPEECH_TIMED_OUT_EVENT_JSON |
This string specifies an ExpectSpeechTimedOut event. More... | |
static const std::string | RECOGNIZE_AUDIO_FILE_NAME = "recognize_test.wav" |
This is a 16 bit 16 kHz little endian linear PCM audio file containing a recognized message for AVS. More... | |
static const std::string | SILENCE_AUDIO_FILE_NAME = "silence_test.wav" |
This is a 16 bit 16 kHz little endian linear PCM audio file containing several seconds of silence. More... | |
static const int | MAX_CONCURRENT_STREAMS = 9 |
static std::string | g_configPath |
Path to the AlexaClientSDKConfig.json file (from command line arguments). More... | |
static std::string | g_inputPath |
Path to resources (e.g. audio files) for tests (from command line arguments). More... | |
static const std::string | RECOGNIZE_JOKE_AUDIO_FILE_NAME = "/recognize_joke_test.wav" |
This is a 16 bit 16 kHz little endian linear PCM audio file of "Joke" to be recognized. More... | |
static const std::string | RECOGNIZE_WIKI_AUDIO_FILE_NAME = "/recognize_wiki_test.wav" |
This is a 16 bit 16 kHz little endian linear PCM audio file of "Wikipedia" to be recognized. More... | |
static const std::string | RECOGNIZE_LIONS_AUDIO_FILE_NAME = "/recognize_lions_test.wav" |
This is a 16 bit 16 kHz little endian linear PCM audio file of "Lions" to be recognized. More... | |
static const std::string | RECOGNIZE_WHATS_UP_AUDIO_FILE_NAME = "/recognize_whats_up_test.wav" |
This is a 16 bit 16 kHz little endian linear PCM audio file of "What's up" to be recognized. More... | |
static const std::string | RECOGNIZE_TIMER_AUDIO_FILE_NAME = "/recognize_timer_test.wav" |
This is a 16 bit 16 kHz little endian linear PCM audio file of "Set a timer for 5 seconds" to be recognized. More... | |
static const std::string | RECOGNIZE_FLASHBRIEFING_AUDIO_FILE_NAME = "/recognize_flashbriefing_test.wav" |
This is a 16 bit 16 kHz little endian linear PCM audio file of "flashbriefing" to be recognized. More... | |
static const std::string | CT_FIRST_RECOGNIZE_EVENT_JSON = RECOGNIZE_EVENT_JSON(CLOSE_TALK, FIRST_DIALOG_REQUEST_ID) |
This string specifies a Recognize event using the CLOSE_TALK profile and uses the first DialogRequestID. More... | |
static const std::string | CT_SECOND_RECOGNIZE_EVENT_JSON = RECOGNIZE_EVENT_JSON(CLOSE_TALK, SECOND_DIALOG_REQUEST_ID) |
This string specifies a Recognize event using the CLOSE_TALK profile and uses the second DialogRequestID. More... | |
static const std::string | NAME_CLEAR_QUEUE = "ClearQueue" |
static const std::string | NAME_EXPECT_SPEECH = "ExpectSpeech" |
static const std::string | NAME_PLAY = "Play" |
static const std::string | NAME_SET_MUTE = "SetMute" |
static const std::string | NAME_SPEAK = "Speak" |
static const std::string | NAME_STOP = "Stop" |
static const std::string | NAME_SPEECH_STARTED = "SpeechStarted" |
static const std::string | NAME_SPEECH_FINISHED = "SpeechFinished" |
static const std::string | NAME_SET_ALERT_FAILED = "SetAlertFailed" |
static const std::string | NAME_SET_ALERT = "SetAlert" |
static const std::string | NAMESPACE_AUDIO_PLAYER = "AudioPlayer" |
static const std::string | NAMESPACE_ALERTS = "Alerts" |
static const std::string | NAMESPACE_SPEAKER = "Speaker" |
static const std::string | NAMESPACE_SPEECH_RECOGNIZER = "SpeechRecognizer" |
static const std::string | NAMESPACE_SPEECH_SYNTHESIZER = "SpeechSynthesizer" |
static const NamespaceAndName | EXPECT_SPEECH_PAIR (NAMESPACE_SPEECH_RECOGNIZER, NAME_EXPECT_SPEECH) |
static const NamespaceAndName | SET_MUTE_PAIR (NAMESPACE_SPEAKER, NAME_SET_MUTE) |
static const NamespaceAndName | SPEAK_PAIR (NAMESPACE_SPEECH_SYNTHESIZER, NAME_SPEAK) |
static const NamespaceAndName | SET_ALERT_PAIR (NAMESPACE_ALERTS, NAME_SET_ALERT) |
static const std::string | JSON_MESSAGE_DIRECTIVE_KEY = "directive" |
JSON key to get the directive object of a message. More... | |
static const std::string | JSON_MESSAGE_HEADER_KEY = "header" |
JSON key to get the header object of a message. More... | |
static const std::string | JSON_MESSAGE_NAMESPACE_KEY = "namespace" |
JSON key to get the namespace value of a header. More... | |
static const std::string | JSON_MESSAGE_NAME_KEY = "name" |
JSON key to get the name value of a header. More... | |
static const std::string | JSON_MESSAGE_MESSAGE_ID_KEY = "messageId" |
JSON key to get the messageId value of a header. More... | |
static const std::string | JSON_MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId" |
JSON key to get the dialogRequestId value of a header. More... | |
static const std::string | JSON_MESSAGE_PAYLOAD_KEY = "payload" |
JSON key to get the payload object of a message. More... | |
static const std::string | JSON_MESSAGE_TOKEN_KEY = "token" |
JSON key to get the payload object of a message. More... | |
static const char | TOKEN_KEY [] = "token" |
JSON key to add to the payload object of a message. More... | |
static std::string | g_configPath |
Path to the AlexaClientSDKConfig.json file (from command line arguments). More... | |
static std::string | g_inputPath |
Path to resources (e.g. audio files) for tests (from command line arguments). More... | |
static const std::string | JOKE_AUDIO_FILE = "/recognize_joke_test.wav" |
static const std::string | WIKI_AUDIO_FILE = "/recognize_wiki_test.wav" |
static const std::string | LIONS_AUDIO_FILE = "/recognize_lions_test.wav" |
static const std::string | SILENCE_AUDIO_FILE = "/recognize_silence_test.wav" |
static const std::string | ALEXA_JOKE_AUDIO_FILE = "/alexa_recognize_joke_test.wav" |
static const std::string | ALEXA_WIKI_AUDIO_FILE = "/alexa_recognize_wiki_test.wav" |
static const std::string | ALEXA_SILENCE_AUDIO_FILE = "/alexa_recognize_silence_test.wav" |
static const std::string | TIME_AUDIO_FILE_OPUS = "/utterance_time_success.opus" |
static const std::string | NAME_VOLUME_STATE = "VolumeState" |
static const std::string | NAME_SPEAK = "Speak" |
static const std::string | NAME_EXPECT_SPEECH = "ExpectSpeech" |
static const std::string | NAME_EXPECT_SPEECH_TIMED_OUT = "ExpectSpeechTimedOut" |
static const std::string | NAME_SET_MUTE = "SetMute" |
static const std::string | NAME_PLAY = "Play" |
static const std::string | NAME_STOP_CAPTURE = "StopCapture" |
static const std::string | NAME_RECOGNIZE = "Recognize" |
static const std::string | NAMESPACE_SPEECH_RECOGNIZER = "SpeechRecognizer" |
static const std::string | NAMESPACE_SPEECH_SYNTHESIZER = "SpeechSynthesizer" |
static const std::string | NAMESPACE_AUDIO_PLAYER = "AudioPlayer" |
static const std::string | NAMESPACE_SPEAKER = "Speaker" |
static const NamespaceAndName | SPEAK_PAIR = {NAMESPACE_SPEECH_SYNTHESIZER, NAME_SPEAK} |
static const NamespaceAndName | EXPECT_SPEECH_PAIR = {NAMESPACE_SPEECH_RECOGNIZER, NAME_EXPECT_SPEECH} |
static const NamespaceAndName | SET_MUTE_PAIR = {NAMESPACE_SPEAKER, NAME_SET_MUTE} |
static const NamespaceAndName | VOLUME_STATE_PAIR = {NAMESPACE_SPEAKER, NAME_VOLUME_STATE} |
static const NamespaceAndName | PLAY_PAIR = {NAMESPACE_AUDIO_PLAYER, NAME_PLAY} |
static const NamespaceAndName | STOP_CAPTURE_PAIR = {NAMESPACE_SPEECH_RECOGNIZER, NAME_STOP_CAPTURE} |
static const std::string | DIALOG_ACTIVITY_ID = "Dialog" |
Sample dialog activity id. More... | |
static const std::string | ALARM_ACTIVITY_ID = "Alarms" |
Sample alerts activity id. More... | |
static const std::string | CONTENT_ACTIVITY_ID = "Content" |
Sample content activity id. More... | |
static const int | RIFF_HEADER_SIZE = 44 |
static const unsigned int | COMPATIBLE_SAMPLE_RATE_OPUS_32 = 32000 |
The compatible sample rate for OPUS 32KHz. More... | |
static const std::string | JSON_MESSAGE_DIRECTIVE_KEY = "directive" |
JSON key to get the directive object of a message. More... | |
static const std::string | JSON_MESSAGE_HEADER_KEY = "header" |
JSON key to get the header object of a message. More... | |
static const std::string | JSON_MESSAGE_NAMESPACE_KEY = "namespace" |
JSON key to get the namespace value of a header. More... | |
static const std::string | JSON_MESSAGE_NAME_KEY = "name" |
JSON key to get the name value of a header. More... | |
static const std::string | JSON_MESSAGE_MESSAGE_ID_KEY = "messageId" |
JSON key to get the messageId value of a header. More... | |
static const std::string | JSON_MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId" |
JSON key to get the dialogRequestId value of a header. More... | |
static const std::string | JSON_MESSAGE_PAYLOAD_KEY = "payload" |
JSON key to get the payload object of a message. More... | |
static const avsCommon::utils::AudioFormat::Encoding | COMPATIBLE_ENCODING |
The compatible encoding. More... | |
static const avsCommon::utils::AudioFormat::Endianness | COMPATIBLE_ENDIANNESS |
The compatible endianness. More... | |
static const unsigned int | COMPATIBLE_SAMPLE_RATE = 16000 |
The compatible sample rate. More... | |
static const unsigned int | COMPATIBLE_SAMPLE_SIZE_IN_BITS = 16 |
The compatible bits per sample. More... | |
static const unsigned int | COMPATIBLE_NUM_CHANNELS = 1 |
The compatible number of channels. More... | |
static std::string | g_configPath |
Path to the AlexaClientSDKConfig.json file (from command line arguments). More... | |
static std::string | g_inputPath |
Path to resources (e.g. audio files) for tests (from command line arguments). More... | |
static const std::string | RECOGNIZE_SING_FILE_NAME = "/recognize_sing_song_test.wav" |
static const std::string | RECOGNIZE_FLASHBRIEFING_FILE_NAME = "/recognize_flashbriefing_test.wav" |
static const std::string | NAME_PLAYBACK_STARTED = "PlaybackStarted" |
static const std::string | NAME_PLAYBACK_NEARLY_FINISHED = "PlaybackNearlyFinished" |
static const std::string | NAME_PLAYBACK_FINISHED = "PlaybackFinished" |
static const std::string | NAME_PLAYBACK_STOPPED = "PlaybackStopped" |
static const std::string | NAME_SYNC_STATE = "SynchronizeState" |
static const std::string | NAME_RECOGNIZE = "Recognize" |
static const std::string | NAME_SPEECH_STARTED = "SpeechStarted" |
static const std::string | NAME_SPEECH_FINISHED = "SpeechFinished" |
static const std::string | DIALOG_CHANNEL_NAME = "Dialog" |
The dialog Channel name used in intializing the FocusManager. More... | |
static const std::string | CONTENT_CHANNEL_NAME = "Content" |
The content Channel name used in intializing the FocusManager. More... | |
static const std::string | TEST_CHANNEL_NAME = "Test" |
An incorrect Channel name that is never initialized as a Channel. More... | |
static const unsigned int | DIALOG_CHANNEL_PRIORITY = 100 |
The priority of the dialog Channel used in intializing the FocusManager. More... | |
static const unsigned int | CONTENT_CHANNEL_PRIORITY = 300 |
The priority of the content Channel used in intializing the FocusManager. More... | |
static const unsigned int | TEST_CHANNEL_PRIORITY = 400 |
The priority of the content Channel used in intializing the FocusManager. More... | |
static const std::string | DIALOG_ACTIVITY_ID = "dialog" |
Sample dialog activity id. More... | |
static const std::string | CONTENT_ACTIVITY_ID = "content" |
Sample content activity id. More... | |
static const std::string | TEST_ACTIVITY_ID = "test" |
Sample content activity id. More... | |
static const avsCommon::utils::AudioFormat::Encoding | COMPATIBLE_ENCODING |
The compatible encoding for AIP. More... | |
static const avsCommon::utils::AudioFormat::Endianness | COMPATIBLE_ENDIANNESS |
The compatible endianness for AIP. More... | |
static const unsigned int | COMPATIBLE_SAMPLE_RATE = 16000 |
The compatible sample rate for AIP. More... | |
static const unsigned int | COMPATIBLE_SAMPLE_SIZE_IN_BITS = 16 |
The compatible bits per sample. More... | |
static const unsigned int | COMPATIBLE_NUM_CHANNELS = 1 |
The compatible number of channels. More... | |
static const std::string | JSON_MESSAGE_EVENT_KEY = "event" |
JSON key to get the event object of a message. More... | |
static const std::string | JSON_MESSAGE_DIRECTIVE_KEY = "directive" |
JSON key to get the directive object of a message. More... | |
static const std::string | JSON_MESSAGE_HEADER_KEY = "header" |
JSON key to get the header object of a message. More... | |
static const std::string | JSON_MESSAGE_NAMESPACE_KEY = "namespace" |
JSON key to get the namespace value of a header. More... | |
static const std::string | JSON_MESSAGE_NAME_KEY = "name" |
JSON key to get the name value of a header. More... | |
static const std::string | JSON_MESSAGE_MESSAGE_ID_KEY = "messageId" |
JSON key to get the messageId value of a header. More... | |
static const std::string | JSON_MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId" |
JSON key to get the dialogRequestId value of a header. More... | |
static const std::string | JSON_MESSAGE_PAYLOAD_KEY = "payload" |
JSON key to get the payload object of a message. More... | |
static std::string | g_configPath |
Path to the AlexaClientSDKConfig.json file (from command line arguments). More... | |
static std::string | g_inputPath |
Path to resources (e.g. audio files) for tests (from command line arguments). More... | |
static const std::string | DELAY_TIME = "1000ms" |
Amount of Delay in milliseconds to be added. More... | |
static const std::string | LONG_DELAY_TIME = "40000ms" |
Amount of Delay for causing a TIMEDOUT status in MessageRequest. More... | |
static const int | TIMEOUT_FOR_SEND_IN_SECONDS = 10 |
The time to wait for expected message status on sending the message. More... | |
static const int | LONG_TIMEOUT_FOR_SEND_IN_SECONDS = 40 |
The time to wait for expected message status when delay is longer. More... | |
std::string | network_interface |
The network interface specified for the delay to be added. More... | |
static const int | TIMEOUT_FOR_SEND_IN_SECONDS = 10 |
The time to wait for expected message status on sending the message. More... | |
static std::string | g_configPath |
Path to the AlexaClientSDKConfig.json file (from command line arguments). More... | |
static const std::string | RECOGNIZE_JOKE_AUDIO_FILE_NAME = "/recognize_joke_test.wav" |
static const std::string | RECOGNIZE_WIKI_AUDIO_FILE_NAME = "/recognize_wiki_test.wav" |
static const std::string | RECOGNIZE_LIONS_AUDIO_FILE_NAME = "/recognize_lions_test.wav" |
static const std::string | RECOGNIZE_FLASHBRIEFING_AUDIO_FILE_NAME = "/recognize_flashbriefing_test.wav" |
static const std::string | RECOGNIZE_WHATS_UP_AUDIO_FILE_NAME = "/recognize_whats_up_test.wav" |
static const std::string | RECOGNIZE_VOLUME_UP_AUDIO_FILE_NAME = "/recognize_volume_up_test.wav" |
static const std::string | CT_FIRST_RECOGNIZE_EVENT_JSON = RECOGNIZE_EVENT_JSON(CLOSE_TALK, FIRST_DIALOG_REQUEST_ID) |
static const std::string | CT_FIRST_RECOGNIZE_EVENT_JSON_NEAR = RECOGNIZE_EVENT_JSON(NEAR_FIELD, FIRST_DIALOG_REQUEST_ID) |
static const std::string | CT_SECOND_RECOGNIZE_EVENT_JSON = RECOGNIZE_EVENT_JSON(CLOSE_TALK, SECOND_DIALOG_REQUEST_ID) |
static const std::string | NAME_SPEAK = "Speak" |
static const std::string | NAME_RECOGNIZE = "Recognize" |
static const std::string | NAME_ADJUST_VOLUME = "AdjustVolume" |
static const std::string | NAME_EXPECT_SPEECH = "ExpectSpeech" |
static const std::string | NAME_SET_MUTE = "SetMute" |
static const std::string | NAME_SPEECH_STARTED = "SpeechStarted" |
static const std::string | NAME_SPEECH_FINISHED = "SpeechFinished" |
static const std::string | NAME_SPEECH_INTERRUPTED = "SpeechInterrupted" |
static const std::string | NAMESPACE_SPEECH_RECOGNIZER = "SpeechRecognizer" |
static const std::string | NAMESPACE_SPEECH_SYNTHESIZER = "SpeechSynthesizer" |
static const std::string | NAMESPACE_SPEAKER = "Speaker" |
static const NamespaceAndName | SPEAK_PAIR = {NAMESPACE_SPEECH_SYNTHESIZER, NAME_SPEAK} |
static const NamespaceAndName | EXPECT_SPEECH_PAIR = {NAMESPACE_SPEECH_RECOGNIZER, NAME_EXPECT_SPEECH} |
static const NamespaceAndName | SET_MUTE_PAIR = {NAMESPACE_SPEAKER, NAME_SET_MUTE} |
static const NamespaceAndName | ADJUST_VOLUME_PAIR = {NAMESPACE_SPEAKER, NAME_ADJUST_VOLUME} |
static const std::string | DIALOG_ACTIVITY_ID = "Dialog" |
static const std::string | ALERTS_ACTIVITY_ID = "Alerts" |
Sample alerts activity id. More... | |
static const unsigned int | NUMBER_OF_SPEAK_DIRECTIVES_TO_VALIDATE = 3 |
static const std::string | JSON_MESSAGE_EVENT_KEY = "event" |
JSON key to get the event object of a message. More... | |
static const std::string | JSON_MESSAGE_DIRECTIVE_KEY = "directive" |
JSON key to get the directive object of a message. More... | |
static const std::string | JSON_MESSAGE_HEADER_KEY = "header" |
JSON key to get the header object of a message. More... | |
static const std::string | JSON_MESSAGE_NAMESPACE_KEY = "namespace" |
JSON key to get the namespace value of a header. More... | |
static const std::string | JSON_MESSAGE_NAME_KEY = "name" |
JSON key to get the name value of a header. More... | |
static const std::string | JSON_MESSAGE_MESSAGE_ID_KEY = "messageId" |
JSON key to get the messageId value of a header. More... | |
static const std::string | JSON_MESSAGE_DIALOG_REQUEST_ID_KEY = "dialogRequestId" |
JSON key to get the dialogRequestId value of a header. More... | |
static const std::string | JSON_MESSAGE_PAYLOAD_KEY = "payload" |
JSON key to get the payload object of a message. More... | |
static std::string | g_configPath |
Path to the AlexaClientSDKConfig.json file (from command line arguments). More... | |
static std::string | g_inputPath |
Path to resources (e.g. audio files) for tests (from command line arguments). More... | |
|
static |
bool alexaClientSDK::integration::test::getToken | ( | TestDirectiveHandler::DirectiveParams | params, |
std::string & | returnToken | ||
) |
Helper function to extract the token from a directive.
params | that has the JSON to be searched through. |
returnToken | to hold the reulting token. |
|
static |
|
static |
|
static |
std::vector<T> alexaClientSDK::integration::test::readAudioFromFile | ( | const std::string & | fileName, |
const int & | headerPosition, | ||
bool * | errorOccurred | ||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
String to identify log entries originating from this file.
|
static |
String to identify log entries originating from this file.
|
static |
String to identify log entries originating from this file.
|
static |
String to identify log entries originating from this file.
|
static |
|
static |
String to identify log entries originating from this file.
|
static |
String to identify log entries originating from this file.
|
static |
String to identify log entries originating from this file.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
DISABLED_test_cancelAlertBeforeItIsActive | |||
) |
Test when an alert is canceled before it is due
Set a 10 second timer, then send audio of "Cancel the timer" as a recognize event. Ensure the timer does not go off and the DeleteAlertSucceeded event is sent.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
DISABLED_test_handleMultipleTimersWithLocalStop | |||
) |
Test when one timer is stopped verbally
Set two second timer, ensure they go off, then stop both timers.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
DISABLED_test_handleOneTimerWithLocalStop | |||
) |
Test when one timer is stopped locally
Set a 5 second timer, ensure it goes off, then use local stop and make sure the timer is stopped.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
DISABLED_test_handleOneTimerWithVocalStop | |||
) |
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
DISABLED_test_stealChannelFromActiveAlert | |||
) |
Test when the Alerts channel is acqired by a different client when an alert is active
Set a 5 second timer, ensure it goes off, then have a test client acquire the Alerts channel. Ensure that the alert is stopped.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
DISABLED_test_userSpeakingWhenAlertShouldBeActive | |||
) |
Test when the user is speaking to Alexa and an alert becomes active
Set a 5 second timer then start a recognize event using a hold to talk initiator but do not call stopCapture until the alert has become active in the background. Once the alert is active, call stopCapture and see that is is in the foreground before locally stopping it.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
DISABLED_testTimer_UserLongUnrelatedBargeInOnActive | |||
) |
Test when an alert is active and the user barges in and gets multiple speaks in response
Set a 5 second timer and wait until it is active. Send a recognize event asking "what's up" and see that the alert goes into the background. When all the speaks are complete, the alert is forgrounded and can be locally stopped.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
DISABLED_testTimer_userShortUnrelatedBargeInOnActive | |||
) |
Test when an alert is active and the user barges in and gets one speak in response
Set a 5 second timer and wait until it is active. Send a recognize event asking for joke and see that the alert goes into the background. When the speak is complete, the alert is foregrounded and can be locally stopped.
Note: Disabling test as sometimes "tell me a joke" causes multiple speech started and speech finished events to be sent based on user config making this integration test unstable.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
test_disconnectAndReconnect | |||
) |
Test when a disconnect and reconnect happens before an alert is active
Set a 5 second timer, then call disconnect then reconnect. Once the alert is active, locally stop the alert and ensure AlertStopped is sent.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
test_disconnectAndReconnectBeforeLocalStop | |||
) |
Test when a disconnect and reconnect happens while an alert is active
Set a 5 second timer, then call disconnect, wait for the alert to become active and reconnect. Locally stop the alert and ensure AlertStopped is sent.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
test_removeAllAlertsBeforeAlertIsActive | |||
) |
Test when all alerts are cleared from storage before an alert is active
Set a 5 second timer, then call removeAllAlerts. Wait and ensure that the alert does not become active and no events are sent for it.
alexaClientSDK::integration::test::TEST_F | ( | AlertsTest | , |
test_removeStorageBeforeAlarmIsSet | |||
) |
Test when the storage is removed before an alert is set
Close the storage before asking for a 5 second timer. SetAlertFailed and then DeleteAlertSucceeded events are then sent. Deletion succeeds because missing alert is not treated as an error.
alexaClientSDK::integration::test::TEST_F | ( | AlexaAuthorizationDelegateTest | , |
test_invalidClientIdWithUnrecoverableError | |||
) |
Test when sending invalid refresh token, CBLAuthDelegate notifies the observer of the error.
If an invalid client_id is sent to LWA
, a "InvalidValue" response will be sent back and we should notify the observer of the unrecoverable error.
alexaClientSDK::integration::test::TEST_F | ( | AlexaAuthorizationDelegateTest | , |
test_refreshAuthToken | |||
) |
Test AuthDelegate could get token refreshed with valid configurations
If valid clientID, refreshToken, clientSecret are provided in the AuthDelegate.config file, then AuthDelegate should be able to retrieve the valid refresh token (get authorized).
alexaClientSDK::integration::test::TEST_F | ( | AlexaCommunicationsLibraryTest | , |
test_multipleConnectionStatusObservers | |||
) |
Test add- and removeConnectionStatuObserver, expecting the observer to be updated only when it is added.
alexaClientSDK::integration::test::TEST_F | ( | AlexaCommunicationsLibraryTest | , |
test_persistentConnection | |||
) |
Test that a connection to AVS persists between sending Events.
alexaClientSDK::integration::test::TEST_F | ( | AlexaCommunicationsLibraryTest | , |
test_receiveDirectiveOnDownchannel | |||
) |
Test receiving an AVS Directive on the DownChannel.
DownChannel Directives are unsolicited - they may be pushed to the client by AVS at any time. This test exercises this functionality by sending a RecognizeAudio Event with silence for the attached audio. By using the NEAR_FIELD audio profile, we expect AVS to detect the end of speech and send a StopCapture Directive.
alexaClientSDK::integration::test::TEST_F | ( | AlexaCommunicationsLibraryTest | , |
test_sendEvent | |||
) |
Test sending an Event to AVS.
This test sends a SynchronizeState Event, which does not require an attachment, or receive a Directive in response.
alexaClientSDK::integration::test::TEST_F | ( | AlexaCommunicationsLibraryTest | , |
test_sendEventAndReceiveDirective | |||
) |
Test sending an Event and receiving a Directive in response.
This test sends a Recognize event, which includes an audio attachment. In this case, the audio file sent to AVS asks Alexa to "tell me a joke". The Speak Directive we expect in response will be the joke.
alexaClientSDK::integration::test::TEST_F | ( | AlexaCommunicationsLibraryTest | , |
test_sendEventsConcurrently | |||
) |
Test sending multiple Events concurrently and verify that AVS responds to each of them.
alexaClientSDK::integration::test::TEST_F | ( | AlexaCommunicationsLibraryTest | , |
test_sendEventsSerially | |||
) |
Test sending multiple Events in succession and verify that AVS responds to each of them.
alexaClientSDK::integration::test::TEST_F | ( | AlexaCommunicationsLibraryTest | , |
test_sendEventWithAttachment | |||
) |
Test ability to send an event with attachments to Alexa Voice Service.
This test sends a RecognizeAudio event, which requires an attachment of the audio stream. In this case, we send a pre-recorded audio file which asks Alexa to "tell me a joke".
alexaClientSDK::integration::test::TEST_F | ( | AlexaCommunicationsLibraryTest | , |
test_sendInvalidEvent | |||
) |
Function that tests the behavior of the ACL when an improperly formatted message is sent, expecting the server to return a bad request status.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
DISABLED_test_dropQueueAfterBargeIn | |||
) |
Test DirectiveSequencer's
ability to drop queued AVSDirectives
after Barge-In.
This test registers handlers, including a blocking handler for AVSDirectives
known to come from a canned Recognize
event. It then consumes the handling events up to the point of handling the blocking AVSDirective
. Then the dialogRequestId
is changed (canceling the blocking AVSDirective
and any subsequent AVSDirectives
in that group. Finally, a new Recognize
event with the new dialogRequestId
is sent. The events are then consumed verifying cancellation of AVSDirectives
from the first group and handling of AVSDirectives
in the second group.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
DISABLED_test_noDirectiveHandlerRegisteredForADirectiveInTheMiddle | |||
) |
Test DirectiveSequencer's
ability to drop a directive in the middle when no handler is registered for it.
To do this, no handler is set for a directive (SetMute
) that is known to come down consistently in response to a Recognize event, instead an exception encountered is expected.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
DISABLED_test_sendDirectiveWithoutADialogRequestID | |||
) |
Test DirectiveSequencer's
ability to handle a Directive without a DialogRequestID.
This test sends a Recognize
event to AVS to trigger delivery of a Speak
and a SetAlert
directive. SetAlert
directives do not have a dialogRequestId
value. This test uses that fact to verify that AVSDirectives
with no dialogRequestId
are processed properly.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_cancelDirectivesWhileInQueue | |||
) |
Test DirectiveSequencer's
ability to drop the head of a dialogRequestId
group.
This test registers handlers (including a blocking handler) for the AVSDirectives
expected in response to a canned Recognize
request. When handleDirective()
is called for the blocking AVSDirective
, setFailed() is called to trigger the cancellation of subsequent AVSDirectives
in the same group.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_getAttachmentWithContentId | |||
) |
Test ability to get an attachment from AttachmentManager
.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_multiturnScenario | |||
) |
Test DirectiveSequencer's
ability to handle a multi-turn scenario
This test is intended to test the Directive Sequencer's ability to go through a full loop of sending a recognize event that will prompt a multi-turn directive, receiving a directive group that contains ExpectSpeech, sending a recognize event to respond to Alexa's question, and receiving the final directive group.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_noDirectiveHandlerRegisteredForADirectiveAtTheFront | |||
) |
Test DirectiveSequencer's
ability to drop a directive when no handler is registered for it.
To do this, no handler is set for a directive (SetMute
) that is known to come down consistently in response to a Recognize event, instead an exception encountered is expected.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_oneBlockingDirectiveAtTheFront | |||
) |
Test DirectiveSequencer's
ability to sequence a group that has a Blocking Directive before other directives.
This test is intended to verify the Directive Sequencer's ability to handle a dialogRequestID group that has a blocking directive, followed by non-blocking directives. Expect that the directive handler will receive a SetMute directive and then nothing until setComplete() is called for that directive. Then expect the directive handler to receive at least one subsequent directive.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_oneBlockingDirectiveInTheMiddle | |||
) |
Test DirectiveSequencer's
ability to sequence a group that has one BLOCKING
AVSDirective
in the middle.
This test is intended to test the DirectiveSequencer's
ability to handle a dialogRequestID
group that has at least one non-blocking directive, followed by a blocking directive, followed by non-blocking directives. preHandleDirective()
and handleDirective()
should be called for directives before the Speak directive, whose handling blocks further handling of directives. Once setComplete()
is called for the BLOCKING
AVSDirective
, handleDirective()
should be called for the subsequent (and NON_BLOCKING
) AVSDirectives
without waiting for the completion of any subsequent AVSDirectives
.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_sendDirectiveGroupWithoutBlocking | |||
) |
Test DirectiveSequencer's
ability to pass a group of no-blocking AVSDirectives
to a DirectiveHandler
.
This test registers NON_BLOCKING
handling for a suite of directives expected in response to recognize request. It then verifies that handleDirective() is called for the subsequent directives without waiting for completion of handling of any of the directives.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_sendDirectivesForPreHandling | |||
) |
Test DirectiveSequencer's
ability to make both preHandleDirective() and handleDirective() call for AVSDirectives
with a non-empty dialogRequestId
.
This test registers handlers for the directives expected in response to a Recognize
event. It then counts the number of preHandleDirective()
and handleDirective()
callbacks verifying that the counts come out to the same value in the end.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_sendDirectiveWithDifferentDialogRequestID | |||
) |
Test DirectiveSequencer's
ability to drop directives that do not match the current dialogRequestId
.
The test first sets the dialogRequestId
, sends an event with that dialopRequestId
, flushes the resulting directives, then (without updating the current dialogRequestId
) sends an event with a new dialogRequestId
. It then verifies that the directive handler was not called for the AVSDirectives
expected to result from the second event.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_sendEventWithDirective | |||
) |
Test DirectiveSequencer's ability to pass an AVSDirective
to a DirectiveHandler
.
This test is intended to test DirectiveSequencer's
ability to pass an AVSDirective
to a DirectiveHandler
that has been registered to handle an AVSDirective
.
alexaClientSDK::integration::test::TEST_F | ( | AlexaDirectiveSequencerLibraryTest | , |
test_twoDirectiveHandlersRegisteredForADirective | |||
) |
Test DirectiveSequencer's
ability to refuse to overwrite registration of a directive handler.
To do this, an attempt is made to set two different handlers for the same directive. The DirectiveSequencer
is expected to refuse the second handler. This directive is known to come down consistently in response to a Recognize event. The Handler that was first set is the only one that should receive the directive.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
DISABLED_test_holdToTalkMultiturn | |||
) |
Test AudioInputProcessor's ability to handle a multiturn interation triggered by a hold to talk button.
To do this, audio of "Wikipedia" is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute, Speak, and ExpectSpeech directive. Audio of "Lions" is then fed into the stream and another recognize event is sent.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
DISABLED_test_holdToTalkMultiTurnWithSilence | |||
) |
Test AudioInputProcessor's ability to handle a multiturn interation triggered by a hold to talk button but no user response.
To do this, audio of "Wikipedia" is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute, Speak, and ExpectSpeech directive. Audio of "...." is then fed into the stream and another recognize event is sent but no directives are given in response.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
DISABLED_test_holdToTalkMultiturnWithTimeOut | |||
) |
Test AudioInputProcessor's ability to handle a multiturn interation triggered by a hold to talk button that times out.
To do this, audio of "Wikipedia" is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute, Speak, and ExpectSpeech directive. The button does not trigger another recognize so no recognize event is sent and no directives are given in response. ExpectSpeechTimedOut event is observed to be sent.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
DISABLED_test_tapToTalkJoke | |||
) |
Test AudioInputProcessor's ability to handle a simple interation triggered by a wakeword.
To do this, audio of "Alexa, tell me a joke" is fed into a stream that is being read by a wake word engine. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute and Speak directive. Test AudioInputProcessor's ability to handle a recognize triggered by a wakeword followed by silence .
To do this, audio of "Alexa, ........." is fed into a stream that is being read by a wake word engine. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with no directives. Test AudioInputProcessor's ability to handle a multiturn interation triggered by a wakeword.
To do this, audio of "Alexa, wikipedia" is fed into a stream that is being read by a wake word engine. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute, Speak, and ExpectSpeech directive. Audio of "Lions" is then fed into the stream and another recognize event is sent. Test AudioInputProcessor's ability to handle a simple interation triggered by a wakeword but no user response.
To do this, audio of "Alexa, wikipedia" is fed into a stream that is being read by a wake word engine. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute, Speak, and ExpectSpeech directive. Audio of "...." is then fed into the stream and another recognize event is sent but no directives are given in response. Test AudioInputProcessor's ability to handle a simple interation triggered by a tap to talk button.
To do this, audio of "Tell me a joke" is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute and Speak directive.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
DISABLED_test_tapToTalkMultiturnWithoutUserResponse | |||
) |
Test AudioInputProcessor's ability to handle a multiturn interation triggered by a tap to talk button but no user response.
To do this, audio of "Wikipedia" is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute, Speak, and ExpectSpeech directive. Audio of "...." is then fed into the stream and another recognize event is sent but no directives are given in response.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
DISABLED_test_tapToTalkSilence | |||
) |
Test AudioInputProcessor's ability to handle a silent interation triggered by a tap to talk button.
To do this, audio of "....." is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds no directives.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
DISABLED_test_tapToTalkTimeOpus | |||
) |
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
test_audioWithoutAnyTrigger | |||
) |
Test AudioInputProcessor's ability to not handle audio when no recognize occurs.
To do this, audio of "Tell me a joke" is fed into a stream that is being read by a wake word engine. The lack of the wakeword or button-initiated recognize results in no recognize event being sent.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
test_holdToTalkCancel | |||
) |
Test AudioInputProcessor's ability to handle a cancel partway through a hold to talk interaction.
To do this, audio of "Tell me a joke" is fed into a stream after button sends recognize to AudioInputProcessor. The button then sends a cancel command and no recognize event is sent.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
test_holdToTalkJoke | |||
) |
Test AudioInputProcessor's ability to handle a simple interation triggered by a hold to talk button.
To do this, audio of "Tell me a joke" is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute and Speak directive.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
test_holdToTalkNoAudio | |||
) |
Test AudioInputProcessor's ability to handle no audio being written triggered by a hold to talk button.
To do this, no audio is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with no directive.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
test_tapToTalkCancel | |||
) |
Test AudioInputProcessor's ability to handle a cancel partway through an interaction.
To do this, audio of "Tell me a joke" is fed into a stream after button sends recognize to AudioInputProcessor. The button then sends a reset command and no recognize event is sent.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
test_tapToTalkMultiturn | |||
) |
Test AudioInputProcessor's ability to handle an interation triggered by a tap to talk button with wake word.
To do this, audio of "Alexa, Tell me a joke" is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send only one Recognize event to AVS which responds with a SetMute and Speak directive. Test AudioInputProcessor's ability to handle a multiturn interation triggered by a tap to talk button.
To do this, audio of "Wikipedia" is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with a SetMute, Speak, and ExpectSpeech directive. Audio of "Lions" is then fed into the stream and another recognize event is sent.
alexaClientSDK::integration::test::TEST_F | ( | AudioInputProcessorTest | , |
test_tapToTalkNoAudio | |||
) |
Test AudioInputProcessor's ability to handle no audio being written triggered by a tap to talk button.
To do this, no audio is fed into a stream after button sends recognize to AudioInputProcessor. The AudioInputProcessor is then observed to send a Recognize event to AVS which responds with no directive.
alexaClientSDK::integration::test::TEST_F | ( | AudioPlayerTest | , |
DISABLED_test_flashBriefing | |||
) |
Test ability for the AudioPlayer to handle multiple play directives.
This test is intended to test the AudioPlayer's ability to handle a group play directive all the way through. To do this, an audio file of "Flashbriefing" is sent as a Recognize event. In response, a Speak, then an undefined number of Play directives, and a final Speak directive is received. The tests then observe that the correct events are sent in order.
alexaClientSDK::integration::test::TEST_F | ( | AudioPlayerTest | , |
test_singASong | |||
) |
Test ability for the AudioPlayer to handle one play directive.
This test is intended to test the AudioPlayer's ability to handle a short play directive all the way through. To do this, an audio file of "Sing me a song" is sent as a Recognize event. In response, a Play directive is received. The tests then observe that the correct events are sent in order.
alexaClientSDK::integration::test::TEST_F | ( | NetworkIntegrationTests | , |
test_connectAfterSlowConnection | |||
) |
Test if connection and disconnection can be established after delay is introduced.
alexaClientSDK::integration::test::TEST_F | ( | NetworkIntegrationTests | , |
test_connectBeforeSlowConnection | |||
) |
Establish Connection, and introduce delay and check if connectionStatus
remains CONNECTED.
alexaClientSDK::integration::test::TEST_F | ( | NetworkIntegrationTests | , |
test_reConnectAfterDelay | |||
) |
Establish connection, introduce delay and test if connect can be done again.
alexaClientSDK::integration::test::TEST_F | ( | NetworkIntegrationTests | , |
test_sendEventAfterDelayFails | |||
) |
Establish connection, introduce a longer delay time of greater than 30 seconds, send a message, the Status of MessageRequest will be TIMEDOUT.
alexaClientSDK::integration::test::TEST_F | ( | NetworkIntegrationTests | , |
test_sendEventAfterDelayPass | |||
) |
Establish connection, introduce a delay, send a message, check if the Status of MessageRequest is SUCCESS.
alexaClientSDK::integration::test::TEST_F | ( | ServerDisconnectIntegrationTest | , |
DISABLED_test_sendEvent | |||
) |
Test sending a message while having a server side disconnect. The send fails to return the expected status of SUCCESS.
alexaClientSDK::integration::test::TEST_F | ( | SpeechSynthesizerTest | , |
DISABLED_test_bargeInOnMultipleSpeaksInTheMiddle | |||
) |
Test ability for the SpeechSynthesizer to handle a barge in in the middle of consecutive speaks.
This test is intended to test the SpeechSynthesizer's ability to receive multiple directives, play each using a MediaPlayer then return to a finished state and notify the DirectiveSequencer that the directive was handled. This is done by sending a Recognize event to AVS with audio of "What's up?" which returns four sets of SetMute and Speak. While the Speak directives are being handled, the dialogRequestID is changed and all directives are cancelled.
alexaClientSDK::integration::test::TEST_F | ( | SpeechSynthesizerTest | , |
DISABLED_test_handleMultipleConsecutiveSpeaks | |||
) |
Test ability for the SpeechSynthesizer to handle multiple consecutive Speak directives.
This test is intended to test the SpeechSynthesizer's ability to receive multiple directives, play each using a MediaPlayer then return to a finished state and notify the DirectiveSequencer that the directive was handled. This is done by sending a Recognize event to AVS with audio of "What's up?" which returns four sets of SetMute and Speak.
alexaClientSDK::integration::test::TEST_F | ( | SpeechSynthesizerTest | , |
test_bargeInOnMultipleSpeaksAtTheBeginning | |||
) |
Test ability for the SpeechSynthesizer to handle a barge in at the begining of consecutive speaks.
This test is intended to test the SpeechSynthesizer's ability to receive multiple directives, play each using a MediaPlayer then return to a finished state and notify the DirectiveSequencer that the directive was handled. This is done by sending a Recognize event to AVS with audio of "What's up?" which returns four sets of SetMute and Speak. Once the first Speak reaches the SpeechSynthesizer, the dialogRequestID is changed and all directives are cancelled.
alexaClientSDK::integration::test::TEST_F | ( | SpeechSynthesizerTest | , |
test_bargeInOnOneSpeech | |||
) |
Test ability for the SpeechSynthesizer to handle one Speak directive.
This test is intended to test the SpeechSynthesizer's ability to receive one directive, play it using a MediaPlayer then return to a finished state. Once the Speak reaches the SpeechSynthesizer, the dialogRequestID is changed and all directives are cancelled.
alexaClientSDK::integration::test::TEST_F | ( | SpeechSynthesizerTest | , |
test_handleNoDirectives | |||
) |
Test ability for the test setup to handle no directives.
This test is intended to test the SpeechSynthesizer's ability to do nothing when there are no Speak directives. No Recognize events are sent to trigger any directives.
alexaClientSDK::integration::test::TEST_F | ( | SpeechSynthesizerTest | , |
test_multiturnScenario | |||
) |
Test ability for the SpeechSynthesizer to handle a Multiturn scenario.
This test is intended to test the SpeechSynthesizer's ability to receive one directive, play it using a MediaPlayer then return to a finished state. Another recognize event is then sent to AVS is response to the ExpectSpeech directive which prompts another Speak directive to be handled.
|
static |
Timeout in seconds for AuthDelegate to wait for LWA response.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Sample alerts activity id.
|
static |
Sample alerts activity id.
|
static |
Sample alerts activity id.
|
static |
|
static |
|
static |
|
static |
This is a partial JSON string that should not be parseable.
|
static |
The compatible encoding for AIP.
|
static |
The compatible encoding for AIP.
|
static |
The compatible encoding.
The sensitivity to the keyword in the model.
|
static |
The compatible endianness for AIP.
|
static |
The compatible endianness for AIP.
|
static |
The compatible endianness.
|
static |
The compatible number of channels.
|
static |
The compatible number of channels.
|
static |
The compatible number of channels.
|
static |
The compatible sample rate for AIP.
|
static |
The compatible sample rate for AIP.
|
static |
The compatible sample rate.
|
static |
The compatible sample rate for OPUS 32KHz.
|
static |
The compatible bits per sample.
|
static |
The compatible bits per sample.
|
static |
The compatible bits per sample.
|
static |
Sample content activity id.
|
static |
|
static |
Sample content activity id.
|
static |
The content Channel name used in intializing the FocusManager.
|
static |
The priority of the content Channel used in intializing the FocusManager.
|
static |
This string specifies a Recognize event using the CLOSE_TALK profile and uses the first DialogRequestID.
|
static |
|
static |
|
static |
This string specifies a Recognize event using the CLOSE_TALK profile.
|
static |
This string specifies a Recognize event using the CLOSE_TALK profile and uses the second DialogRequestID.
|
static |
|
static |
Default AVS
gateway to connect to.
|
static |
Default media player state for reporting all playback eventing.
|
static |
Amount of Delay in milliseconds to be added.
|
static |
Sample dialog activity id.
|
static |
|
static |
Sample dialog activity id.
|
static |
|
static |
The dialog Channel name used in intializing the FocusManager.
|
static |
The priority of the dialog Channel used in intializing the FocusManager.
|
static |
|
static |
|
static |
|
static |
This string specifies an ExpectSpeechTimedOut event.
|
static |
Path to the AlexaClientSDKConfig.json file (from command line arguments).
|
static |
Path to the AlexaClientSDKConfig.json file (from command line arguments).
|
static |
Path to the AlexaClientSDKConfig.json file (from command line arguments).
|
static |
Path to the AlexaClientSDKConfig.json file (from command line arguments).
Path to the AlexaClientSDKConfig.json file.
|
static |
Path to the AlexaClientSDKConfig.json file (from command line arguments).
|
static |
Path to the AlexaClientSDKConfig.json file (from command line arguments).
|
static |
Path to the AlexaClientSDKConfig.json file (from command line arguments).
|
static |
Path to resources (e.g. audio files) for tests (from command line arguments).
|
static |
Path to resources (e.g. audio files) for tests (from command line arguments).
|
static |
Path to resources (e.g. audio files) for tests (from command line arguments).
|
static |
Path to resources (e.g. audio files) for tests (from command line arguments).
|
static |
Path to resources (e.g. audio files) for tests (from command line arguments).
|
static |
Path to resources (e.g. audio files) for tests (from command line arguments).
|
static |
A counter used to increment the source id when a new source is set.
|
static |
|
static |
JSON key to get the dialogRequestId value of a header.
|
static |
JSON key to get the dialogRequestId value of a header.
|
static |
JSON key to get the dialogRequestId value of a header.
|
static |
JSON key to get the dialogRequestId value of a header.
|
static |
JSON key to get the dialogRequestId value of a header.
|
static |
JSON key to get the dialogRequestId value of a header.
|
static |
JSON key to get the directive object of a message.
|
static |
JSON key to get the directive object of a message.
|
static |
JSON key to get the directive object of a message.
|
static |
JSON key to get the directive object of a message.
|
static |
JSON key to get the directive object of a message.
|
static |
JSON key to get the directive object of a message.
|
static |
JSON key to get the event object of a message.
|
static |
JSON key to get the event object of a message.
|
static |
JSON key to get the event object of a message.
|
static |
JSON key to get the event object of a message.
|
static |
JSON key to get the header object of a message.
|
static |
JSON key to get the header object of a message.
|
static |
JSON key to get the header object of a message.
|
static |
JSON key to get the header object of a message.
|
static |
JSON key to get the header object of a message.
|
static |
JSON key to get the header object of a message.
|
static |
JSON key to get the messageId value of a header.
|
static |
JSON key to get the messageId value of a header.
|
static |
JSON key to get the messageId value of a header.
|
static |
JSON key to get the messageId value of a header.
|
static |
JSON key to get the messageId value of a header.
|
static |
JSON key to get the messageId value of a header.
|
static |
JSON key to get the name value of a header.
|
static |
JSON key to get the name value of a header.
|
static |
JSON key to get the name value of a header.
|
static |
JSON key to get the name value of a header.
|
static |
JSON key to get the name value of a header.
|
static |
JSON key to get the name value of a header.
|
static |
JSON key to get the namespace value of a header.
|
static |
JSON key to get the namespace value of a header.
|
static |
JSON key to get the namespace value of a header.
|
static |
JSON key to get the namespace value of a header.
|
static |
JSON key to get the namespace value of a header.
|
static |
JSON key to get the namespace value of a header.
|
static |
JSON key to get the payload object of a message.
|
static |
JSON key to get the payload object of a message.
|
static |
JSON key to get the payload object of a message.
|
static |
JSON key to get the payload object of a message.
|
static |
JSON key to get the payload object of a message.
|
static |
JSON key to get the payload object of a message.
|
static |
JSON key to get the payload object of a message.
|
static |
|
static |
Amount of Delay for causing a TIMEDOUT status in MessageRequest.
|
static |
The time to wait for expected message status when delay is longer.
|
static |
The value of MAX_THREADS is determined by the maximum number of streams we can have active at once which is defined in HTTP2Connection.cpp as a constant MAX_STREAMS=10. Streams include events, the downchannel and ping. Since we establish a downchannel when we connect, we can only have (MAX_STREAMS - 1) events sent at once. Therefore, the value of MAX_THREADS = MAX_STREAMS -1.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
std::string alexaClientSDK::integration::test::network_interface |
The network interface specified for the delay to be added.
|
static |
This string specifies a Recognize event using the NEAR_FIELD profile.
|
static |
|
static |
|
static |
This is a 16 bit 16 kHz little endian linear PCM audio file containing a recognized message for AVS.
|
static |
|
static |
This is a 16 bit 16 kHz little endian linear PCM audio file of "flashbriefing" to be recognized.
|
static |
|
static |
|
static |
|
static |
This is a 16 bit 16 kHz little endian linear PCM audio file of "Joke" to be recognized.
|
static |
|
static |
This is a 16 bit 16 kHz little endian linear PCM audio file of "Lions" to be recognized.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
This is a 16 bit 16 kHz little endian linear PCM audio file of "Set a timer for 5 seconds" to be recognized.
|
static |
|
static |
|
static |
|
static |
|
static |
This is a 16 bit 16 kHz little endian linear PCM audio file of "What's up" to be recognized.
|
static |
|
static |
This is a 16 bit 16 kHz little endian linear PCM audio file of "Wikipedia" to be recognized.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
This is a 16 bit 16 kHz little endian linear PCM audio file containing several seconds of silence.
|
static |
|
static |
|
static |
|
static |
|
static |
This is a basic synchronize JSON message which may be used to initiate a connection with AVS.
|
static |
Sample content activity id.
|
static |
An incorrect Channel name that is never initialized as a Channel.
|
static |
The priority of the content Channel used in intializing the FocusManager.
|
static |
|
static |
The time to wait for expected message status on sending the message.
|
static |
The time to wait for expected message status on sending the message.
|
static |
JSON key to add to the payload object of a message.
|
static |
|
static |
AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0