Skip to main content

Testrail Data: a handy Testrail data analysis tool

Python package PyPI Downloads PyPI - Python Version PyPI - Implementation License

What is it?

This is a wrapper of Testrail Api with pandas DataFrame extended. Especially when you are working on huge data-set, say years of results, this is a handly library.

Installation

pip install testrail-data

Main Features

  • Transform pulled data into DataFrame object, covering:
    • Case
    • Case Fields
    • Case Type
    • Milestone
    • Plan
    • Priority
    • Results
    • Run
    • Sections
    • Suite
    • Statuses
    • Template
    • Test
  • Complete pull with auto-offset capability to walk through all pagination, avalaible to:
    • Run
    • Result
    • Plan
  • Meta data filling option to all IDs in:
    • Case
    • Test
    • Result (not in this version)
  • Retry pulling when ConnectionError occurred in:
    • Results
      • get_results_for_run

Example usage with DataFrame

from testrail_data import TestRailAPI

api = TestRailAPI("https://example.testrail.com/", "example@mail.com", "password")

# if use environment variables
# TESTRAIL_URL=https://example.testrail.com/
# TESTRAIL_EMAIL=example@mail.com
# TESTRAIL_PASSWORD=password
# api = TestRailAPI()

# if you having a big project with more than 250 runs, 
# this method would help you too pull them down in single call.
df_run = api.runs.to_dataframe(project_id=1)
df_run.info()

# Pulling all Run by Plan
df_run = api.runs.dataframe_from_plan(plan_id=3)

Example usage with Meta data

# continue ...
from testrail_data import TestRailAPI

api = TestRailAPI()
df_case = api.cases.to_dataframe(project_id=1, suite_id=2, with_meta=True)
# Additional name-columns created base on 
# section_id, template_id, type_id, priority_id, suite_id
# all custom_columns are replaced with meta data.

Example query all results from multiple runs

from testrail_data import TestRailAPI

api = TestRailAPI()
run_ids = [1,2,3,4]

df_run = api.results.dataframe_from_runs(*run_ids)

Metadata

Release files for testrail-data 0.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for testrail-data 0.0.10
File Size Uploaded Provenance Actions
testrail-data-0.0.10.tar.gz 10.2 kB Without provenance Details for testrail-data-0.0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for testrail-data 0.0.10
File Interpreter ABI Platform Actions
testrail_data-0.0.10-py3-none-any.whl Python 3 none any Details for testrail_data-0.0.10-py3-none-any.whl

Total release size: 19.5 kB

Release files / testrail-data-0.0.10.tar.gz

Download URL testrail-data-0.0.10.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6ba19a90fba05a180cd7981ecd996e5da8113b51414f621f114ce480d6798ab2
BLAKE2b-256 checksum
How to use checksums
7a46840c4c6b8e35aa066fb5b35608f0169864dcfba5fdf2c81d22610b5e2f1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / testrail_data-0.0.10-py3-none-any.whl

Download URL testrail_data-0.0.10-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3a05cd6d93b04cf7a95f824a3e24c54acb53001af65c1bbb49c6fa794854b68
BLAKE2b-256 checksum
How to use checksums
8ad17339616e5154adcd2ed0eda611d6fee809e4523bb11fdcea55d3bd878cfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Security for testrail-data 0.0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page