Test Generation Framework
The Test Generation Framework is a command-line interface (CLI) tool designed to generate and execute automated tests for pull requests (PRs) using AI models. It provides two main commands: generate for generating tests based on the PR number, and execute for running tests with prioritization.
Features
- Generate Test Cases: Automatically generate test cases using an AI model based on the pull request.
- Dynamic Tests prioritization: Dynamically generate tests prioritization based on previous execution data.
- Execute Tests: Run generated tests with prioritization, making it easier to focus on the most important tests first.
Installation
To install the framework, use the following command:
pip install test-gen-framework
Usage
Command-Line Interface
Once installed, you can use the test-gen command with the following syntax:
test-gen <command> <arguments>
Available Commands
1. init
Generates the config file and github actions workflow setup.
Usage:
test-gen-init
2. generate
Generates test cases based on the provided pull request (PR) number.
Usage:
test-gen generate <pr_number>
Arguments:
pr_number: The PR number for which to generate test cases.
Example:
test-gen generate 123
This will generate test cases for PR number 123.
3. execute
Executes the generated tests with prioritization.
Usage:
test-gen execute <test_dir> <pr_number>
Arguments:
test_dir: The directory where the generated test cases are located.pr_number: The PR number associated with the generated tests.
Example:
test-gen execute tests/pr_123 123
This will execute the tests located in the tests/pr_123 directory, corresponding to PR number 123.
How It Works
- init Command: The
initcommand will generate and add neccesery config files to the project and it will also create the github actions worflow setup in your project. - Generate Command: The
generatecommand uses an AI model to generate automated tests for a given pull request. It leverages the PR number to gather relevant code and context. - Execute Command: The
executecommand runs the generated tests on a specified directory, prioritizing tests based on their importance and relevance.
Contributing
If you'd like to contribute to the project, feel free to fork the repository and submit a pull request. Contributions are always welcome!
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for test-gen-framework 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| test_gen_framework-1.0.8.tar.gz | 12.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| test_gen_framework-1.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.8 kB
Release files / test_gen_framework-1.0.8.tar.gz
| Download URL | test_gen_framework-1.0.8.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76aba588c748e704d5bc6267d2f25fe95621b1d99c62139ba8e73e991cb91062
|
|
BLAKE2b-256 checksum How to use checksums |
d61649899d69078a66d48358d679d15c8cb6d9e4990bae601481e14f065b01d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / test_gen_framework-1.0.8-py3-none-any.whl
| Download URL | test_gen_framework-1.0.8-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
496dea05e6d96f30e2550d5de283e3eca92a0f7768c83705763d95e318689538
|
|
BLAKE2b-256 checksum How to use checksums |
c8bbdd2db63f2bca8d27dd8b6da3362e19e1840384d2ee21b80342c3703e8301
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|