AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
Classes | |
class | APLCATest |
class | BaseAPLCapabilityAgentTest |
Test harness for BaseAPLCapabilityAgent class. More... | |
Typedefs | |
using | JSONStream = std::vector< std::shared_ptr< std::istream > > |
Alias for JSON stream type used in ConfigurationNode initialization. More... | |
Functions | |
static std::chrono::milliseconds | TIMEOUT (1000) |
Timeout when waiting for futures to be set. More... | |
const std::string | makeDocumentAplPayload (const std::string &token, const std::string &timeoutType) |
static void | setConfig () |
static aplCapabilityCommonInterfaces::aplEventPayload::UserEvent | createUserEventPayload (aplCapabilityCommonInterfaces::PresentationToken token, std::string arguments, std::string source, std::string components) |
static aplCapabilityCommonInterfaces::aplEventPayload::DataSourceFetch | createDataSourceFetchPayload (aplCapabilityCommonInterfaces::PresentationToken token, std::string dataSourceType, std::string fetchPayload) |
static aplCapabilityCommonInterfaces::aplEventPayload::VisualContext | createVisualContextPayload (aplCapabilityCommonInterfaces::PresentationToken token, std::string version, std::string visualContext, std::string datasourceContext) |
static void | verifySendMessage (std::shared_ptr< avsCommon::avs::MessageRequest > request, const std::string expectedEventName, const std::string expectedPayload, const std::string expectedNameSpace) |
TEST_F (BaseAPLCapabilityAgentTest, testTimeoutShort) | |
TEST_F (BaseAPLCapabilityAgentTest, testTimeoutTransient) | |
TEST_F (BaseAPLCapabilityAgentTest, testTimeoutLong) | |
TEST_F (BaseAPLCapabilityAgentTest, testUnknownDirective) | |
TEST_F (BaseAPLCapabilityAgentTest, testMissingTimeoutTypeRenderDocumentDirective) | |
TEST_F (BaseAPLCapabilityAgentTest, testInvalidTimeoutTypeRenderDocumentDirective) | |
TEST_F (BaseAPLCapabilityAgentTest, testMalformedRenderDocumentDirective) | |
TEST_F (BaseAPLCapabilityAgentTest, testMalformedRenderDocumentDirective2) | |
TEST_F (BaseAPLCapabilityAgentTest, testMalformedExecuteCommandDirective) | |
TEST_F (BaseAPLCapabilityAgentTest, testMalformedExecuteCommandDirective2) | |
TEST_F (BaseAPLCapabilityAgentTest, testExecuteCommandAfterMismatchedAPLCard) | |
TEST_F (BaseAPLCapabilityAgentTest, testExecuteCommandAfterRightAPL) | |
TEST_F (BaseAPLCapabilityAgentTest, testSendUserEvent) | |
TEST_F (BaseAPLCapabilityAgentTest, testIndexListDataSourceFetchRequestEvent) | |
TEST_F (BaseAPLCapabilityAgentTest, testTokenListDataSourceFetchRequestEvent) | |
TEST_F (BaseAPLCapabilityAgentTest, testAPLProactiveStateReportNotSentIfNotRendering) | |
TEST_F (BaseAPLCapabilityAgentTest, testAPLProactiveStateReportSentIfRendering) | |
TEST_F (BaseAPLCapabilityAgentTest, testAPLProactiveStateReportSentIndependentOfProvideStateResponse) | |
TEST_F (BaseAPLCapabilityAgentTest, testAPLProactiveStateReportNotSentIfRenderingNotComplete) | |
TEST_F (BaseAPLCapabilityAgentTest, testRenderDocumentReceivedTimestamp) | |
Variables | |
static std::string | TESTPRESENTATIONAPL_CONFIGURATION_ROOT_KEY = "TestPresentationAPLCapabilityAgent" |
The key in our config file to find the root of APL CA configuration. More... | |
static const std::string | NAMESPACE = "Test.Presentation.APL" |
The namespace registered for this capability agent. More... | |
static const std::string | UNKNOWN_DIRECTIVE = "Unknown" |
An unknown directive signature. More... | |
static const std::string | USER_EVENT_EVENT = "UserEvent" |
The name for UserEvent event. More... | |
static const std::string | LOAD_INDEX_LIST_DATA = "LoadIndexListData" |
The name for LoadIndexListData event. More... | |
static const std::string | LOAD_TOKEN_LIST_DATA = "LoadTokenListData" |
The name for LoadTokenListData event. More... | |
static const std::string | MESSAGE_ID = "messageId" |
The MessageId identifer. More... | |
static const std::string | MESSAGE_ID_2 = "messageId2" |
The MessageId identifer. More... | |
static const std::string | SAMPLE_USER_EVENT_PAYLOAD |
Payload to be sent for UserEvent. More... | |
static const std::string | DYNAMIC_INDEX_LIST = "dynamicIndexList" |
DynamicIndexList DataSource type. More... | |
static const std::string | SAMPLE_INDEX_DATA_SOURCE_FETCH_REQUEST |
Payload to be sent for ListDataSourceFetchRequest. More... | |
static const std::string | SAMPLE_INDEX_DATA_SOURCE_FETCH_APL_REQUEST |
Payload to be sent for ListDataSourceFetchRequest from APLCore. More... | |
static const std::string | DYNAMIC_TOKEN_LIST = "dynamicTokenList" |
DynamicTokenList DataSource type. More... | |
static const std::string | SAMPLE_TOKEN_DATA_SOURCE_FETCH_REQUEST |
Payload to be sent for TokenDataSourceFetchRequest. More... | |
static const std::string | SAMPLE_TOKEN_DATA_SOURCE_FETCH_APL_REQUEST |
Payload to be sent for TokenDataSourceFetchRequest from APLCore. More... | |
static const std::string | MESSAGE_EVENT_KEY = "event" |
JSON key for the event section of a message. More... | |
static const std::string | MESSAGE_NAMESPACE_KEY = "namespace" |
JSON key for the namespace field of a message header. More... | |
static const std::string | MESSAGE_NAME_KEY = "name" |
JSON key for the name field of a message header. More... | |
static const std::string | MESSAGE_HEADER_KEY = "header" |
JSON key for the header section of a message. More... | |
static const std::string | MESSAGE_PAYLOAD_KEY = "payload" |
JSON key for the payload section of an message. More... | |
static const char * | SEND_INDEX_LIST_DATA = "SendIndexListData" |
The name for SendIndexListData directive. More... | |
static const char * | UPDATE_INDEX_LIST_DATA = "UpdateIndexListData" |
The name for UpdateIndexListData directive. More... | |
static const char * | SEND_TOKEN_LIST_DATA = "SendTokenListData" |
The name for SendTokenListData directive. More... | |
static const NamespaceAndName | DOCUMENT {NAMESPACE, "RenderDocument"} |
The RenderDocument directive signature. More... | |
static const NamespaceAndName | COMMAND {NAMESPACE, "ExecuteCommands"} |
The ExecuteCommands directive signature. More... | |
static const NamespaceAndName | INDEX_LIST_DATA {NAMESPACE, SEND_INDEX_LIST_DATA} |
The SendIndexListData directive signature. More... | |
static const NamespaceAndName | INDEX_LIST_UPDATE {NAMESPACE, UPDATE_INDEX_LIST_DATA} |
The UpdateIndexListData directive signature. More... | |
static const NamespaceAndName | TOKEN_LIST_DATA {NAMESPACE, SEND_TOKEN_LIST_DATA} |
The SendTokenListData directive signature. More... | |
static const char | SKILL_ID [] = "skillId" |
Identifier for the skilld in presentationSession. More... | |
static const char | PRESENTATION_SESSION_ID [] = "id" |
Identifier for the id in presentationSession. More... | |
static const std::string | DOCUMENT_APL_PAYLOAD |
A RenderDocument directive with APL payload. More... | |
static const std::string | DOCUMENT_APL_PAYLOAD_2 |
A 2nd RenderDocument directive with APL payload. More... | |
static const std::string | DOCUMENT_APL_PAYLOAD_MISSING_TIMEOUTTYPE |
static const std::string | DOCUMENT_APL_PAYLOAD_INVALID_TIMEOUTTYPE |
static const std::string | DOCUMENT_APL_PAYLOAD_MALFORMED |
A malformed RenderDocument directive with APL payload without presentationToken. More... | |
static const std::string | DOCUMENT_APL_PAYLOAD_MALFORMED_2 |
A malformed RenderDocument directive with APL payload without document. More... | |
static const std::string | EXECUTE_COMMAND_PAYLOAD_MALFORMED |
A malformed ExecuteCommand directive with APL payload without commands. More... | |
static const std::string | EXECUTE_COMMAND_PAYLOAD_MALFORMED_2 |
A malformed ExecuteCommand directive with APL payload without presentationToken. More... | |
static const std::string | EXECUTE_COMMAND_PAYLOAD |
static const std::string | SETTINGS_CONFIG |
static const std::string | WINDOW_ID = "WINDOW_ID" |
Test window ID. More... | |
static const unsigned int | STATE_REQUEST_TOKEN = 1 |
A visual state request token. More... | |
static const unsigned int | PROACTIVE_STATE_REQUEST_TOKEN = 0 |
A state request token for a proactive state request. More... | |
static const std::string | APL_TOKEN = "APL_TOKEN" |
APL_TOKEN used in documents. More... | |
static const char *const | APL_TOKEN_2 = "APL_TOKEN_2" |
APL_TOKEN_2 used in documents. More... | |
static const std::string | TEST_METRIC_NAME = "APLCATest" |
Metric name for the test CA. More... | |
static std::shared_ptr< avsCommon::utils::metrics::MetricRecorderInterface > | metricRecorder |
Metric recorder shared ptr. More... | |
std::mutex | m |
std::condition_variable | conditionVariable |
using alexaClientSDK::aplCapabilityCommon::test::JSONStream = typedef std::vector<std::shared_ptr<std::istream> > |
Alias for JSON stream type used in ConfigurationNode
initialization.
|
static |
|
static |
|
static |
const std::string alexaClientSDK::aplCapabilityCommon::test::makeDocumentAplPayload | ( | const std::string & | token, |
const std::string & | timeoutType | ||
) |
|
static |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testTimeoutShort | |||
) |
Tests timeout calculation
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testTimeoutTransient | |||
) |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testTimeoutLong | |||
) |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testUnknownDirective | |||
) |
Tests unknown Directive. Expect that the sendExceptionEncountered and setFailed will be called.
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testMissingTimeoutTypeRenderDocumentDirective | |||
) |
Tests when a RenderDocument Directive doesn't contain timeoutType. Verify that sendExceptionEncountered and setFailed are not called.
Some domains do not include timeout type.
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testInvalidTimeoutTypeRenderDocumentDirective | |||
) |
Tests when a RenderDocument Directive contains an invalid timeoutType. Expect that sendExceptionEncountered and setFailed will be called.
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testMalformedRenderDocumentDirective | |||
) |
Tests when a malformed RenderDocument Directive (without presentationToken) is received. Expect that the sendExceptionEncountered and setFailed will be called.
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testMalformedRenderDocumentDirective2 | |||
) |
Tests when a malformed RenderDocument Directive (without document) is received. Expect that the sendExceptionEncountered and setFailed will be called.
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testMalformedExecuteCommandDirective | |||
) |
Tests when a malformed ExecuteCommands Directive is received (without presentationToken). Expect that the sendExceptionEncountered and setFailed will be called.
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testMalformedExecuteCommandDirective2 | |||
) |
Tests when a malformed ExecuteCommands Directive (without commands) is received. Expect that the sendExceptionEncountered and setFailed will be called.
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testExecuteCommandAfterMismatchedAPLCard | |||
) |
Tests when a ExecuteCommands Directive is received after an APL card is displayed. In this case the ExecuteCommand should fail as presentationToken(APL rendered) != presentationToken(ExecuteCommand).
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testExecuteCommandAfterRightAPL | |||
) |
Tests when a ExecuteCommands Directive is received after displaying an APL card with matching presentationToken. The command should be successful.
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testSendUserEvent | |||
) |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testIndexListDataSourceFetchRequestEvent | |||
) |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testTokenListDataSourceFetchRequestEvent | |||
) |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testAPLProactiveStateReportNotSentIfNotRendering | |||
) |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testAPLProactiveStateReportSentIfRendering | |||
) |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testAPLProactiveStateReportSentIndependentOfProvideStateResponse | |||
) |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testAPLProactiveStateReportNotSentIfRenderingNotComplete | |||
) |
alexaClientSDK::aplCapabilityCommon::test::TEST_F | ( | BaseAPLCapabilityAgentTest | , |
testRenderDocumentReceivedTimestamp | |||
) |
Checks that the timestamp for the directive is recorded and passed on correctly
|
static |
Timeout when waiting for futures to be set.
|
static |
Verify the request sent to AVS is as expected.
|
static |
APL_TOKEN used in documents.
|
static |
APL_TOKEN_2 used in documents.
|
static |
The ExecuteCommands directive signature.
std::condition_variable alexaClientSDK::aplCapabilityCommon::test::conditionVariable |
|
static |
The RenderDocument directive signature.
|
static |
A RenderDocument directive with APL payload.
|
static |
A 2nd RenderDocument directive with APL payload.
|
static |
|
static |
A malformed RenderDocument directive with APL payload without presentationToken.
|
static |
A malformed RenderDocument directive with APL payload without document.
|
static |
|
static |
DynamicIndexList DataSource type.
|
static |
DynamicTokenList DataSource type.
|
static |
|
static |
A malformed ExecuteCommand directive with APL payload without commands.
|
static |
A malformed ExecuteCommand directive with APL payload without presentationToken.
|
static |
The SendIndexListData directive signature.
|
static |
The UpdateIndexListData directive signature.
|
static |
The name for LoadIndexListData event.
|
static |
The name for LoadTokenListData event.
std::mutex alexaClientSDK::aplCapabilityCommon::test::m |
|
static |
JSON key for the event section of a message.
|
static |
JSON key for the header section of a message.
|
static |
The MessageId
identifer.
|
static |
The MessageId
identifer.
|
static |
JSON key for the name field of a message header.
|
static |
JSON key for the namespace field of a message header.
|
static |
JSON key for the payload section of an message.
|
static |
Metric recorder shared ptr.
|
static |
The namespace registered for this capability agent.
|
static |
Identifier for the id in presentationSession.
|
static |
A state request token for a proactive state request.
|
static |
Payload to be sent for ListDataSourceFetchRequest from APLCore.
|
static |
Payload to be sent for ListDataSourceFetchRequest.
|
static |
Payload to be sent for TokenDataSourceFetchRequest from APLCore.
|
static |
Payload to be sent for TokenDataSourceFetchRequest.
|
static |
Payload to be sent for UserEvent.
|
static |
The name for SendIndexListData directive.
|
static |
The name for SendTokenListData directive.
|
static |
|
static |
Identifier for the skilld in presentationSession.
|
static |
A visual state request token.
|
static |
Metric name for the test CA.
|
static |
The key in our config file to find the root of APL CA configuration.
|
static |
The SendTokenListData directive signature.
|
static |
An unknown directive signature.
|
static |
The name for UpdateIndexListData directive.
|
static |
The name for UserEvent event.
|
static |
Test window ID.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0