Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/TomerFi/alexa-skills-tester

No hassle testing tools for Java Alexa Skills
https://github.com/TomerFi/alexa-skills-tester

alexa bdd dsl fluent hacktoberfest testing-tools

Last synced: 3 months ago
JSON representation

No hassle testing tools for Java Alexa Skills

Awesome Lists containing this project

README

        

# Alexa Skills Tester is Archived

OLD README


Testing tools for Java Alexa skills



Want to test your Alexa skills with real requests?


No deploying, hosting, or configuring the skill interface is required!

All you need is your Java skill and this tool.


```mermaid
graph
givenSkill -- load the skill code --> whenRequestIs
whenRequestIs -- load a json request --> thenResponseShould
thenResponseShould -- use assertion methods to verify the response --> thenResponseShould
thenResponseShould -. use for multi-step interactions .-> followingUpWith
followingUpWith -- load a followup json request --> thenResponseShould
```






Wiki




Javadoc




Blog




Alexa Ref.






Example
integration test




Example
shabbat times skill









Dependency Declaration

```xml

info.tomfi.alexa
alexa-skills-tester
0.2.15
test

```

Usage Example

```java
givenSkill(myCustomSkill) // load your custom skill
.whenRequestIs(launchRequestJson) // load a request, takes json or envelopes
.thenResponseShould() // send the request to the skill and verify the response
.waitForFollowup() // verify the session is open, the skill is waiting for a followup
.haveOutputSpeechOf("What is your name?") // verify the response speech output
.haveRepromptSpeechOf("Please tell me your name.") // verify the response reprompt speech
.followingUpWith(myNameIntentJson) // load a followup request
.thenResponseShould() // send the request to the skill and verify the response
.haveOutputSpeechOf("Nice to meet you omer!") // verify the response speech output
.and() // just a sugar method for readability
.notWaitForFollowup(); // verify the session is closed, the skill not waiting for a followup
```

> You can add as many `followingUpWith(x).thenResponseShould()` as you need.

Disclaimer


This repository and/or the tool deployed with its sources has no direct relation with Amazon.

This an open-source tool based on the documentation for Alexa developers.