pytest-testrail-client is a plugin for pytest that provides integration of pytest and pytest-bdd with TestRail
It provides capabilities of exporting Test Cases and Test Results to TestRail
Requirements
Following prerequisites are needed in order to use pytest-testrail-client:
cucumber-tag-expressions >= 2.0.0
gherkin-official >= 4.1.0
pytest >= 4.2
pytest-bdd >= 3.3.0
requests
Installation
To install pytest-testrail-client:
pip install pytest-testrail-client
Features and Usage
TestRail Configuration
pytest-testrail-client configuration data can be provided in three different ways:
- By using Environment Variables:
TESTRAIL_URL=[URL of TestRail instance] TESTRAIL_EMAIL= [email [of user to be used for communication]] TESTRAIL_KEY=key [of user to be used for communication] TESTRAIL_PROJECT_ID=[project id to which the data is sent] JIRA_PROJECT_KEY=[Jira project key for integration with Jira]
- By using command line arguments:
--pytest-testrail-client True / False --testrail-url [URL of TestRail instance] --testrail-email [email [of user to be used for communication]] --testrail-key key [of user to be used for communication] --testrail-project-id [project id to which the data is sent] --jira-project-key [Jira project key for integration with Jira]
- By using pytest.ini file:
[pytest-testrail-client] pytest-testrail-client = True / False testrail-url = [URL of TestRail instance] testrail-email = [email [of user to be used for communication]] testrail-key = key [of user to be used for communication] testrail-project-id = [project id to which the data is sent] jira-project-key = [Jira project key for integration with Jira]
Note: - Please follow TestRail instructions for generating user_key - Jira integration is done with TestRail for Jira Test Management - TestRail Project type shall be Multiple Test Suites to manage cases
Export Test Cases to TestRail
python -m pytest -v --pytest-testrail-export-test-cases --pytest-testrail-feature-files-relative-path "features"
Read more about TestRail Test Suites and Cases
Implementation details
TODO
Export Tests to TestRail
python -m pytest ./tests -v --pytest-testrail-export-test-results --pytest-testrail-test-plan-id [ID of Plan to be used] --pytest-testrail-test-configuration-name [str: Id of Test Configuration to be used]
Read more about TestRail Test Plans and Configurations
Implementation details
TODO
Resources
Release files for pytest-testrail-client 1.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 | |
|---|---|---|---|
| pytest-testrail-client-1.0.8.tar.gz | 22.3 kB | Details |
Release files / pytest-testrail-client-1.0.8.tar.gz
| Download URL | pytest-testrail-client-1.0.8.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ddef4f81fd19165d82e7bab24722fbfe86a3038d8c69c97974e82f2392d632a1
|
|
BLAKE2b-256 checksum How to use checksums |
455d785479ee584766c37a6612959ba715841c488174fe70342ab17ccc08b681
|
| 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/41.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2
|