Python wrapper of the TestRail API
Project description
testrail-api
This is a Python wrapper of the TestRail API(v2) according to the official document
Install
pip install testrail-api
Example
from datetime import datetime
from pathlib import Path
from testrail_api import TestRailAPI
api = TestRailAPI('https://example.testrail.com/', 'example@mail.com', 'password')
new_milestone = api.milestones.add_milestone(1, 'New milestone', start_on=int(datetime.now().timestamp()))
my_test_run = api.runs.add_run(1, suite_id=2, name='My test run', include_all=True, milestone_id=new_milestone['id'])
result = api.results.add_result_for_case(my_test_run['id'], 5, status_id=1, comment='Pass', version='1')
attach = Path('.', 'attach.jpg')
api.attachments.add_attachment_to_result(result[0]['id'], attach)
api.runs.close_run(my_test_run['id'])
api.milestones.update_milestone(new_milestone['id'], is_completed=True)
Last test
Python: 3.7.4
TestRail: 6.0.2.4165
testrail-api: 1.3.5
Coverage:
Name Stmts Miss Cover
---------------------------------------------------
testrail_api\__init__.py 5 0 100%
testrail_api\__version__.py 6 0 100%
testrail_api\_category.py 178 0 100%
testrail_api\_enums.py 6 0 100%
testrail_api\_session.py 69 0 100%
testrail_api\_testrail_api.py 57 0 100%
---------------------------------------------------
TOTAL 321 0 100%
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for testrail_api-1.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01e9ea3fa9ba835fff9d10830c8fe7229987742e50effd2022fbcba56efa8f3d |
|
MD5 | cdb000630e503fa13e8615e7847e906f |
|
BLAKE2b-256 | c7684310bc3d95e055344165a154fd3261cff723752ea8dad83d37357c73a2b0 |