Test Generation Framework
Project description
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.
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 test_gen_framework-1.0.5.tar.gz.
File metadata
- Download URL: test_gen_framework-1.0.5.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddb9de5696b222ac16806afec643d298b366d05feb4f10895748b796e88c0aae
|
|
| MD5 |
b56afacce109b4e3e0f371a440a33442
|
|
| BLAKE2b-256 |
9194749daed5ec6d5e11359aca88b13eb8594e7073bd16c538fbb76c130ddc5d
|
File details
Details for the file test_gen_framework-1.0.5-py3-none-any.whl.
File metadata
- Download URL: test_gen_framework-1.0.5-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed4a821375f9fe4d4ae05d17487603981fab7c7dfd94491f0f2ca20b122c8fd9
|
|
| MD5 |
fc1ca0ec8bf0cd4b0a26258a90402cdd
|
|
| BLAKE2b-256 |
9430972e6bb65737e7ccf40d5071f95f1da44593b2fb8c8f65b0ba40e6bc4373
|