Skip to main content

A pytest plugin for requirement coverage tracking

Project description

pytest-reqcov

A pytest plugin for requirement coverage tracking.

Features

  • Track test coverage against requirements and products
  • Integrate with pytest workflow

Installation

Install from PyPI:

pip install pytest-reqcov

Usage

Add requirement markers to your tests:

import pytest

@pytest.mark.req(id="REQ-001")
def test_user_login():
    """Test user login functionality."""
    assert login_user("user", "password") == True

@pytest.mark.product(id="ProductA")
def test_user_logout():
    """Test user logout functionality."""
    assert logout_user() == True

Run pytest with requirement coverage:

pytest --reqcov-reqs=requirements.csv --reqcov-prods=products.csv  --reqcov-output=output.csv

Configuration

Add configuration to your pytest.ini or pyproject.toml:

[tool.pytest.ini_options]
markers = [
    "req: tests with associated requirements",
    "product: tests with associated product",
]

License

This project is licensed under the MIT License - see the LICENSE file for details.

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_reqcov-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

pytest_reqcov-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file pytest_reqcov-0.1.0.tar.gz.

File metadata

  • Download URL: pytest_reqcov-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pytest_reqcov-0.1.0.tar.gz
Algorithm Hash digest
SHA256 444a8a6c4960f39e6c79eaf3c1db80b7df0c6e8dea481be3d0ded20c13e14f79
MD5 32ac1da33b5164279ea6a95b0372ce09
BLAKE2b-256 a75c59ebe7c0a4babb14d39e85182dfa27ad44558575c1e22ce5043d73b8f0ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_reqcov-0.1.0.tar.gz:

Publisher: ci-cd.yml on mgfernan/pytest_reqcov

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytest_reqcov-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pytest_reqcov-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for pytest_reqcov-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 449d85bd6b94c889c464d12f8afc63df6adce9d074eb18f4a899e95358d1a749
MD5 ca4f2120c150a1888a3885bd3becd769
BLAKE2b-256 a1371aa1ea4bf9e42d9dff2b5beb73845bb614d6b61c43cc906f6a5ec9c4a52c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_reqcov-0.1.0-py3-none-any.whl:

Publisher: ci-cd.yml on mgfernan/pytest_reqcov

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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