Improvement: Allow debugging tests by printing the response
Opened this issue · 2 comments
Allow switching off/on debugging tests by printing the response. Something based on
... console.log(response); var actualSay = response.response && response.response.outputSpeech ? response.response.outputSpeech.ssml : undefined; var actualReprompt = response.response && response.response.reprompt && response.response.reprompt.outputSpeech ? response.response.reprompt.outputSpeech.ssml : undefined; ...
in ../node_modules/alexa-skill-test-framework/index.js
Sounds like a good idea. Do mind opening it again here: https://github.com/taimos/ask-sdk-test/
I am not sure this version is maintained anymore.
I implemented it for me this way:
if (currentItem.printsResponse == true) { console.log(JSON.stringify(response, null, 2)); }
to be used like this
alexaTest.test([ { request: alexaTest.getLaunchRequest(), says: 'Welcome to the Alexa Skills Kit, you can say hello!', reprompts: 'Welcome to the Alexa Skills Kit, you can say hello!', shouldEndSession: false, printsResponse: true } ]);