Zephyr Test Management
Project description
This is a set of wrappers for both Zephyr Scale and Zephyr Squad (TM4J) REST APIs. This means you can interact with Zephyr without GUI, access it with python code and create automation scripts for your every day interactions.
This project is a fork of nassauwinter's zephyr-python-api.
For more detailed information please see the project's documentation.
To be done:
- Zephyr Squad Cloud support
- More usage examples for cloud versions
- Increase the tests coverage
- Convenient docs
- Implementing higher level wrappers representing Test Case, Test Cycle, etc.
Installation
pip install zephyr-test-management
Example usage
Zephyr Scale
Zephyr Scale Cloud auth:
from zephyr import ZephyrScale
zscale = ZephyrScale(token="<your_token>")
Zephyr Scale Server (TM4J) auth:
from zephyr import ZephyrScale
# Auth can be made with Jira token
auth = {"token": "<your_jira_token>"}
# or with login and password (suggest using get_pass)
auth = {"username": "<your_login>", "password": "<your_password>"}
# or even session cookie dict
auth = {"cookies": "<session_cookie_dict>"}
zscale = ZephyrScale.server_api(base_url="<your_base_url>", **auth)
Then it is possible to interact with api wrappers:
zapi = zscale.api
# Get all test cases
all_test_cases = zapi.test_cases.get_test_cases()
# Get a single test case by its id
test_case = zapi.test_cases.get_test_case("<test_case_id>")
# Create a test case
creation_result = zapi.test_cases.create_test_case("<project_key>", "test_case_name")
Zephyr Squad
Zephyr Squad Server (TM4J) auth:
from zephyr import ZephyrSquad
# Auth can be made with Jira token
auth = {"token": "<your_jira_token>"}
# or with login and password (suggest using get_pass)
auth = {"username": "<your_login>", "password": "<your_password>"}
# or even session cookie dict
auth = {"cookies": "<session_cookie_dict>"}
zsquad = ZephyrSquad(base_url=base_url, **auth)
Then it is possible to interact with api wrappers:
# Obtain a project's information
project_info = zsquad.actions.project.get_project_info("<project_key>")
# Obtain a project's versions/releases
project_versions = zsquad.api.util_resource.get_all_versions("<project_id>")
# Get a single test case by its id
test_case = zsquad.actions.test_cases.get_test_case("<case_key>", fields="id")
# Create a new test case for a project
data = {
"fields": {
"assignee": {
"name": "<jira_username>"
},
"description": "<case_description>"
}
}
creation_result = zsquad.actions.test_cases.create_test_case(projectId="<project_id>", summary="<case_summary>", data=data)
Troubleshooting
For troubleshooting see TROUBLESHOOTING.md
License
This library is licensed under the Apache 2.0 License.
Links
Metadata
Release files for zephyr-test-management 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zephyr_test_management-0.2.1.tar.gz | 31.8 kB | Without provenance | Details for zephyr_test_management-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zephyr_test_management-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for zephyr_test_management-0.2.1-py3-none-any.whl |
Total release size: 71.6 kB
Release files / zephyr_test_management-0.2.1.tar.gz
| Download URL | zephyr_test_management-0.2.1.tar.gz |
|---|---|
| Size | 31.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f346d883a0d6cc7d429e1e0555a26717f911da6360f4800b1616e19a8729151
|
|
BLAKE2b-256 checksum How to use checksums |
d8cb7b4c98aba51b4717d2d1122d77f41c2ce5a63c845db38e30602b73a93c33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.8.18
|
Release files / zephyr_test_management-0.2.1-py3-none-any.whl
| Download URL | zephyr_test_management-0.2.1-py3-none-any.whl |
|---|---|
| Size | 39.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25750c9f23ca22dcc90322fde11e80c70cbb3f1118388886e0a7c5338d2ec8d6
|
|
BLAKE2b-256 checksum How to use checksums |
f8ec88c4a680767ebda6c5d7a3ef59195b64608b6b888cc860fbb5fc36242847
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.8.18
|
Security for zephyr-test-management 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.