Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: Allow debugging tests by printing the response #46

Open
jerzy-wachowiak opened this issue Mar 19, 2019 · 2 comments
Open

Comments

@jerzy-wachowiak
Copy link

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

@hoegertn
Copy link
Collaborator

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.

@jerzy-wachowiak
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants