alexa-skill-test-framework icon indicating copy to clipboard operation
alexa-skill-test-framework copied to clipboard

Improvement: Allow debugging tests by printing the response

Open jerzy-wachowiak opened this issue 6 years ago • 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

jerzy-wachowiak avatar Mar 19 '19 08:03 jerzy-wachowiak

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.

hoegertn avatar Mar 19 '19 08:03 hoegertn

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 } ]);

jerzy-wachowiak avatar Mar 19 '19 13:03 jerzy-wachowiak