A robot framework library to integrate robot tests with Testrail
Project description
robotframework-testrail-library
This is a robot framework library to be used with Testrail API.
The library requires a Testrail username and API key, which needs to be created in testrail. The credentials are passed to the library with the connect to testrail
keyword. So library can be imported without credentials, and it will connect only when a keyword is called.
Some keywords are trying to find a suite/run... by name, and they assume the name is unique, given some conditions. For example it is assumed that in same project there is only one run with a specific name. This can be overriden by providing a special attribute for the class. Some adding keywords have logic to find a particular run or suite by either id or name, and if name is used and there are duplicates, then either exception is raised (default) or empty dictionary is returned (in case expected duplicates is True), since we cannot be sure which object we are adding stuff.
Deleting keywords are currently not supported, for safety reasons, as accidentally deleted wrong objects, may delete hundreds of other related objects, so it is preferrable to delete things manually in Testrail.
Installation:
pip install robotframework-testrail-library-nerajarolle
Example Usage:
*** Settings ***
Library TestrailLibrary
Suite Setup connect to testrail ${SERVER}
... ${TESTRAIL_USERNAME} ${TESTRAIL_KEY}
*** Test Cases ***
Test Get Project
[Tags] project id
${project} Get Project 1
IF ${project}
Log To Console ${project}
ELSE
Log To Console Project id 1 Not found
END
Test Get Project by Name
[Tags] project name
${project} Get Project by Name TA Test Project
IF ${project}
Log To Console ${project}
ELSE
Log To Console TA Test Project Not found
END
Test Update Run Status
[Tags] update_status
${params} Create Dictionary project_id=${PROJECT_ID} run_name=Run number 1
... suite_name=${SUITE_NAME} test_name=${TEST_NAME} section_name=${SUITE_NAME}
... elapsed=20s comment=a comment
${response} set status on test run status_id=1 &{params}
IF ${response}
log To Console ${response}
ELSE
log to console Failed to update run ${response}
END
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
File details
Details for the file robotframework-testrail-library-nerajarolle-0.0.8.tar.gz
.
File metadata
- Download URL: robotframework-testrail-library-nerajarolle-0.0.8.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91117416f19de4a10cd79cbe9d1bc8c68fb51bfbce7cb974a8446e7e5dc88e79 |
|
MD5 | 56bee4c4d7cebd528833af7166a2a185 |
|
BLAKE2b-256 | 32744bc5ad8e7d74e6956a19fbfaf3bf0286d044aec5e60efcbe734233b6ed80 |
File details
Details for the file robotframework_testrail_library_nerajarolle-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: robotframework_testrail_library_nerajarolle-0.0.8-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a30394fc75e2b15928c24057db505821e13d1240b037456518142da951059bc |
|
MD5 | fd1ccaac9793031f0fa7ccea17a42d34 |
|
BLAKE2b-256 | 0e951fe32fd4306b543e1c3769f19b074818106bbab60289a3be9c1bbea73fd5 |