Adding tests to Alexa Skill using Bespoken virtual-alexa.
Use of two different accounts for testing: scoutskilltest@mailinator.com and scoutskilltest2@mailinator.com. At the moment the second one is only useful to have coverage over the case where the number of articles is a multiple of TITLE_CHUNK_LEN.
Current coverage is 88%.
Before merging:
Register both tests users in scout-stage.
Notes:
When testing if the skill is playing a file, we just test that the Alexa is playing something (not especially the right file). That can be quite hard to implement since the file names are dynamic.
We have a portion of code in audio_controller.js that might never execute. We have to investigate that. A branch of state_handlers.js also seem to never execute.
We currently don't catch the Scout Unavailable rejection.
SearchAndSummarizeArticle Intent is implemented in state_handlers.js but not declared in the model. So we are currently never executing this code.
Yes and No intents don't make sense in our current implementation. They are not tested.
Pause and Resume intents are implemented in every state. But they should only be used in the Play Mode state.
We also lack in test coverage because cases when the API (scout-ua) is down are not currently tested.
It seems like some test cases are not reproducible in real (like PlayMode - Play different article).
Strange behavior of virtual-alexa when doing actions while playing audio (such as asking to play a different file while playing).
As we are doing a lot of calls to the Pocket API in a very short interval of time, we could be rate limited when running the tests twice in a row.
Fixes #57 Fixes #79
Adding tests to Alexa Skill using Bespoken virtual-alexa. Use of two different accounts for testing: scoutskilltest@mailinator.com and scoutskilltest2@mailinator.com. At the moment the second one is only useful to have coverage over the case where the number of articles is a multiple of TITLE_CHUNK_LEN.
Current coverage is 88%.
Before merging:
Notes:
When testing if the skill is playing a file, we just test that the Alexa is playing something (not especially the right file). That can be quite hard to implement since the file names are dynamic.
We have a portion of code in audio_controller.js that might never execute. We have to investigate that. A branch of state_handlers.js also seem to never execute.
We currently don't catch the Scout Unavailable rejection.
SearchAndSummarizeArticle Intent is implemented in state_handlers.js but not declared in the model. So we are currently never executing this code.
Yes and No intents don't make sense in our current implementation. They are not tested.
Pause and Resume intents are implemented in every state. But they should only be used in the Play Mode state.
We also lack in test coverage because cases when the API (scout-ua) is down are not currently tested.
It seems like some test cases are not reproducible in real (like PlayMode - Play different article).
Strange behavior of virtual-alexa when doing actions while playing audio (such as asking to play a different file while playing).
As we are doing a lot of calls to the Pocket API in a very short interval of time, we could be rate limited when running the tests twice in a row.