Skip to main content

Package for creating and managing objects from the TestRail API

Project description

TestRail Data Model

Python package License

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


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)

Uploaded Source

Built Distribution

testrail_data_model-0.1.0-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

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

Hashes for testrail-data-model-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4afb31b1d81120b54fb4437efd8be2fa95ce561949289450ca304621c415ed02
MD5 6093082433fb42e0046243db76639d89
BLAKE2b-256 9accd9dfae6826623944cd54569a7adc62944a2dff52a4846533fc036df14bec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for testrail_data_model-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e94afe4ac5380226b73e09d7c982a918ffc02e7414c9102f3f8553d5a118857e
MD5 2f7fc0ecdb28df264985c0942d8ca3d2
BLAKE2b-256 dc3a468189f6da4c580eea7c54c837c26237df64e86ebaa7f0a86f90a15f8f55

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page