rest-agent

module
v0.0.0-...-0d8279c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2024 License: MIT

README

rest-agent

Use LLM to automatically generate and execute interface test cases.

Install

make
mkdir -p /usr/local/bin
cp ./bin/rest-agent /usr/local/bin

Quick Start

  • Support models such as openai, groq, google vertex ai
  • Run rest-agent auth add to configure the providers.
    • You can provide the password directly using the --password flag.
  • Run rest-agent generate to generate test cases from openapi.[json|yaml] files.

Examples

provider
# add a new provider
rest-agent auth add -b openai -m openai/gpt-4o-mini -u https://openrouter.ai/api/v1 -l 8192 -p ${API_KEY}

# set the default provider
rest-agent auth default -p openai

# update the provider
rest-agent auth update -b openai -m openai/gpt-4o-mini

# remove a provider
rest-agent auth remove -b openai
generate

default outfile save in ~/Library/Application Support/rest-agent/274a1427519511bb62fac51c5f24a149_2024-07-28_21:49:38.yaml

# generate test cases from openapi.json and save to yaml
rest-agent generate -f pkg/ai/test_data/openapi.json -t yaml

# generate test cases from openapi.json and save to json
rest-agent generate -f pkg/ai/test_data/openapi.json -t json

Roadmap

  • Add test case generate module

  • Add api test case execution engine

Directories

Path Synopsis
cmd
cli
internal
cli
pkg
ai

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL