TestRail API reporter tools
Project description
TestRail reporter
This is Testrail API reporter tools.
This package contains several tools to interact with TestRail via API.
General part is TestRailResultsReporter which is designed to report test results via api. This part is close to trcli, but without nasty bugs.
Firstly, you need to obtain test results in xml format. You can do it via running your testsuite, i.e. using pytest:
pytest --junitxml "junit-report.xml" "./tests"
Also you need to add custom field (string type) to TestRails with name "automation_id".
Now, you ready to upload results to TestRails. To it, use:
url=https://your_tr.testrail.io
email=your@email.com
password=your_password
project_number=42
test_suite_number=66
api=TestRailResultsReporter(url, email, password, project_number, test_suite_number)
# then just call:
api.send_results()
After this new testcases, test run and test results will be created. Testrun will have a name like "AT run 2022-09-01T20:25:51"
If you fill automation_id for existing testcases using correct format (path.to.testfile.filename.test_class.test_step), then in such case results will be added to existing testcases.
Also, you can customize test run by passing:
- title param to send_results function - it will replace whole test run title.
- environment - it will be added to end of string like "AT run 2022-09-01T20:25:51 on Dev"
- timestamp - it will replace timestamp, obtained from XML file)
- close_run - may be True (by default) or False - if True, then eery testrun will be closed.
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 testrail_api_reporter-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4e31d8c731f8a08bdd870d80a78b5a91d8e8d0d746453e1efd880da03aadb34 |
|
MD5 | b635340a57ca8825f74944231085244e |
|
BLAKE2b-256 | 92b324beea1171552a669011d55403bc54d7a5abe1aa5a0f933709881a8f901c |
Hashes for testrail_api_reporter-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc5fb6a944e8fcc1668a1efa6351d36f35a59f6b347b084f71c92a5f21ab53ac |
|
MD5 | 5657dd4098b699197da23032780599df |
|
BLAKE2b-256 | f673df33d3fc2907d7a0bbfff9c205f6f86c6a9e2570e6938260b1f7900ecb3c |