Skip to main content

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 usage
  • yaml: 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:

  1. Use the Makefile's release target: make release
  2. 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
  3. The tag push will automatically trigger the GitHub Actions publish workflow

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

testzeus_cli-0.0.5.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

testzeus_cli-0.0.5-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file testzeus_cli-0.0.5.tar.gz.

File metadata

  • Download URL: testzeus_cli-0.0.5.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.12 Linux/6.11.0-1014-azure

File hashes

Hashes for testzeus_cli-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ca752b086374202e9bbc3e82502176d9fdc5f6e84bafffe147012b60c04d8c09
MD5 c01afd36f17bbf0bad2000727f605654
BLAKE2b-256 9d82c4304689a7bcea17c9e384b405c82dd58b726203cc71702826a8b15e0dff

See more details on using hashes here.

File details

Details for the file testzeus_cli-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: testzeus_cli-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.12 Linux/6.11.0-1014-azure

File hashes

Hashes for testzeus_cli-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 99e9f1795ff972a296b8eedcad78c254842108ab1682b431353a1f51198b2515
MD5 b1336d88c573b0c7876648d0c301883a
BLAKE2b-256 fda0ee6be92adc87b8c2007bc81ce6893d453694673b90e6122e42bcd403b75c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page