Skip to main content

A framework for testing Alexa Skills developed in Python with the alexa-skills-kit-sdk-for-python.

Project description


This is a framework for testing Alexa Skills developed in Python with the alexa-skills-kit-sdk-for-python, which is mostly a translation of taimos' Alexa Skill Test Framework in Typescript, which itself is based on the alexa-skill-test-framework by Brian MacIntosh.

The framework uses assert to check the expected behaviour. So the best way to go is using it with pytest.

The ask-sdk version it is based on is ask-sdk-core=1.10, ask-sdk-runtime=1.10 and ask-sdk-model=1.11.


You can install the framework via pip:

pip install py_ask_sdk_test


You can see an example for using the framework in the following and in the framework's test-files:

from py_ask_sdk_test.alexa_test import AlexaTest
from py_ask_sdk_test.classes import TestItem, SkillSettings, SupportedInterfaces
from request_builders.launch_request_builder import LaunchRequestBuilder
from request_builders.intent_request_builder import IntentRequestBuilder
from pseudo_handler import handler

skill_settings = SkillSettings(app_id="<Your skill's id>",
                               user_id="<Your user id>",
                               device_id="<Your device id>",
                               locale="<The locale of your skill>",
                               interfaces=SupportedInterfaces())  # interfaces your skill supports (audio, video etc.)

def test_launch_request():
    alexa_test = AlexaTest(handler)
                expected_speech="Salve, gaudeo te videre!",
                expected_repromt="Vin aliquid dicere?",
                IntentRequestBuilder("DeiIntent", skill_settings).build(),
                expected_speech=(r"Jupiter.+", True),

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_ask_sdk_test-0.2.tar.gz (10.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page