this plugin allows to analyze tests in pytest project, collect test metadata and sync it with testomat.io TCM system
Project description
Testomat.io plugin for pytest
uses Testomat.io API:
Installation
pip install pytest-analyzer
configuration
create pytest.ini
file in your project root directory. Set next parameters:
[pytest]
testomatio_url = https://app.testomat.io ; this one is OPTIONAL
testomatio_project = 70t3da349fte ; project key is mandatory to assing tests to particular project
testomatio_email = example@test.com ; your login in testomat.io
testomatio_password = secure_password ; your password in testimat.io
Usage
Run pytest with analyzer add parameter to analyze your tests, send them to testomat.io and get back test id. Tests will not be executed
pytest --analyzer add
Run pytest with analyzer remove parameter to remove all test ids from your tests. Tests will not be executed
pytest --analyzer remove
Run pytest with analyzer sync parameter to execute tests and send the execution status to testomat.io.
Sync can be executed even without marking tests with ids. If testomat.io failed to match tests by title, it will create new tests for the run
pytest --analyzer sync
Run pytest with analyzer debug parameter to get test data collected in metadata.json file
pytest --analyzer debug
Advanced usage
to configure test environment, you can use additional option:
pytest --analyzer sync --testRunEnv windows11,chrome,1920x1080
Eny environments used in test run. Should be placed in comma separated list, NO SPACES ALLOWED.
Clarifications
- tests can be synced even without
@mark.testomatio('@T96c700e6')
decorator. - test title in testomat.io == test name in pytest
- test suit title in testomat.io == test file name in pytest
Example of test
To make analyzer experience more consistent, it uses standard pytest markers.
Testomat.io test id is a string value that starts with @T
and has 8 symbols after.
from pytest import mark
@mark.testomatio('@T96c700e6')
def test_example():
assert 2 + 2 == 4
Change log
1.1.0 - added artifacts support connector
1.0.9 - first public release
- test analyzer able to sync tests with testomat.io
- test analyzer able to add test ids to tests
- test analyzer able to submit test results to testomat.io
Roadmap
- handle REST API exceptions
- improve logging
Delivery hints
To install locally (for testing purposes)
pip install --upgrade .
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
Hashes for pytest_analyzer-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1deb1f71902f82df010887d5c079458a1edb5714abb5d912c42462b2b46da0f2 |
|
MD5 | dbc63812fbb259f9858796be5abced38 |
|
BLAKE2b-256 | 338dfab6ec0453ed96b9cd9e9516f6d476d5f7a90759220d7c559cf9fbd87fa1 |