Skip to main content
robotframework-testrail-reporter

robotframework-testrail-reporter

robotframework-testrail-reporter is a Python library used to publish robotframework test executions to TestRail. It parses the output.xml file and search tests tagged with a specific testcase id, then it retrieves testcases run id from TestRailtest suite run id.

Installation

robotframework-testrail-reporter requires python3+, lxml, and testrail installed and to run. (and robotframework to execute tests)

$ pip3 install robotframework-testrail-reporter
$ rf-tr-reporter -f output.xml -t test-case-id -u https://xxx.testrail.io/ -e my@email.com -k pwd_or_apikey -r runid

Methods

Method Arguments README
find_tests_tagged_by path, tag This method parses the output xml generated by robotframework defined by path and finds all test nodes with starting tag tag.
Returns a list of dictionaries with following keys: ['rf_test_name', 'test_id , 'status_id, 'comment', 'elapsed'] rf_test_name is the robotframework test name
test_id is the numeric value contained in tag
status_id is the conversion of test status to testrail standards
comment is the test status message
elapsed is the test execution time in s, (min 1 second)
Args:
path is the path of robotframework xml output file
tag is the tag to be found in robotframework tests, it must contain a numeric part which specifies testcase run id, example: test_case_id=123
get_comment status This method returns the test execution status message which is the text attribute of test status node in output xml, if no text is found it retuns an empty string. Comment maximum length is defined by comment_size_limit variable.
Args:
status is the status node found via xpath selector with lxml
get_elapsed status This method calculates the elapsed test execution time which is endtime - starttime in test status node of output XML. Returns a string of test execution seconds. Example: '5s'
Args:
status is the status node found via xpath selector with lxml
publish_results api, run_id, results This method publishes robotframework results to a testrail run
Args:
api is an instance of testrail.client.API already logged in
run_id is the id of the run to update
results is a list of dictionaries that contains test results
replace_caseid_with_testid api, results, run_id This method parses all results generated by find_tests_tagged_by method and replace all testcases ids with specific testruns ids in test_id key of each result
Args:
api is an instance of testrail.client.API already logged in
results is a list of dictionaries that contains test results
run_id is the id of the run to update

Release files for robotframework-testrail-reporter 0.0.17

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

Source distribution (sdist)

Source distribution for robotframework-testrail-reporter 0.0.17
File Size Uploaded
robotframework-testrail-reporter-0.0.17.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-testrail-reporter 0.0.17
File Interpreter ABI Platform
robotframework_testrail_reporter-0.0.17-py2-none-any.whl Python 2 none any Details

Total release size: 12.6 kB

Release files / robotframework-testrail-reporter-0.0.17.tar.gz

Download URL robotframework-testrail-reporter-0.0.17.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6775dd6cdd7f6f38f65333b39af776c54e5f6e14142a3af960d70388d8674eea
BLAKE2b-256 checksum
How to use checksums
344d8c8b5fe798fd644b24e78d75521519785cc8473cd5b17f1293ca8653e71f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Release files / robotframework_testrail_reporter-0.0.17-py2-none-any.whl

Download URL robotframework_testrail_reporter-0.0.17-py2-none-any.whl
Size 6.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
3124cee18e4dab8207ee05fac80d292388802581aa13564f7b9e0a2fa2e17287
BLAKE2b-256 checksum
How to use checksums
fb59b108f612820378cce415516822f0b4f0317b63d5bf37ca2623e4c540cb5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.0.17 This release

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

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