Git Product home page Git Product logo

testing_board's Introduction

testing_board

This is a silly implementation of a leader-board for pytest.

The idea is that a small webserver will accept test reports and make them available through HTTP endpoints. Testers can use a pytest plugin to send their test results to this server. An Elm web page will poll the server for results and show a graph. The point is that you could us this in e.g. a workshop on TDD where students start with a failing test suite and progressively pass more tests; the chart will show this progress.

Server and pytest plugin

To install the server and/or pytest plugin, use:

python setup.py install

You can then run the server with:

python -m testing_board.server

To use the pytest plugin, you'll need to pass some command-line arguments to pytest. At a minimum you need to provide a user name:

python -m pytest --testing_board:user=<your name> . . .

The score tracker keeps track of result on a per-name basis, so users should use the same name consistently. You can also specify a game ID (defaults to 0) as well as a host and port of the server with:

--testing_board:host
--testing_board:port
--testing_board:game

Elm client

Ultimately there are many ways to deploy the Elm client, but a simple way is using a developmnent server through node foreman. First, you need to be in the elm/monitor directory. Then install the node dependencies:

npm install

Then you need to create a .env file. Generally do this by copying dot.env to .env and editing it as necessary.

Once this is done, you can optionally test that everything builds:

npm run build

To run things from a dev server, use:

nf start

This will serve the app on port 3000. It will also monitor changes to the source and recompile it as needed.

(Note: if you don't have the nf command you probably need to install node foreman with npm install -g foreman)

The Elm client will poll the server for scores.

testing_board's People

Contributors

abingham avatar

Watchers

 avatar James Cloos avatar

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.