question

Adam Housman avatar image
Adam Housman asked

Testing from Command Line

Does anyone have a workflow for testing Alexa apps hosted on Lambda from the command line? It is awkward to copy/paste sample intents into the test interface on lambda.
alexa skills kitsubmission testing certification
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jjaquinta avatar image
jjaquinta answered
You can test Lambda apps from EchoSim. https://github.com/jjaquinta/EchoSim The simplest way is to surface your Lambda function to a web URL by using Amazon's Gateway API. Then you can use EchoSim as-is (or curl, for that matter), to test it. You can't, yet, call EchoSim from the command line, but you will soon. You can, however, create scripts and collect scripts into test suites. It's there in the source right now. I'll be wrapping up a new release and some doc tonight.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Adam Housman avatar image
Adam Housman answered
Thanks, will try that out. I also discovered I can directly test each event (session start, intent, etc.) with aws-cli tools... For example: aws lambda invoke --payload file://launchRequest.json --function-name myAlexaSkill outfile.json This will be useful for testing as part of a build / deploy workflow.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jjaquinta avatar image
jjaquinta answered
Just packaged a release, and wrote a proper readme: https://github.com/jjaquinta/EchoSim
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.