JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q24572F
  • License MIT

Test Alexa skills through a local server.

Package Exports

  • alexa-skill-test

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (alexa-skill-test) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Alexa Skill Test

Alexa Skill Test provides a live server for local testing of Alexa Skills written in Node.js. Right now, testing skills usually involves going through the Amazon Alexa Developer Portal. This project makes testing much easier.

Requirements

  • Node/npm
  • An Amazon Alexa Skill written in Node.js

Install

It's recommended to install Alexa Skill Test as a global npm package:

npm install -g alexa-skill-test

After install, the alexa-skill-test command will be available to you.

Command

Alexa Skill Test works off one command:

alexa-skill-test [--path] [--interaction-model]

--path let's you optionally specify a relative path to your skill. --interaction-model let's you optionally specify a relative path to your interaction model.

Usage

Within your terminal, change directory to your valid Amazon skill. Your skill will need a package.json and a main script file. Run the following command:

alexa-skill-test

This starts up a local testing server using your Alexa skill. If you specify a relative path to an interaction model using --interaction-model, the app will prefill your skill intents for you.

In your browser, navigate to http://localhost:3000. You should see a simple UI for sending test requests to your skill.

Note:

In the skill(s) you're testing, you should set your appId like so:

if ('undefined' === typeof process.env.DEBUG) {
  alexa.appId = '...';
}

Setting an appId while debugging will cause Lambda to throw an error since there will be a mismatch. Alexa Skill Test will automatically set the DEBUG environmental variable.

License

MIT