Project Structure#

The Ibutsu project is divided into 3 main components:

  • API client

  • pytest plugin

  • Server

API Client#

The API client is an autogenerated codebase, which uses the OpenAPI Generator to generate the client from the API.

To regenerate the client, run the regeneration script in the root of the repository:

./ --commit --push --delete path/to/openapi.yaml

To understand what the options do, just use the --help option:

./ --help
Usage: [-h|--help] [-c|--commit] [-p|--push] [-d|--delete] OPENAPI_FILE

optional arguments:
  -h, --help       show this help message
  -c, --commit     create a new branch and commit all the changes
  -p, --push       push the branch up to origin after commit
  -d, --delete     delete the branch after pushing

pytest Plugin#

The pytest plugin simply uses the API client to send test results from a pytest run to an Ibutsu server. The plugin can be installed from PyPI via pip:

pip install pytest-ibutsu

Of course if you want to develop this, you’re not going to want to install it from PyPI, so let’s rather do an editable installation:

pip install -e .


The server is further divided into two separate apps:

  • Frontend

  • Backend


The frontend for the server is written in ES6 and React, and uses Yarn to manage dependencies.


The backend of the server is made up of 5 parts:

  • The API itself, written in Python/Flask/Connexion

  • The task worker, which runs async tasks, written with Celery

  • The task monitor, which keeps tabs on task failures

  • A MongoDB instance, which is the database

  • A Redis instance, which is used by the task worker