Skip to main content

A CLI tool to generate pytest test cases using AI.

Project description

TestForge

TestForge A CLI tool to generate pytest test cases using AI.

Features

  • Generate Tests: Automatically generates pytest test cases for a specified directory or file.
  • Output Directory: Specify a custom output directory for the generated test files (default is tests).
  • Configurable Endpoint: Set an environment variable TESTFORGE_ENDPOINT_URL for the endpoint URL.

Installation

Install TestForge via pip:

pip install testforge

Usage

Setting Up the Endpoint URL

TestForge requires an environment variable TESTFORGE_ENDPOINT_URL to define the cloud endpoint for uploading files. To set it up, use the following command:

export TESTFORGE_ENDPOINT_URL="https://your-cloud-endpoint.com/generate-tests"

Replace "https://your-cloud-endpoint.com/generate-tests" with the actual URL of your endpoint. This variable needs to be set in every session where you use TestForge or added to your shell configuration file (e.g., .bashrc or .zshrc) for persistence.

Command Options

TestForge provides several options that can be used in the command line:

  • Show Version: Check the version of TestForge.

    testforge -v
    
  • Generate Tests: Generate pytest cases for a specified directory.

    testforge -g path/to/your/directory
    
  • Specify Output Directory: Define a custom directory for the generated test files.

    testforge -g path/to/your/directory -o custom_output_directory
    

Example

export TESTFORGE_ENDPOINT_URL="https://your-cloud-endpoint.com/generate-tests"
testforge -g src -o tests

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

testforge-1.0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

testforge-1.0.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file testforge-1.0.2.tar.gz.

File metadata

  • Download URL: testforge-1.0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for testforge-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f91dde72edcb6bb6f5ff5af3808278f2a9ba231b0cab578339d04ca179d997dc
MD5 61e593b4e16313fcf173b0f978f1c7bd
BLAKE2b-256 34de8ed57840431551201abdd051d450e4ed11617de0a85e840b425766460e42

See more details on using hashes here.

File details

Details for the file testforge-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: testforge-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for testforge-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 41591b9bfaf45eb6776def9ed760d08e2c509bd171f3609e27a378ad0015f7a6
MD5 c4aa1e0ed823968988cef095f94cdb51
BLAKE2b-256 f7bb19a4d12f919d96c36742ea981dc9f5c8b5876af5d28ac0130f411a02fa9f

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