Skip to main content

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

  1. init Command: The init command will generate and add neccesery config files to the project and it will also create the github actions worflow setup in your project.
  2. Generate Command: The generate command uses an AI model to generate automated tests for a given pull request. It leverages the PR number to gather relevant code and context.
  3. Execute Command: The execute command 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

test_gen_framework-1.0.6.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

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

test_gen_framework-1.0.6-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file test_gen_framework-1.0.6.tar.gz.

File metadata

  • Download URL: test_gen_framework-1.0.6.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for test_gen_framework-1.0.6.tar.gz
Algorithm Hash digest
SHA256 5962cc220dd48ff12a6d9c16669b9a62a0f5f893d3b62ae741a745dce5f63d75
MD5 391de088a4155e78a827dade09ad70b5
BLAKE2b-256 8aa19445de6cd6beee248e5f177cbfa61bfacc61d548e1805c7437c4094eba6e

See more details on using hashes here.

File details

Details for the file test_gen_framework-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for test_gen_framework-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ee11ef447fb0ad168018ad2c44c957df968ce8b3aba7c75916eaa9b0987e929e
MD5 3b3d93c33b2fa44bbc35c506038169d5
BLAKE2b-256 d79914996cdb7418e42703953a871cb1eedfb489d0a92aa5ecdb6a0ba13faf2a

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