Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Jun 18, 2021
1 parent f3ccb92 commit b556b7d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Read this in other languages: [中文](./README.zh-CN.md)
- [Installation](#installation)
- [Get Started](#get-started)
- [Features](#features)
- [Cross Platform, Programming Language Agnostic](#cross-platform-programming-language-agnostic)
- [JSON-like DSL](#json-like-dsl)
- [JSONA DSL](#jsona-dsl)
- [Data Is Assertion](#data-is-assertion)
- [Data Is Accessable](#data-is-accessable)
- [Support Mock](#support-mock)
Expand Down Expand Up @@ -134,11 +133,7 @@ main

## Features

### Cross Platform, Programming Language Agnostic

Apitest is a command line tool that supports linux, windows, mac systems. Its own test cases are written using DSL and do not rely on specific language experience.

### JSON-like DSL
### JSONA DSL

Use JSON-like DSL to write tests. The document is the test.

Expand Down Expand Up @@ -175,6 +170,13 @@ Click [jsona/spec](https://github.com/jsona/spec) to view the JSONA specificatio

> By the way, there is a vscode extension supports DSL (jsona) format.
Why use JSONA?

The essence of api testing is to construct and send `req` data, and receive and verify `res` data. Data is both the main body and the core, and JSON is the most readable and universal data description format.
Api testing also requires some specific logic. For example, a random number is constructed in the request, and only part of the data given in the response is checked.

JSONA = JSON + Annotation. JSON is responsible for the data part, and annotations are responsible for the logic part. Perfectly fit the interface test requirements.

### Data Is Assertion

How to understand? See below.
Expand Down
15 changes: 8 additions & 7 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Apitest 是一款使用类JSON的DSL编写测试用例的自动化测试工具
- [安装](#安装)
- [开始使用](#开始使用)
- [特性](#特性)
- [跨平台,跨编程语言](#跨平台跨编程语言)
- [JSON-DSL](#json-dsl)
- [JSONA-DSL](#jsona-dsl)
- [数据即断言](#数据即断言)
- [数据可访问](#数据可访问)
- [支持Mock](#支持mock)
Expand Down Expand Up @@ -136,11 +135,7 @@ main

## 特性

### 跨平台,跨编程语言

Apitest 是一款命令行工具,支持linux,windows,mac系统。本身的测试用例使用DSL编写,不依赖特定语言经验。

### JSON-DSL
### JSONA-DSL

使用类JSON的DSL编写测试。文档即测试。

Expand Down Expand Up @@ -177,6 +172,12 @@ Apitest 的工作原理就是根据`req`部分的描述构造请求传给后端

> 顺便说一句,有款vscode插件提供了DSL(jsona)格式的支持哦。
为什么使用JSONA?

接口测试的本质的就是构造并发送`req`数据,接收并校验`res`数据。数据即是主体又是核心,而JSON是最可读最通用的数据描述格式。
接口测试还需要某些特定逻辑。比如请求中构造随机数,在响应中只校验给出的部分数据。

JSONA = JSON + Annotation(注解)。JSON负责数据部分,注解负责逻辑部分。完美的贴合接口测试需求。

### 数据即断言

Expand Down

0 comments on commit b556b7d

Please sign in to comment.