Skip to main content

An interactive GUI test runner for PyTest

Project description

PyTest Commander

Code style: black

A UI for controlling PyTest interactively. With it, you can explore your test hierarchy (test packages/modules/classes/methods etc.), run tests at the click of a button and see the results presented in your web browser.

Screenshot

Features

  • Run tests by group (module, class etc.) or individually.
  • Clear pass/fail labelling so you can dig down and find what failed quickly, instead of having to scroll up through many screens of terminal output.
  • Test files and dependencies are reloaded every time so you can run, tweak your code, then run again in a fast iteration cycle.
  • Runs on any modern OS and browser (tested on Win10, macOS and Ubuntu with Chrome, Firefox and Safari). IE is not supported.
  • Automatically start and stop docker services while running if specified in a docker-compose.yml file in the root test directory.
  • Tests are run in separate processes and reloaded for each invocation, allowing tests to be tweaked and re-run without restarting the main process.

Prerequisites

  • Requires Python3.6+ and pip.

Quickstart

Install and get started running your own PyTest tests:

pip install pytest-commander
pytest_commander /path/to/your/tests

I recommend installing into an activated virtual environment. You will want to make sure that all additional dependencies required to run your tests are installed into the same virtual environment.

When you run with default options, the web app to browse and run tests should be opened automatically in your default browser. To view full docs for the command-line parameters, run pytest_commander --help.

Build from source

Alternatively you may build from source. In addition to the prerequisites above, you must ensure you have installed pipenv and npm.

git clone https://github.com/ryanc414/pytest_commander.git
cd pytest_commander
python build.py
python test.py

You may then install the local directory into an activated virual environment, along with other dependencies installed to run your tests:

pip install .
pytest_commander /path/to/your/tests

Renaming

Previously this project was called "pytest_web_ui". I felt that this name gave too much emphasis to the implementation detail of the UI being a web app, when it could easily have been implemented in some other way (e.g. as an electron app) and still serve the same purpose. I chose the name "pytest_commander" to reflect the true purpose of this project: giving a friendly and intuitive interface for developers to take command of their tests.

Happy testing!

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

pytest_commander-2.2.1.tar.gz (979.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_commander-2.2.1-py3-none-any.whl (989.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest_commander-2.2.1.tar.gz.

File metadata

  • Download URL: pytest_commander-2.2.1.tar.gz
  • Upload date:
  • Size: 979.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for pytest_commander-2.2.1.tar.gz
Algorithm Hash digest
SHA256 00153b0eca507b04dd42188b9efe9c2e58c1918b34fec742e57659197e588fcd
MD5 7df2b8a31030152bb3e504c9360bb451
BLAKE2b-256 f7fafaa06145f337f8f779ba79aee1812f718856ff669b0703e7d85b03d2f34c

See more details on using hashes here.

File details

Details for the file pytest_commander-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: pytest_commander-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 989.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for pytest_commander-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b66f223a1ccbd3890c31e52824dd7f353d3d66cea10e87f98b15d2e87ebfe203
MD5 37a00324219f76202f9001838e9d19c8
BLAKE2b-256 cd55cb7deed21db5b5e0956129a5f34da1f28de01f25ecd8b23477d861dbc717

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page