jewkesy
jewkesy

Reputation: 85

Continuous Integration using a virtual Alexa device?

Has anyone had any success with creating their own virtual Alexa device, for the purposes of continuous testing?

I've used bespoken.io in the past, however my trial has expired so I've started to look at creating my own since I'm able to host the service myself or run it off a CLI locally.

My intention is to run my skill every couple of hours and perform a series of interactions based upon the response returned, this is to make sure the skill is responsive, behaving as expected and if performing in a timely manner, so I'd like to know of any libraries that you are using that can handle sending and receiving interactions and the pros and cons you've had.

Upvotes: 0

Views: 97

Answers (2)

Florian Treml
Florian Treml

Reputation: 1315

As an alternative to bespoken you should have a look at Botium - it provides test automation for chatbots, and it is available for free on Github.

For testing Alexa skills, there are two dedicated Alex/Botium connectors available (all other relevant chatbot technologies like Azure Bot Framework, Dialogflow, IBM Watson and more are also supported and available on Github):

Botium Connector for Alexa SMAPI

This one is using the Alexa Skills Management API for automatically sending text and/or JSON requests to your Alexa Skill and does response assertions. You can use it as well for testing the conversational flow of your Skill. See Github repository for setup and usage instructions.

Botium Connector for Alexa Virtual Device

This connector is using free and Open Source Text-To-Speech and Speech-To-Text server "Botium Speech Processing" to run automated tests against a virtual Alexa device, usually connected to your Alexa skill under Test. See Github repository for setup and usage instructions.

*All of those components are free and Open Source and available on Github, including a command line tool Botium CLI and an extension to use it with Mocha, Jest or Jasmine called Botium Bindings.

Upvotes: 0

Justin Kovac
Justin Kovac

Reputation: 96

While it might not be as turn-key as bespoken, you can leverage the same APIs they use in their framework via the Skill Management API. Specifically, the simulate command could be run either from an instance of the ASK CLI on a virtual machine, or serverless if you are willing to set up a simple service to fetch new access tokens and call the REST API.

Upvotes: 1

Related Questions