api-testing/docs
Rick 8d459a9eed
feat: support add multiple stores (#147)
2023-07-29 22:14:58 +08:00
..
README.md feat: support add multiple stores (#147) 2023-07-29 22:14:58 +08:00
api-testing-schema.json feat: add parameters in the test suite (#139) 2023-07-24 13:59:33 +08:00
atest-vscode.png doc: add an introduction about this project (#42) 2023-04-20 17:49:28 +08:00
constants.go feat: support getting suggested APIs from spec (#123) 2023-07-16 21:10:03 +08:00
glcc-2023-announce.md Proposal accepted in GLCC 2023 (#111) 2023-06-30 13:38:14 +08:00
introduce-zh.md doc: add an introduction about this project (#42) 2023-04-20 17:49:28 +08:00
release-note-v0.0.12.md docs: add release notes (in Chinese) of v0.0.12 (#97) 2023-06-18 18:34:46 +08:00

README.md

Welcome to use atest to improve your code quality.

Get started

You can use atest as a CLI or other ways:

See also the screenshots below:

image

image

Installation

You can install in various methods:

If you're developing APIs locally, the best way is installing it as a container service. Then you can access it via your browser.

Currently, it supports the following kinds of services:

  • Operate System services
    • Linux, and Darwin
  • Podman, and Docker

Please see the following example usage:

atest service start -m podman --version master

Storage

There are multiple storage backends supported. See the status from the list:

Name Status
Local Storage Ready
ORM DataBase Developing
Etcd DataBase Developing

Local Storage

Local storage is the built-in solution. You can run it with the following command:

podman run --pull always -p 8080:8080 ghcr.io/linuxsuren/api-testing:master

# The default local storage directory is: /var/www/sample
# You can find the test case YAML files in it.
# Visit it from http://localhost:8080 once it's ready.

or, you can run the CLI in terminal like this:

atest server --local-storage 'sample/*.yaml' --console-path console/atest-ui/dist

using the host network mode if you want to connect to your local environment:

podman run --pull always --network host ghcr.io/linuxsuren/api-testing:master

ORM DataBase Storage

Start a database with the following command if you don't have a database already. You can install tiup via hd i tiup.

tiup playground --db.host 0.0.0.0
# create a config file
mkdir bin
echo "- name: db
  kind:
    name: database
    url: localhost:7071
  url: localhost:4000
  username: root
  properties:
    database: test" > bin/stores.yaml

# start the server with gRPC storage
podman run -p 8080:8080 -v bin:var/data/atest \
    --network host \
    ghcr.io/linuxsuren/api-testing:master \
    atest server --console-path=/var/www/html \
    --config-dir=/var/data/atest

# start the gRPC storage which ready to connect to an ORM database
podman run -p 7071:7071 \
    --network host \
    ghcr.io/linuxsuren/api-testing:master atest-store-orm

Extensions

Developers could have a storage extension. Implement a gRPC server according to loader.proto is required.

Official Images

You could find the official images from both Docker Hub and GitHub Images. See the image path:

  • ghcr.io/linuxsuren/api-testing:latest
  • linuxsuren/api-testing:latest
  • docker.m.daocloud.io/linuxsuren/api-testing (mirror)

The tag latest represents the latest release version. The tag master represents the image of the latest master branch. We highly recommend you using a fixed version instead of those in a production environment.

Release Notes

Articles