sweIhm-ws2018-19 / skillproject-fr-33

Alexa-Skill: Reisequiz
0 stars 0 forks source link

End-to-End tests #47

Closed Bergmaier closed 5 years ago

Bergmaier commented 5 years ago

Write an end-to-end test suite that reads in complete JSON requests from a directory of examples and compares the output against the expected result.

fft5woosh commented 5 years ago

Ist das für mich ? :-)

Bergmaier commented 5 years ago

QuizStreamHandler got 100% coverage :fireworks:

Bergmaier commented 5 years ago

Note to self: the session.user, context.System and context.device in the input JSON are optional and can be omitted to anonymize the tests.

Bergmaier commented 5 years ago

Die alexa-skills-kit-tester-java-Library sieht wirklich interessant aus, danke @fft5woosh! Sie scheint eher auf Überwachung von laufenden Endpoints ausgelegt zu sein, die YAML-Skripts sind aber genau was ich mir vorgestellt hatte. Und

AlexaRequestStreamHandlerEndpoint: Fires a sequence of requests payloads at your speechlet handler implementation in Java. This only works for skills written in Java and could be used for unit testing.

final AlexaEndpoint endpoint = AlexaRequestStreamHandlerEndpoint.create(MySpeechlet.class).build();

You directly point to the entry class of your skill written in Java that implements the SpeechletRequestStreamHandler. You could also give it an instance in case you'd like to mock you test object.

scheint genau das zu sein was wir brauchen - nur das es leider noch auf Speechlets (ASK 1.0) setzt. Mal sehen wie viel wir davon verwenden könne.