Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIXED] grammatical errors in README.md #239

Merged
merged 1 commit into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 30 additions & 27 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# ATEST

Welcome to use `atest` to improve your code quality.

## Get started
You can use `atest` as a CLI or other ways:
You can use `atest` as a CLI or as:

* Web UI
* [VS Code Extension](https://marketplace.visualstudio.com/items?itemName=linuxsuren.api-testing)
Expand All @@ -13,37 +15,39 @@ See also the screenshots below:
![image](https://github.com/LinuxSuRen/api-testing/assets/1450685/e959f560-1fb5-4592-9f45-ec883c385785)

## Installation
You can install in various methods:
There are various ways of installing `atest`:

* CLI via `hd i atest`
* Web server
* [Kubernetes](https://github.com/LinuxSuRen/api-testing/tree/master/docs/manifests/kubernetes)
* [Argo CD](https://github.com/LinuxSuRen/api-testing/blob/master/docs/manifests/argocd/simple.yaml)
* [Helm](helm.md)

If you're developing APIs locally, the best way is installing it as a container service.
If you're developing APIs locally, the best way is to install 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](https://github.com/containers/podman), and Docker
* Linux and Darwin
* [Podman](https://github.com/containers/podman) and Docker

### Have a look at the following example usage:

Please see the following example usage:
#### Podman

```shell
sudo atest service install -m podman --version master
```

or run in Docker:
#### Docker
```shell
docker run -v /var/www/sample:/var/www/sample \
--network host \
linuxsuren/api-testing:master
```

the default web server port is `8080`. So you can visit it via: http://localhost:8080
The default web server port is `8080`. So you can visit it via: http://localhost:8080

## Run in k3s

Expand All @@ -56,31 +60,30 @@ kustomize build sample/kubernetes/docker.io/ | k3s kubectl apply -f -
```

## Run your test cases
The test suite file could be in local, or in the HTTP server. See the following different ways:
The test suite file could be local, or in the HTTP server. Have a look at some examples:

* `atest run -p your-local-file.yaml`
* `atest run -p https://gitee.com/linuxsuren/api-testing/raw/master/sample/testsuite-gitee.yaml`
* `atest run -p http://localhost:8080/server.Runner/ConvertTestSuite?suite=sample`

For the last one, it represents the API Testing server.
The last example pertains to the API Testing server.

## Functions

There are two kinds of functions for two situations: template rendering and test results verification.

* Template rendering functions base on [the Go template](https://pkg.go.dev/text/template)
* The verification functions base on [expr library](https://expr.medv.io/)
* Template rendering functions are based on [the Go template](https://pkg.go.dev/text/template)
* The verification functions are based on [expr library](https://expr.medv.io/)

You can query the supported functions by using the following command or on the UI page:
You can query the supported functions on the UI page or by using the command:

```shell
atest func
```

## Hooks

In some cases you may want to run the test cases after a HTTP server is ready. Then you can use the hooks feature.
Such as:
In some cases you may want to run the test cases after an HTTP server is ready. Then you can use the hooks feature as follows:

```yaml
name: Gitlab
Expand Down Expand Up @@ -113,7 +116,7 @@ jmeter -n -t bin/gitee.jmx
Please feel free to bring more test tool converters.

## Run in Jenkins
You can run the API testings in Jenkins, see also the following example:
You can run the API testings in Jenkins, as demonstrated in the example below:

```Jenkinsfile
pipeline {
Expand All @@ -135,10 +138,10 @@ pipeline {
```

## Report
You can see the test results from [Grafana](prometheus.md).
You can see the test results in [Grafana](prometheus.md).

## Monitoring
It could monitor the server and browser via the [Apache SkyWalking](https://skywalking.apache.org/).
It can monitor the server and browser via the [Apache SkyWalking](https://skywalking.apache.org/).
Please add the following flag if you want to get the browser tracing data:

```shell
Expand Down Expand Up @@ -168,18 +171,18 @@ podman run --pull always -p 8080:8080 ghcr.io/linuxsuren/api-testing:master
# Visit it from http://localhost:8080 once it's ready.
```

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

```shell
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:
Use the host network mode if you want to connect to your local environment:
```shell
podman run --pull always --network host ghcr.io/linuxsuren/api-testing:master
```

### ORM DataBase Storage
### ORM Database Storage
Start a database with the following command if you don't have a database already. You can install [tiup](https://tiup.io/) via `hd i tiup`.

```shell
Expand Down Expand Up @@ -220,7 +223,7 @@ podman run --network host \
ghcr.io/linuxsuren/api-testing:master atest-store-s3
```

See also the expected configuration below:
Have a look at the expected configuration below:

```yaml
- name: s3
Expand All @@ -246,7 +249,7 @@ podman run --network host \
ghcr.io/linuxsuren/api-testing:master atest-store-git
```

See also the expected configuration below:
Have a look at the expected configuration below:

```yaml
- name: git
Expand All @@ -261,7 +264,7 @@ See also the expected configuration below:
```

## Secret Server
You can put the sensitive information into a secret server. For example, [Vault](https://www.github.com/hashicorp/vault).
You can put sensitive information into a secret server. For example, [Vault](https://www.github.com/hashicorp/vault).

Connect to [a vault extension](https://github.com/LinuxSuRen/api-testing-secret-extension) via flag: `--secret-server`. Such as:

Expand All @@ -270,16 +273,16 @@ atest server --secret-server localhost:7073
```

## Extensions
Developers could have storage, secret extensions. Implement a gRPC server according to [loader.proto](../pkg/testing/remote/loader.proto) is required.
Developers can have storage, secret extensions. Implementing a gRPC server according to [loader.proto](../pkg/testing/remote/loader.proto) is required.

## Official Images
You could find the official images from both [Docker Hub](https://hub.docker.com/r/linuxsuren/api-testing) and [GitHub Images](https://github.com/users/LinuxSuRen/packages/container/package/api-testing). See the image path:
You can find the official images from both [Docker Hub](https://hub.docker.com/r/linuxsuren/api-testing) and [GitHub Images](https://github.com/users/LinuxSuRen/packages/container/package/api-testing). 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.
The tag `latest` represents the latest release version. The tag `master` represents the image of the latest master branch. We highly recommend you to use a fixed version instead of those in a production environment.

## Release Notes
* [v0.0.13](release-note-v0.0.13.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/prometheus.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Push the test results into Prometheus
## Pushing the test results into Prometheus

You can use the following command to do it:

Expand All @@ -10,7 +10,7 @@ atest run --report prometheus --report-file http://localhost:9091 \
It will push the test results data into Prometheus [PushGateway](https://github.com/prometheus/pushgateway).
Then Prometheus could get the metrics from it.

skip the following instructions if you are familiar with Prometheus:
Skip the following instructions if you are familiar with Prometheus:
```shell
docker run \
-p 9090:9090 \
Expand Down