-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28a32a0
commit b244927
Showing
11 changed files
with
125 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...site/content/zh/latest/releases/_index.md → docs/site/content/zh/releases/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: "版本" | ||
title: "版本发布" | ||
weight: 90 | ||
description: 本节内容包含 API Testing 的版本概述。 | ||
--- |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
+++ | ||
title = "v0.0.18" | ||
+++ | ||
|
||
`atest` 发布 `v0.0.18` | ||
|
||
`atest` 是致力于帮助开发者持续保持高质量 API 的开源接口工具。 | ||
|
||
你可以在命令行终端或者容器中启动: | ||
|
||
```shell | ||
docker run -p 8080:8080 ghcr.io/linuxsuren/api-testing:v0.0.18 | ||
``` | ||
|
||
## 亮点 | ||
|
||
* 在开源之夏 2024 中 `atest` 增加了基于 MySQL 的测试用例历史的支持 | ||
* HTTP API Mock 功能的支持 | ||
|
||
在日常的系统、平台开发过程中,往往会采用前后端分离的方式进行开发。在后端 API 还没有开发完成、稳定并且部署到一个公共的集成测试环境的情况下,前端研发往往会采用**写死**数据的方式进行页面的开发。等后端研发开发完成后,通常会有一个所谓的**联调**的环节;这时候,可能会遇到如下几个问题: | ||
|
||
* 前端数据结构、页面、逻辑需要调整并重新测试 | ||
* 看到实际的页面时,可能会才发现后端数据结构、API 的请求与响应需要调整 | ||
|
||
在糟糕的情况下,前后端联调可能会消耗掉超出预期很多的时间。 `atest` 提供了 HTTP API Mock 功能,可以更好的解决这个问题。 | ||
|
||
在进行设计评审的时候,我们就可以根据 API 设计给出对应的 Mock 服务配置,从而可以快速地模拟出后端 API 的响应数据。例如: | ||
|
||
```yaml | ||
objects: | ||
- name: users | ||
sample: | | ||
{ | ||
"name": "LinuxSuRen", | ||
"age": 18 | ||
"gender": "male" | ||
} | ||
proxies: | ||
- path: /api/v1/projects/{projectID} | ||
target: http://localhost:8080 | ||
``` | ||
把上面的内容放到 `mock.yaml` 文件中,然后使用 `atest mock --prefix /api/v1 --port 6060 mock.yaml` 命令即可启动一个 HTTP Mock 服务。 | ||
|
||
此时,Mock 服务就会把**代理**模块指定的 API 转发到已有服务的的接口上,并同时提供了 `users` 对象的增删查改(CRUD)的标准 API。你可以用 `atest` 或者 `curl` 命令来调用这些 API。 | ||
|
||
```shell | ||
curl -X POST -d '{"name": "Rick"}' http://localhost:6060/api/v1/users | ||
curl -X GET http://localhost:6060/api/v1/users | ||
curl -X PUT -d '{"name": "Rick", "age": 20}' http://localhost:6060/api/v1/users/Rick | ||
curl -X GET http://localhost:6060/api/v1/users/Rick | ||
curl -X DELETE http://localhost:6060/api/v1/users/Rick | ||
``` | ||
|
||
非常期待 `atest` 可以帮助更多的项目持续提升、保持 API 稳定性。 | ||
|
||
## 🚀 主要的新功能 | ||
|
||
* Mock 功能的增强,包含对象、原始、代理三种模式 (#552) @LinuxSuRen | ||
* 支持重命名测试用例、测试集 (#550) @LinuxSuRen | ||
* 支持给定频率下重复执行测试用例 (#548) @LinuxSuRen | ||
* 下载插件文件时显示进度信息 (#544) @LinuxSuRen | ||
* 支持生成随机图片并上传 (#541) @LinuxSuRen | ||
* 支持上传嵌入式文件(基于 base64 编码) (#538) @LinuxSuRen | ||
* 支持导入其他 atest 实例的用例数据 (#539) @LinuxSuRen | ||
* UI 上显示响应体的大小 (#536) @LinuxSuRen | ||
* 增加基于 MySQL 位存储的测试用例执行历史记录 (#524) @SamYSF | ||
* 支持设置插件下载的“前缀”信息 (#532) @SamYSF | ||
* 优化存储插件管理界面 (#518) @LinuxSuRen | ||
* 在 UI 上增加快捷键支持 (#510) @LinuxSuRen | ||
* 重构 API 风格为 restFul (#497) @LinuxSuRen | ||
* 增加 Mock 配置的 JSON schema (#499) @LinuxSuRen | ||
* 增加了对 JSON 兼容性的响应格式的支持 (#496) @LinuxSuRen | ||
|
||
## 🐛 缺陷修复 | ||
|
||
* 修复测试用例重复时被覆盖的问题 (#531) @LinuxSuRen | ||
|
||
## 致谢 | ||
|
||
本次版本发布,包含了以下 3 位 contributor 的努力: | ||
|
||
* [@LinuxSuRen](https://github.com/LinuxSuRen) | ||
* [@SamYSF](https://github.com/SamYSF) | ||
* [@yuluo-yx](https://github.com/yuluo-yx) | ||
|
||
## 相关数据 | ||
|
||
下面是 `atest` 截止到 `v0.0.18` 的部分数据: | ||
|
||
* watch 9 | ||
* fork 50 | ||
* star 249 (+40) | ||
* contributor 25 (+1) | ||
* 二进制文件下载量 6.3k (+3.2k) | ||
* 部分镜像 6.4k (+0.9k) | ||
* 单元测试覆盖率 76% (+2%) | ||
|
||
想了解完整信息的话,请访问 https://github.com/LinuxSuRen/api-testing/releases/tag/v0.0.18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters