Package for creating and managing objects from the TestRail API
Project description
TestRail Data Model
This package provides an object-oriented representation of TestRail data using Python data classes. This object structure facilitates the development of tools which programmatically interact with a TestRail service.
This wraps the tolstislon/testrail-api project, which in turn wraps the official TestRail API spec.
Example
from testrail_api import TestRailAPI
from testrail_data_model.builder import TestRailAPIObjectBuilder
from testrail_data_model.model import TestRailSection, TestRailCase
# From testrail-api client library
api = TestRailAPI(url="https://testrail-instance.com", email="email@email.org", password="password")
# For building the TestRail dataclass object instances
builder = TestRailAPIObjectBuilder(api_client=api)
# Construct a TestRailSuite object linked to its associated TestRailSection and TestRailCase objects
suite = builder.build_suite(project_id=1, suite_id=1)
# Display the TestRailSuite object structure
for section_id, section in suite.sections.items():
assert isinstance(section, TestRailSection)
print("Section", section_id, section.path)
for case_id, case in section.cases.items():
assert isinstance(case, TestRailCase)
print("Case", case_id, case.title)
# Show the number of API requests made
print(builder.stats)
Authors
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
testrail-data-model-0.1.0.tar.gz
(16.5 kB
view details)
Built Distribution
File details
Details for the file testrail-data-model-0.1.0.tar.gz
.
File metadata
- Download URL: testrail-data-model-0.1.0.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4afb31b1d81120b54fb4437efd8be2fa95ce561949289450ca304621c415ed02 |
|
MD5 | 6093082433fb42e0046243db76639d89 |
|
BLAKE2b-256 | 9accd9dfae6826623944cd54569a7adc62944a2dff52a4846533fc036df14bec |
File details
Details for the file testrail_data_model-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: testrail_data_model-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e94afe4ac5380226b73e09d7c982a918ffc02e7414c9102f3f8553d5a118857e |
|
MD5 | 2f7fc0ecdb28df264985c0942d8ca3d2 |
|
BLAKE2b-256 | dc3a468189f6da4c580eea7c54c837c26237df64e86ebaa7f0a86f90a15f8f55 |