Skip to main content

A pytest plugin to report test results to tinybird

Project description

pytest-tinybird

A pytest plugin to report test results to tinybird

Passed Top test passed

Requirements

  • Python >=3.8
  • pytest 3.8 or newer (previous versions might be compatible)

Installation

  $ python setup.py install

Not via pip yet

Usage

You just need a tinybird account and token with append permissions

Set this env variables

  TINYBIRD_URL=<https://api.tinybird.co|https://api.us-east.tinybird.co>   # depends on your region
  TINYBIRD_DATASOURCE=<datasource_name>  # will be created with first results posted
  TINYBIRD_TOKEN=<token_with_append_permissions>

Just run pytest with --report-to-tinybird.

$ pytest tests --report-to-tinybird

CI execution info is filled using some env variables, the ones from GitLab.

CI_COMMIT_SHA
CI_JOB_ID
CI_JOB_NAME
CI_JOB_URL

In case you are not using GitLab you need to set it manually. For instance for GitHub actions you can check current GitHub actions workflow)

You can check the data source schema with this data sample of this repo CI executions.

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-tinybird-0.2.0.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

pytest_tinybird-0.2.0-py3-none-any.whl (5.2 kB view hashes)

Uploaded Python 3

Supported by

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