GithubHelp home page GithubHelp logo

itworks99 / pytest_commander Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ryanc414/pytest_commander

0.0 1.0 0.0 3.44 MB

Interactive web UI for PyTest

License: MIT License

Python 76.02% HTML 1.66% CSS 0.38% TypeScript 21.95%

pytest_commander's Introduction

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.