Robot Framework library, listener and pre-run modifier for working with TestRail
Project description
RobotFramework Testrail
Short Description
Robot Framework library, listener and pre-run modifier for working with TestRail.
Installation
pip install robotframework-testrail
Documentation
See documentation on GitHub.
Usage
TestRail API Client
Library for working with TestRail.
Example
*** Settings ***
Library TestRailAPIClient host user password run_id
*** Test Cases ***
Case
${project}= Get Project project_id
${section}= Add Section project_id=${project['id'] name=New Section
${case}= Add Case ${section['id']} Title Steps Description Refs type_id priority_id
Update Case ${case['id']} request_fields
TestRail Listener
Fixing of testing results and updating test cases.
Example
-
Create custom field "case_description" with type "text", which corresponds to the Robot Framework's test case documentation.
-
Create Robot test:
*** Test Cases *** Autotest name [Documentation] Autotest documentation [Tags] testrailid=10 defects=BUG-1, BUG-2 references=REF-3, REF-4 Fail Test fail message
-
Run Robot Framework with listener:
pybot --listener TestRailListener.py:testrail_server_name:tester_user_name:tester_user_password:run_id:https:update robot_suite.robot
Test with case_id=10 will be marked as failed in TestRail with message "Test fail message" and defects "BUG-1, BUG-2".
Also title, description and references of this test will be updated in TestRail. Parameter "update" is optional.
TestRail Pre-run Modifier
Pre-run modifier for starting test cases from a certain test run.
Example
-
Create Robot test:
*** Test Cases *** Autotest name 1 [Documentation] Autotest 1 documentation [Tags] testrailid=10 Fail Test fail message Autotest name 2 [Documentation] Autotest 2 documentation [Tags] testrailid=11 Fail Test fail message
-
Run Robot Framework with pre-run modifier:
pybot --prerunmodifier TestRailPreRunModifier:testrail_server_name:tester_user_name:tester_user_password:run_id:http:results_depth robot_suite.robot
Only test cases that are included in the test run run_id will be executed.
-
To execute tests from TestRail test run only with a certain status, for example "failed" and "blocked":
pybot --prerunmodifier TestRailPreRunModifier:testrail_server_name:tester_user_name:tester_user_password:run_ind:http:results_depth:failed:blocked robot_suite.robot
License
Apache License 2.0
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
Built Distribution
Hashes for robotframework-testrail-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b07e88f0d02308c84e8fc540b955fb5b1d4acd6ac9a3489e0068e94d18b6b653 |
|
MD5 | e9575728a46b056ea68a923867c926df |
|
BLAKE2b-256 | 026f5ad48251405480944536f9700835ce87d1f86abfa955a88bb4df003d7038 |
Hashes for robotframework_testrail-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0387e193c76b5a83179ef2d04cb8404ce10b2ba3a3a18d33a5de8cc169410cff |
|
MD5 | e84da16e6d2049be053de7404ba95dc1 |
|
BLAKE2b-256 | 2cd2a3c7bb7ce3f5430f9f7a9d81b7db52effb060f326f0d83a3c329175b53c9 |