kevin-mitchell / alexa-app

Set of classes to make creating Amazon Alexa Skills Kit (ASK) applications easier with Laravel and Lumen
MIT License
97 stars 47 forks source link

How to test alexaroutes #42

Open amenk opened 7 years ago

amenk commented 7 years ago

How can I call alexa routes from a test case?

Is there any mock prepared for this?

Dayjo commented 6 years ago

@amenk The way that I have been testing, is with a REST client, copying the request from the Alexa developer dashboard test page and posting those requests to the local domain. I guess you'd have to build something custom to implement this into unit tests.

It would be nice to have a suite of tests for this repo for the methods anyway.

amenk commented 6 years ago

I was having something in mind like the laravel router testing where you can send the "said" string and get a response.

Dayjo commented 6 years ago

@amenk Sounds good, I guess you'd have to replicate essentially what the simulator does when you test an intent in their system and it generates the request.