开源 API 测试工具。开源接口调试、测试工具。Mock Server
English | 中文
This is an awesome API testing tool.
Install it via hd or download from releases:
hd install atestor, you can install it in Kubernetes. See also the manifests.
see the following usage:
…below is an example of the usage, and you could see the report as well:
atest run -p sample/testsuite-gitlab.yaml --duration 1m --thread 3 --report md
| API | Average | Max | Min | Count | Error |
|---|---|---|---|---|---|
| GET https://gitlab.com/api/v4/projects | 1.152777167s | 2.108680194s | 814.928496ms | 99 | 0 |
| GET https://gitlab.com/api/v4/projects/45088772 | 840.761064ms | 1.487285371s | 492.583066ms | 10 | 0 |
| consume: 1m2.153686448s |
Use atest as server mode in Docker, then you could visit the UI from 8080:
docker run --pull always -p 8080:8080 ghcr.io/linuxsuren/api-testing:masterUse atest-collector in Docker:
docker run -p 1234:8080 -v /var/tmp:/var/tmp \
ghcr.io/linuxsuren/api-testing atest-collector \
--filter-path /api \
-o /var/tmp/sample.yaml
# you could find the test cases file from /var/tmp/sample
# cat /var/tmp/sampleThe following fields are templated with sprig:
You could use all the common functions which comes from sprig. Besides some specific functions are available:
| Name | Usage |
|---|---|
randomKubernetesName |
{{randomKubernetesName}} to generate Kubernetes resource name randomly, the name will have 8 chars |
sleep |
{{sleep(1)}} in the pre and post request handle |
It could verify any kinds of Kubernetes resources. Please set the environment variables before using it:
KUBERNETES_SERVERKUBERNETES_TOKENSee also the example.
Feel free to talk to us about any questions you may have about API Testing in the following ways.
[email protected], Feel free to discuss everything related to API Testing via this mailing list.
GitHub discussion暂无开放 Issues,或尚未同步最近议题。