Skip to main content

A pytest plugin to send test statistics to Test Radar.

Project description

pytest-test-radar

pytest-test-radar is a pytest plugin designed to send test execution statistics to a centralized server. This allows teams to monitor flaky tests, track performance, and identify redundant or overly stable tests that might not be adding value to the test suite.

Features

  • Collects test execution statistics, including:
    • Test name
    • Outcome (passed, failed, skipped)
    • Execution duration
  • Sends data to a configured HTTP endpoint.
  • Easy integration with any centralized monitoring system.

Installation

You can install it to your project dependencies:

pip install pytest-test-radar

Usage

Run pytest with the --test-radar-endpoint option to specify the server where statistics will be sent:

pytest --test-radar-endpoint="http://your-server.com/api/test-results"

Example

Create a sample test file:

# test_sample.py
def test_pass():
    assert 1 == 1

def test_fail():
    assert 1 == 2

Run the tests with the plugin:

pytest test_sample.py --test-radar-endpoint="http://localhost:8000/api/test-results"

This will send the following payload to the specified endpoint:

{
  "total_tests": 2,
  "results": [
    {
      "test_name": "test_sample.py::test_pass",
      "outcome": "passed",
      "duration": 0.001
    },
    {
      "test_name": "test_sample.py::test_fail",
      "outcome": "failed",
      "duration": 0.002
    }
  ]
}

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_test_radar-0.0.1a1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_test_radar-0.0.1a1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest_test_radar-0.0.1a1.tar.gz.

File metadata

  • Download URL: pytest_test_radar-0.0.1a1.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.6 Darwin/24.3.0

File hashes

Hashes for pytest_test_radar-0.0.1a1.tar.gz
Algorithm Hash digest
SHA256 8e5bbf1424e57dc0d8397feb9ae1d11a5ccdfbeca5e7afc3dfb09a03af1aab4c
MD5 3cbc4985ad1d46c8a5d10d9631d1481b
BLAKE2b-256 5592fc489fad624c852d407d080615317f72f0c1c0f83d2471b4a2a211e6106b

See more details on using hashes here.

File details

Details for the file pytest_test_radar-0.0.1a1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_test_radar-0.0.1a1-py3-none-any.whl
Algorithm Hash digest
SHA256 f601038108e34faa69ddb42bc90dbebdfb8bad01e21aa0ff062bdc79fea72a98
MD5 155152e2239de0baa1884620b7b654aa
BLAKE2b-256 7eabf18e7034d084acf7faefa7ab75d5a5cac042c48fd69658afa60d5f5710a9

See more details on using hashes here.

Supported by

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