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_URLfor 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
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 testforge-1.0.3.tar.gz.
File metadata
- Download URL: testforge-1.0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
591e17cab5931d5390a3f1caf898d04998d279a7da08a88adc529ffd69d45cd1
|
|
| MD5 |
d0ad3cb365f6f9d74a5f0f85c6b40a96
|
|
| BLAKE2b-256 |
ebfdf8bb168825e15c1990977c19f19fa3ef630c7088e90c94ca1ff9dee929c6
|
File details
Details for the file testforge-1.0.3-py3-none-any.whl.
File metadata
- Download URL: testforge-1.0.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a2c2ef3bf8f0f57b9b5171f680bceb201183a24bc2a86b552d398e5de04f1f9
|
|
| MD5 |
065baf11efa5753c2cf5d07e5f6b89f0
|
|
| BLAKE2b-256 |
79eab2f79b743258443bd1eb4888f769b75602ddac6ab1a88a4351d0f93535f9
|