Wrapping Up

Testing is one of the most important practices of any software project, including Alexa skill projects. Establishing a suite of tests will help ensure that the code you create does what you expect it to do, and continues to fulfill your expectations as development progresses. Although the voice-first aspect makes testing Alexa skills somewhat unique, there are several tools and libraries that make it easy to ensure that the skills you develop do what you expect them to do.

Testing skills with semi-automated tools, such as with the ASK CLI’s simulate and dialog commands, makes it possible to script a conversation with Alexa. You will still need to manually verify the responses, but scripts can provide a repeatable performance (although at the expense of losing the ability to hear a response).

Tools like the Alexa Skill Test Framework and Bespoken’s BST provide a fully automated testing experience, enabling repeatability and automated verification of responses. BST even provides test coverage support to help identify bits of your skill’s code that aren’t covered by a test.

Having set a foundation for testing Alexa skills, we’re now ready to proceed with building out the Star Port 75 Travel skill. In the next chapter, we’ll add some essential conversational capabilities to our skill, enabling the user to specify parameters as input. As we build out the skill functionality, we’ll apply some of the testing techniques learned in this chapter to ensure that the skill behaves correctly.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset