Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

SmartThings CLI Functional Tests

Overview

This collection of functional tests depends on a mixture of Pexpect and pytest. pytest is used as a framework to run the entire collection and Pexpect is used to execute the CLI and make assertions on the output.

⚠️ To keep the tests cross-platform friendly, we use Pexpect's PopenSpawn instead of the more heavily documented spawn. See "Pexpect on Windows" for more details on the limitations.

Requirements

  • Python 3.x
  • A built executable named smartthings/smartthings.exe installed on the system PATH environment variable.

Usage

A good way to ensure the modules needed here don't interfere with other python projects you might have (and vice versa) is to use a virtual python environment for running tests. You can do this using the venv module.

  1. cd smartthings-cli/packages/cli/functional-tests
  2. python -m pip install --upgrade pip
  3. pip install -r requirements.txt
  4. pytest