TestRail Api Python Client
Project description
testrail-api-client
testrail-api-client - is a client for provide integration with TestRail
General information about TestRail Api
Requirements
- requests
- pytest
- gherkin-official
- pytest-bdd
Installation
pip install pytest-testrail-api-client
Configuration Starting from version 0.3 you can configure testrail client credentials with 3 way:
Way 1. Directly set credentials in class constructor
from pytest_testrail_api_client.test_rail import TestRail
test_rail = TestRail('your_host', 'your_username', 'your_token')
Way 2. Set credentials in pytest.ini or in test_rail.ini This files must be in root folder project path Add group [pytest] Add variables:
- testrail-email
- testrail-key
- testrail-url
Example pytest.ini or test_rail.ini
[saucelab]
testrail-email = your_email
testrail-key = your_token
testrail-url = your_host
When you add credentials to ini file:
from pytest_testrail_api_client.test_rail import TestRail
test_rail = TestRail()
Way 3. You can set environment variables:
- TESTRAIL_EMAIL
- TESTRAIL_KEY
- TESTRAIL_URL
When you add credentials to environment variables:
from pytest_testrail_api_client.test_rail import TestRail
test_rail = TestRail()
Features in version: 0.3.1
- Access to TestRail Api
- Export feature files to TestRail (use pytest --pytest_testrail_export_test_cases --pytest-testrail-feature-files-relative-path "%RELATIVE_PATH%")
- Export tests results to TestRail (use pytest --pytest-testrail-export-test-results --pytest-testrail-test-plan-id %PLAN_ID% --pytest-testrail-test-configuration-name %CONFIGURATION%)
- Scenarios validation (please, see pytest_testrail_api_client/client_config.py)
- Tags replacing (for example: you have automation status "To Be Automated" and you use tag "to_automate" if feactures you can set it in variable REPLACE_TAGS - it will bind these tags)
- Priority replace: variable PRIORITY_REPLACE
Usage examples
from pytest_testrail_api_client.test_rail import TestRail
test_rail = TestRail()
case = test_rail.cases.get_case(1)
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 pytest-testrail-api-client-0.3.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83b92e78aa080596e85a2699d5e53d3fd7e0735dae5849fec1ceeb1c104581a6 |
|
MD5 | e7003c52e42897bd05bb45b8e4f30468 |
|
BLAKE2b-256 | 84b2ea4949276deae410e007f8d37d7fa302fff2a6cf246f052ed62cd9d346e9 |
Hashes for pytest_testrail_api_client-0.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c34a840ab7312bd0600590eb9723c8264efbb729e23f3ca89f216e312fc726b4 |
|
MD5 | 3b64e7386760153bd74e4c02942c1d1b |
|
BLAKE2b-256 | 873f9b724fe78c00a7c4c7d1005487e4dace32c7b8e75350e8271cb5f2f31987 |