Zephyr (TM4J) Python REST API wrapper
Project description
Zephyr-python-api
Project description
This is a set of wrappers for Zephyr Scale (TM4J) REST API. This means you can interact with Zephyr Scale without GUI, access it with python code and create automation scripts for your every day interactions.
To be done:
- More usage examples
- Tests, tests and tests for gods of testing
- Convenient docs
- Implementing higher level wrappers representing Test Case, Test Cycle, etc.
Installation
pip install zephyr-python-api
Example usage
Zephyr Cloud auth:
from zephyr import ZephyrScale
zscale = ZephyrScale(token=<your_token>)
Zephyr 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")
Troubleshooting
For troubleshooting see TROUBLESHOOTING.md
License
This library is licensed under the Apache 2.0 License.
Links
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
zephyr-python-api-0.0.4.tar.gz
(17.9 kB
view hashes)
Built Distribution
Close
Hashes for zephyr_python_api-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d324be3125653cf359dee157be85c95ac373708b0ef49f17bdf991c808ee99f |
|
MD5 | 3446bf73ea14375c6a931a852b051d5a |
|
BLAKE2b-256 | 84933bdd56233eee090fbd30f1916777a4c4fb316f598880d824b92fc31e7ed2 |