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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
444a8a6c4960f39e6c79eaf3c1db80b7df0c6e8dea481be3d0ded20c13e14f79
|
|
| MD5 |
32ac1da33b5164279ea6a95b0372ce09
|
|
| BLAKE2b-256 |
a75c59ebe7c0a4babb14d39e85182dfa27ad44558575c1e22ce5043d73b8f0ed
|
Provenance
The following attestation bundles were made for pytest_reqcov-0.1.0.tar.gz:
Publisher:
ci-cd.yml on mgfernan/pytest_reqcov
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_reqcov-0.1.0.tar.gz -
Subject digest:
444a8a6c4960f39e6c79eaf3c1db80b7df0c6e8dea481be3d0ded20c13e14f79 - Sigstore transparency entry: 262585271
- Sigstore integration time:
-
Permalink:
mgfernan/pytest_reqcov@1a16ac682c49e9842007503af4f9f6df48c469ef -
Branch / Tag:
refs/tags/0.1.0-rc1 - Owner: https://github.com/mgfernan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@1a16ac682c49e9842007503af4f9f6df48c469ef -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
449d85bd6b94c889c464d12f8afc63df6adce9d074eb18f4a899e95358d1a749
|
|
| MD5 |
ca4f2120c150a1888a3885bd3becd769
|
|
| BLAKE2b-256 |
a1371aa1ea4bf9e42d9dff2b5beb73845bb614d6b61c43cc906f6a5ec9c4a52c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_reqcov-0.1.0-py3-none-any.whl -
Subject digest:
449d85bd6b94c889c464d12f8afc63df6adce9d074eb18f4a899e95358d1a749 - Sigstore transparency entry: 262585279
- Sigstore integration time:
-
Permalink:
mgfernan/pytest_reqcov@1a16ac682c49e9842007503af4f9f6df48c469ef -
Branch / Tag:
refs/tags/0.1.0-rc1 - Owner: https://github.com/mgfernan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@1a16ac682c49e9842007503af4f9f6df48c469ef -
Trigger Event:
release
-
Statement type: