Skip to content

Ryaningli/pytest-allure-id2history

Repository files navigation

pytest-allure-id2history

PyPI version Python versions See Build Status on GitHub Actions

Overwrite allure history id with testcase full name and testcase id if testcase has id, exclude parameters.


When the library is not installed,the historyId of the test cases generated by Allure is based on dynamic parameters within the test case, and each execution is not considered the same test case. After installing the library, when a test case id is configured, even with dynamic parameters, it will be recognized as the same test case.

Installation

You can install "pytest-allure-id2history" via pip from PyPI:

$ pip install pytest-allure-id2history

Usage

import random
import pytest


@pytest.mark.parametrize('arg', [
    random.randint(0, 9999)
], ids=['some-id'])
def test_foo(arg):
    print(f'Testing foo with {arg}')

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the MIT license, "pytest-allure-id2history" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages