Skip to main content

A plugin to sent pytest results to an Ibutsu server

Project description

This is a plugin that will report test rests from pytest to an Ibutsu server.

Requirements

  • Python 3.8+

  • pytest

  • attrs

Installation

Install the plugin via pip:

pip install pytest-ibutsu

If you’re developing this plugin, you can create an editable installation:

pip install -e .

Getting started

To push your results to the Ibutsu server, use the --ibutsu option with the URL to your server:

pytest --ibutsu http://ibutsu/

Authentication

To authenticate against your Ibutsu server, use the --ibutsu-token option with a token from your Ibutsu server. Go to your profile page, select tokens, and generate a token there. Copy and paste the JWT token generated into this option:

pytest --ibutsu http://ibutsu/ --ibutsu-token eyJhbGci.......CA1opEQ

More options

To set the source for the test results, use the --ibutsu-source option:

pytest --ibutsu http://ibutsu/ --ibutsu-source my-test-run

If you want to add metadata to each result’s metadata, you can use the --ibutsu-data option:

pytest --ibutsu http://ibutsu/ --ibutsu-data key=value

You can specify multiple metadata items like:

pytest --ibutsu http://ibutsu/ --ibutsu-data key1=value1 key2=value2

You can also specify sub-keys via dotted notation:

pytest --ibutsu http://ibutsu/ --ibutsu-data key.subkey.susbsub=value

If you need to accumulate data from multiple pytest sessions, you should provide the same UUID into ibutsu-run-id option:

pytest --ibutsu-run-id=<UUID string>

pytest --ibutsu-run-id=<the same UUID string>

The archive will be rebuilt and the data on the Ibutsu server will be updated.

Set project

If your Ibutsu server requires a project set, you can do that with the --ibutsu-project option:

pytest --ibutsu http://ibutsu/ --ibutsu-project 5eb1aff37c274bcd20002476

You can also use the project name field:

pytest --ibutsu http://ibutsu/ --ibutsu-project my-project

Offline usage

If you want to still store your results, but can’t upload immediately, the Ibutsu plugin can create an archive which you can upload later. Use archive with the --ibutsu option:

pytest --ibutsu archive

The Ibutsu plugin will save the archive in your current directory, and will print out the location.

Usage

With this plugin installed, and the configuration set up, your test results will automatically be sent to the Ibutsu server.

Hooks

The plugin has its own hooks. They are defined in newhooks.py.

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_ibutsu-2.3.1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

pytest_ibutsu-2.3.1-py2.py3-none-any.whl (15.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytest_ibutsu-2.3.1.tar.gz.

File metadata

  • Download URL: pytest_ibutsu-2.3.1.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pytest_ibutsu-2.3.1.tar.gz
Algorithm Hash digest
SHA256 35be1f3a812fb7ac5cf50e7a52c66503fb01dabcce634ca37c7c3491b5c9ac01
MD5 caff943e89045a2275ec3a7300b75ae0
BLAKE2b-256 54af96a9a5dd78e22dd9506b5dbe9eb71279e2f8635ca29599a9f3bae77d4770

See more details on using hashes here.

File details

Details for the file pytest_ibutsu-2.3.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_ibutsu-2.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 484663b3d7dbbeae12e2d2ebe16b7467eda4ff6578581ae6508f35a482bc12c1
MD5 f8d5b3cdd0667cd3fbbfee9f547746e8
BLAKE2b-256 78aae33a6f2b92b5bb3bd15141c671ab82d2983dd4c07f6f8414d0993cf470d4

See more details on using hashes here.

Supported by

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