Go back to the Amazon Developer Portal and select your skill from the list. You may still have a browser tab open if you started at the beginning of this tutorial.
Access the Alexa Simulator, by selecting the Test link from the top navigation menu.
Enable Testing by activating the Test is disabled for this skill slider. It should be underneath the top navigation menu. Enabling should change it to read Test is enabled for this skill.
To validate that your skill is working as expected, invoke your skill from the Alexa Simulator. You can either type or click and hold the mic from the input box to use your voice.
Ensure your skill works the way that you designed it to.
Configure a test event in AWS Lambda. Now that you are familiar with the request and response boxes in the Service Simulator, it's important for you to know that you can use your requests to directly test your Lambda function every time you update it. To do this:
Enter an utterance in the service simulator, and copy the generated Lambda Request (JSON Input) for the next step.
Open your Lambda function in AWS, open the Actions menu, and select "Configure test events."
Select "Create new test event". Choose "Alexa Start Session" as the Event Template from the dropdown list. You can choose any test event in the list, as they are just templated event requests, but using "Alexa Start Session" is an easy one to remember.
Type in an Event Name into the Event Name field. Delete the contents of the code editor, and paste the Lambda request you copied above into the code editor. The Event Name is only visible to you. Name your test event something descriptive and memorable. For our example, we entered an event name as "startSession". Additionally, by copying and pasting your Lambda Request from the service simulator, you can test different utterances and skill events beyond the pre-populated templates in Lambda.
Click the "Create" button. This will save your test event and bring you back to the main configuration for your lambda function.
Click the "Test" button to execute the "startSession" test event.
This gives you visibility into four things:
Your response, listed in the "Execution Result."
A Summary of the statistics for your request. This includes things like duration, resources, and memory used.
Log output. By effectively using console.log() statements in your Lambda code, you can track what is happening inside your function, and help to figure out what is happening when something goes wrong. You will find the log to be incredibly valuable as you move into more advanced skills.
A link to your CloudWatch logs for this function. This will show you all of the responses and log statements from every user interaction. This is very useful, especially when you are testing your skill from a device with your voice. (It is the "Click here" link in the Log Output description.)
Other testing methods to consider:
If your sample skill is working properly, you can now customize your skill.