Development Environment Setup with VSCode

The instructions below are for setting up an stb-tester development environment on your Windows PC, but it’s the same process on MacOS or Linux.

Install Python

Download the Python 3.6.8 Windows installer from: . You’ll want the “Windows x86-64 executable installer”. Run it to install.

You can install Python 3.6 alongside any other Python installations you have, they shouldnt interfere with each other.

Install git

Go to and download the installer for the latest release.

Run the installer to install git.

Install VSCode

Download the installer from .

Run the installer to install VSCode

Setup VSCode extensions

Install the Python and Run on Save VSCode extensions. Within VSCode press Ctrl-P and type:

ext install ms-python.python
ext install

Clone Repository

Restart VSCode - otherwise sometimes PATH isn’t set correctly and the git we installed above is not available in the terminal.

Within VSCode click “clone repository” and copy and paste your test-pack repo url from your portal. For example: . You should see a “Connect to GitHub” dialog box appear, which will launch a blank webpage in your browser. Your test-pack will then be cloned to your local machine.

At the “Would you like to open the cloned repository?” dialog select “Open”

Configure VSCode and your venv for stb-tester development

Start a “git bash” terminal and run:

py setup --vscode

This will create a Python venv, install dev dependencies and update your VSCode settings to enable linting, running tests and snapshots.

Test that it’s all working

  1. Try running a test from within VSCode - we should see it running in the portal.

  2. We should see stbt-specific linting in place, so lets introduce an error deliberately.

  3. git snapshot on save should be working, so we can see it in action with the Object Repository.