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
Release files for robotframework-testrail-library-nerajarolle 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robotframework-testrail-library-nerajarolle-0.0.8.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robotframework_testrail_library_nerajarolle-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.0 kB
Release files / robotframework-testrail-library-nerajarolle-0.0.8.tar.gz
| Download URL | robotframework-testrail-library-nerajarolle-0.0.8.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91117416f19de4a10cd79cbe9d1bc8c68fb51bfbce7cb974a8446e7e5dc88e79
|
|
BLAKE2b-256 checksum How to use checksums |
32744bc5ad8e7d74e6956a19fbfaf3bf0286d044aec5e60efcbe734233b6ed80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / robotframework_testrail_library_nerajarolle-0.0.8-py3-none-any.whl
| Download URL | robotframework_testrail_library_nerajarolle-0.0.8-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a30394fc75e2b15928c24057db505821e13d1240b037456518142da951059bc
|
|
BLAKE2b-256 checksum How to use checksums |
0e951fe32fd4306b543e1c3769f19b074818106bbab60289a3be9c1bbea73fd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|