Command-line interface for TestZeus testing platform
Project description
TestZeus CLI
A powerful command-line interface for the TestZeus testing platform.
Installation
pip install testzeus-cli
Authentication
Before using the CLI, you need to authenticate with the TestZeus platform:
testzeus login
You will be prompted to enter your email and password. Your credentials are securely stored in your system's keyring.
testzeus login --profile dev
Authentication automatically detects and stores your tenant information, which will be used for all subsequent commands.
Auth Commands
| Command | Description |
|---|---|
login |
Authenticate with TestZeus |
logout |
Log out and remove stored credentials |
whoami |
Display current authentication status |
Global Options
The following options can be used with any command:
| Option | Description |
|---|---|
--profile |
Configuration profile to use (default: "default") |
--api-url |
Custom TestZeus API URL |
--verbose |
Enable verbose output |
--format |
Output format: json, table, or yaml (default: table) |
Managing Tests
List Tests
testzeus tests list
Filter test list with key-value pairs:
testzeus tests list --filters status=draft
Sort and expand related entities:
testzeus tests list --sort created --expand tags,test_data
Get Test Details
testzeus tests get <test-id>
testzeus tests get <test-id> --expand tags,test_data
Create Test
Create a test with text-based features:
testzeus tests create --name "My Test" --feature "Feature: Test something"
Create a test with features from a file:
testzeus tests create --name "My Test" --feature-file ./features.txt
Additional options:
testzeus tests create --name "My Test" --feature-file ./features.txt --status ready --data data_id1 --data data_id2 --tags tag1 --tags tag2 --environment env_id
Update Test
Update test name:
testzeus tests update <test-id> --name "New Name"
Update test features from text:
testzeus tests update <test-id> --feature "Updated feature content"
Update test features from a file:
testzeus tests update <test-id> --feature-file ./updated_features.txt
Update other properties:
testzeus tests update <test-id> --status ready --data data_id1 --tags tag1 --environment env_id
Delete Test
testzeus tests delete <test-id>
Test Runs
List Test Runs
testzeus test-runs list
Filter runs by status:
testzeus test-runs list --filters status=running
Get Test Run Details
testzeus test-runs get <run-id>
Get expanded details including all outputs and steps:
testzeus test-runs get-expanded <run-id>
Create and Start Test Run
testzeus test-runs create --name "Run 1" --test <test-id>
Cancel Test Run
testzeus test-runs cancel <run-id>
Watch Test Run Progress
testzeus test-runs watch <run-id>
testzeus test-runs watch <run-id> --interval 10
Download Test Run Attachments
testzeus test-runs download-attachments <run-id>
testzeus test-runs download-attachments <run-id> --output-dir ./my-attachments
Test Data
List Test Data
testzeus test-data list
Filter by type:
testzeus test-data list --filters type=test
Get Test Data Details
testzeus test-data get <data-id>
testzeus test-data get <data-id> --expand related_entities
Create Test Data
Create with inline content:
testzeus test-data create --name "Test Data 1" --input-data "{\"key\":\"value\"}"
Create with data from a file:
testzeus test-data create --name "Test Data" --file ./data.json
Additional options:
testzeus test-data create --name "Test Data" --type test --status ready --file ./data.json
Update Test Data
Update name and other properties:
testzeus test-data update <data-id> --name "New Data Name" --type updated --status ready
Update data content from text:
testzeus test-data update <data-id> --input-data "{\"key\":\"updated\"}"
Update data content from a file:
testzeus test-data update <data-id> --file ./updated_data.json
Delete Test Data
testzeus test-data delete <data-id>
Configuration
The CLI stores configuration and credentials in your user's config directory. Different profiles can be used to manage multiple TestZeus environments.
Default configuration location:
- Linux/Mac:
~/.testzeus/config.yaml - Windows:
%APPDATA%\testzeus\config.yaml
Passwords are securely stored in your system's keyring.
Examples
Complete Workflow
# Login to TestZeus
testzeus login
# Create test data
testzeus test-data create --name "User Data" --input-data "{\"username\":\"testuser\"}"
# Create a new test with features from a file
testzeus tests create --name "Login Test" --feature-file ./features/login.feature --data <test_data_id>
# Run the test
testzeus test-runs create --name "Login Run 1" --test <test_id>
# Watch the test run progress
testzeus test-runs watch <test_run_id>
# Check detailed results
testzeus test-runs get-expanded <test_run_id>
# Download any attachments generated during the run
testzeus test-runs download-attachments <test_run_id> --output-dir ./results
Error Handling
When an error occurs, the CLI will display an error message. For more detailed information, run any command with the --verbose flag:
testzeus tests list --verbose
Output Formats
The CLI supports multiple output formats:
table: Human-readable tabular format (default)json: JSON format for programmatic usageyaml: YAML format
Example:
testzeus tests list --format json
Development and Contribution
To contribute to the TestZeus CLI, fork the repository and install development dependencies:
pip install -e ".[dev]"
Release Process
The TestZeus CLI uses GitHub Actions for automated releases to PyPI. To create a release:
- Use the Makefile's release target:
make release - This will:
- Prompt for version bump type (patch, minor, major)
- Update the version in pyproject.toml
- Commit and create a git tag
- Push changes and tags to GitHub
- The tag push will automatically trigger the GitHub Actions publish workflow
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file testzeus_cli-0.0.6.tar.gz.
File metadata
- Download URL: testzeus_cli-0.0.6.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.12 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5b7de984e2d06e6747b17461119fd84d6ade5818d9ef4e57108e3417671789d
|
|
| MD5 |
ddbf99c4cee91b6c925b470d86f10bd3
|
|
| BLAKE2b-256 |
2b4319900f6b294cc5cca0400928f8fdfc9711ba249a992662829c9759ecbefa
|
File details
Details for the file testzeus_cli-0.0.6-py3-none-any.whl.
File metadata
- Download URL: testzeus_cli-0.0.6-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.12 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e8ef3081265489740249f5bd251634addb637e03ec3afdbad750c12bfea01c4
|
|
| MD5 |
a94a2396a187e20183d889522a44c854
|
|
| BLAKE2b-256 |
5d5ea04d5a5b92ce8a4cb4b1e0ed9ed8d93c240714dfce773319b57b2f918d9b
|