Mycroft AI
  • Documentation
  • About Mycroft AI
    • Why use Mycroft AI?
    • Glossary of terms
    • Contributing
    • FAQ
  • Using Mycroft AI
    • Get Mycroft
      • Mark II
        • Mark II Dev Kit
      • Mark 1
      • Picroft
      • Linux
      • Mac OS and Windows with VirtualBox
      • Docker
      • Android
    • Pairing Your Device
    • Basic Commands
    • Installing New Skills
    • Customizations
      • Configuration Manager
      • mycroft.conf
      • Languages
        • Français (French)
        • Deutsch (German)
      • Using a Custom Wake Word
      • Speech-To-Text
      • Text-To-Speech
    • Troubleshooting
      • General Troubleshooting
      • Audio Troubleshooting
      • Wake Word Troubleshooting
      • Log Files
      • Support Skill
      • Getting more support
  • Skill Development
    • Voice User Interface Design Guidelines
      • What can a Skill do?
      • Design Process
      • Voice Assistant Personas
      • Interactions
        • Intents
        • Statements and Prompts
        • Confirmations
      • Conversations
      • Error Handling
      • Example Interaction Script
      • Prototyping
      • Design to Development
    • Development Setup
      • Python Resources
      • Your First Skill
    • Skill Structure
      • Lifecycle Methods
      • Logging
      • Skill Settings
      • Dependencies
        • Manifest.yml
        • Requirements files
      • Filesystem access
      • Skill API
    • Integration Tests
      • Test Steps
      • Scenario Outlines
      • Test Runner
      • Reviewing the Report
      • Adding Custom Steps
      • Old Test System
    • User interaction
      • Intents
        • Padatious Intents
        • Adapt Intents
      • Statements
      • Prompts
      • Parsing Utterances
      • Confirmations
      • Conversational Context
      • Converse
    • Displaying information
      • GUI Framework
      • Show Simple Content
      • Mycroft-GUI on a PC
      • Mark 1 Display
    • Advanced Skill Types
      • Fallback Skill
      • Common Play Framework
      • Common Query Framework
      • Common IoT Framework
    • Mycroft Skills Manager
      • Troubleshooting
    • Marketplace Submission
      • Skills Acceptance Process
        • Information Review Template
        • Code Review Template
        • Functional Review Template
        • Combined Template
      • Skill README.md
    • FAQ
  • Mycroft Technologies
    • Technology Overview
    • Roadmap
    • Mycroft Core
      • MessageBus
      • Message Types
      • Services
        • Enclosure
        • Voice Service
        • Audio Service
        • Skills Service
      • Plugins
        • Audioservice Plugins
        • STT Plugins
        • TTS Plugins
        • Wake Word Plugins
      • Testing
      • Legacy Repo
    • Adapt
      • Adapt Examples
      • Adapt Tutorial
    • Lingua Franca
    • Mimic TTS
      • Mimic 3
      • Mimic 2
      • Mimic 1
      • Mimic Recording Studio
    • Mycroft GUI
      • Remote STT and TTS
    • Mycroft Skills Kit
    • Mycroft Skills Manager
    • Padatious
    • Precise
    • Platforms
Powered by GitBook
On this page
  • Unit Tests
  • Test runner
  • Integration Tests

Was this helpful?

  1. Mycroft Technologies
  2. Mycroft Core

Testing

An overview of the test frameworks used by mycroft-core.

PreviousWake Word PluginsNextLegacy Repo

Last updated 4 years ago

Was this helpful?

Unit Tests

Mycroft-core unit tests are located in mycroft-core/test/unittests

These are created using the package from the Python standard library.

Test runner

A helper command is provided in mycroft-core/bin to enable quick and simple access to the test runner. It is assumed that this directory is on your $PATH .

If that is not the case, prepend all mycroft-* commands with the path to your mycroft-core/bin directory or run the tests manually.

Execute all tests

To execute all tests run:

mycroft-start unittest

Execute single test

To execute a single test file run:

mycroft-start singlueunittest path/to/test/file.py

The second argument points to the test file you wish to execute. Note that this is relative to your mycroft-core installation.

If I was working on the audio utilities, I might run:

mycroft-start singlueunittest test/unittests/audio/test_utils.py

Manually run tests

The mycroft-start helper commands are a convenience wrapper. They activate the Python virtual environment and run pytest.

The equivalent commands to run all tests would be:

cd ~/mycroft-core
source .venv/bin/activate
pytest

Integration Tests

The Mycroft integration test suite is called Voight Kampff. Currently this does explicitly cover mycroft-core, however Skills are tested, which indirectly tests a range of Mycroft's technologies.

For more detail on Voight Kampff see:

unittest
Integration Tests