Skip to main content

Test case management tool for uploading JSON test cases to QATest

Project description

QATest CLI

A command-line tool for validating and uploading JSON test cases to QATest management system.

Features

  • 🔍 Validate test case JSON files for correct structure and format
  • 📤 Bulk upload test cases to QATest API with automatic batching
  • 📁 Recursive scanning of directories for test case files
  • 🎨 Rich terminal output with progress indicators and colored formatting
  • ⚙️ Configurable via config files or command-line arguments

Installation

pip install qatest

Quick Start

1. Initialize Configuration

Create a configuration file with your project credentials:

qatest init <project_key>

This creates a qatest-config.yml file in your current directory.

2. Configure API Endpoint

Edit the generated qatest-config.yml:

api_endpoint: https://your-api-endpoint.com
project_key: your-project-key

3. Validate Test Cases

Check your test case JSON files for correct structure:

qatest validate ./test_cases

4. Upload Test Cases

Upload validated test cases to QATest:

qatest upload ./test_cases

Test Case Format

Test cases must be JSON files with the following structure:

{
  "id": 442,
  "title": "User login flow",
  "description": "Test successful user authentication",
  "preconditions": "User account exists",
  "steps": [
    {
      "action": "Enter username and password",
      "expected_result": "Credentials are accepted"
    },
    {
      "action": "Click login button",
      "expected_result": "User is redirected to dashboard"
    }
  ]
}

Required fields:

  • id (integer): Unique test case identifier
  • title (string): Test case title
  • steps (array): Test steps with action and expected_result

Optional fields:

  • description (string): Detailed test description
  • preconditions (string): Test prerequisites

Commands

qatest init

Initialize configuration file with project credentials:

qatest init <project_key> [--force]

Options:

  • --force: Overwrite existing configuration

qatest validate

Validate test case JSON files:

qatest validate <directory> [--pattern PATTERN]

Options:

  • --pattern: File pattern to match (default: *.json)

qatest upload

Upload test cases to QATest API:

qatest upload <directory> [OPTIONS]

Options:

  • --no-validate: Skip validation before upload
  • --batch-size: Number of test cases per API request (default: 50)
  • --config: Path to custom configuration file

Configuration

Configuration is managed through qatest-config.yml:

api_endpoint: https://api.qatest.com  # Required
project_key: your-api-key             # Required
batch_size: 50                        # Optional (default: 50)
validate_first: true                  # Optional (default: true)

Error Handling

The CLI provides detailed error messages for common issues:

  • Missing configuration: Prompts to run qatest init
  • Invalid JSON: Shows line numbers and parsing errors
  • Missing fields: Lists all missing required fields
  • API errors: Displays HTTP status codes and error details

License

MIT License

Support

For issues and feature requests, please visit the GitHub repository.

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

qatest-1.0.4.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

qatest-1.0.4-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file qatest-1.0.4.tar.gz.

File metadata

  • Download URL: qatest-1.0.4.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for qatest-1.0.4.tar.gz
Algorithm Hash digest
SHA256 c49b0a0d44c60f19fe39b89264b1b84bee18f56ed58f8521eacb13c879e5694a
MD5 a170d8fed4aad093b8935dcdf584c6da
BLAKE2b-256 9ff238e003107c042d2201d68387861926784d0ba98fbd8bbbc8ea1524f7f3f7

See more details on using hashes here.

File details

Details for the file qatest-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: qatest-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for qatest-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bc2fae9e70fcfb818cfaacc9385012b3c80c24feabf840e7ab9e56aa26ab13de
MD5 f3fe575c6b7ae3717574831f9b5c6406
BLAKE2b-256 d1d440d5e4709a3a34366236ae0feca5fe1ab0679cd85ceb978102deaedd1c46

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