Giter VIP home page Giter VIP logo

rest-agent's Introduction

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

rest-agent's People

Contributors

yuchou87 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

kakawaa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.