https://github.com/tlovett1/alexa-skill-test
Test Alexa skills through a local Express server.
https://github.com/tlovett1/alexa-skill-test
alexa alexa-sdk alexa-skills-kit nodejs
Last synced: 11 days ago
JSON representation
Test Alexa skills through a local Express server.
- Host: GitHub
- URL: https://github.com/tlovett1/alexa-skill-test
- Owner: tlovett1
- Created: 2017-02-28T02:48:34.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-12T14:11:28.000Z (about 7 years ago)
- Last Synced: 2025-03-29T16:34:04.218Z (about 1 month ago)
- Topics: alexa, alexa-sdk, alexa-skills-kit, nodejs
- Language: JavaScript
- Homepage:
- Size: 139 KB
- Stars: 43
- Watchers: 4
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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](https://developer.amazon.com/alexa). This project makes testing much easier.
## Requirements
* Node/npm
* An Amazon Alexa Skill written in Node.js
## InstallIt'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:
```js
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