0.1.1 โ€ข Published 7 months ago

autotestgpt v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

๐Ÿค– GPT-4 Multi-Agent Test Engineer ๐Ÿค–

Welcome to the GPT-4 Multi-Agent Test Engineer project! This innovative tool leverages the power of GPT-4 to automate the creation of tests, making your testing process more efficient and intelligent. ๐Ÿš€

๐Ÿ“‹ Project Overview

What is it?

The GPT-4 Multi-Agent Test Engineer is a sophisticated testing assistant designed to generate test cases, scripts, and scenarios for a wide range of applications and software systems.

Cost Awareness

It's crucial to be aware of the potential costs associated with using the OpenAI API, as costs can accumulate based on usage. While the GPT-4 Multi-Agent Test Engineer offers powerful testing capabilities, it's essential to keep an eye on your API usage to manage expenses effectively.

Features

  • ๐Ÿง  Powered by GPT-4: Harness the advanced natural language processing capabilities of GPT-4.
  • ๐Ÿค Multi-Agent Collaboration: Collaborate with multiple test agents for comprehensive testing coverage.
  • ๐Ÿ“œ Test Script Generation: Automatically generate tests for your applications.
  • ๐ŸŽฏ Specific: By implementing a highly specialized Multi-Agent approach, we aim to keep costs significantly lower compared to requesting the same task from AutoGPT or BabyAGI.
  • ๐Ÿšฆ Test Automation: Seamlessly integrate with test automation frameworks.
  • ๐Ÿ“ฆ Customizable: Tailor the test engineer to your specific testing needs.

๐Ÿš€ Getting Started

Prerequisites

Before you start using the GPT-4 Multi-Agent Test Engineer, ensure you have the following:

  • Node.js v16 (npm)
  • OpenAI API Key (Get one at OpenAI)

Installation

To install the GPT-4 Multi-Agent Test Engineer globally, open your terminal and run the following command:

npm install -g autotestgpt

This will install the tool globally, making it accessible from any location in your system.

Use it like this: autotestgpt [path-to-file] to generate test for code. See chapters below in order to configure it.

See additional help instructions by running this: autotestgpt --help

Environmental Variables

Configure your project using the following environmental variables:

Variable NameDescription
AUTOTESTGPT_OPENAI_API_KEYYour OpenAI API key for authentication. You can also set this value through the --api-key cli option

๐Ÿ“„ Configuration File

To enhance the capabilities of the GPT-4 Multi-Agent Test Engineer, the tool relies on a configuration file in YAML format. This configuration file should be placed in the root folder of your project and provides essential information for generating tests. Below is an example structure of the configuration file:

autotestgpt.config.yaml

.ts:
  techstack:
    - typescript
    - jest
  context: |-
    Write for each exported function a unit test. Wrap test groups in 'describe' blocks.
  examples:
    - name: openai file
      code: src/openai.ts
      tests: src/openai.test.ts

The configuration file consists of the following key sections:

  • .ts: This section defines the target file type. In this example, .ts represents TypeScript files.
  • techstack: Here, you specify the technology stack associated with your project. This helps the tool understand the context and requirements for generating appropriate tests.
  • context: (optional) This field allows you to provide a high-level description of how tests should be generated for the specified file type. You can use this to guide the tool in creating tests that align with your project's testing standards.
  • examples: (optional) Under this section, you can list specific examples related to your project. These examples include:
    • name: A descriptive name for the example.
    • code: The path to the code file that stands as an example in all prompts used to further enhance the test engineer.
    • tests: The path to the tests for the code above. This will also be included in all prompts to the test engineer.

By configuring this file according to your project's needs, you can tailor the test generation process to match your testing framework and standards.

Remember to keep the configuration file up to date as your project evolves and as new testing requirements emerge.

By utilizing this configuration file, you can ensure that the GPT-4 Multi-Agent Test Engineer generates tests that align with your project's testing goals and specifications.

๐Ÿค– Meet the Agents

  • Agent 1 ๐Ÿ•ต๏ธ: ๐Ÿš€: Senior lead (test) engineer who's role it is to review and refactor tests.
  • Agent 2 ๐Ÿงช: A software engineer specialized in writing automated tests.

๐Ÿ’ฌ Feedback

We love feedback! If you have any suggestions, ideas, or issues, please open an issue.

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

A big thank you to the OpenAI, BabyAGI and AutoGPT teams for making GPT-4 available and inspiring this project.

Let's revolutionize the way we approach testing with the GPT-4 Multi-Agent Test Engineer! ๐ŸŒŸ