Skip to content

Commit

Permalink
docs: update README and add cts_refer doc
Browse files Browse the repository at this point in the history
Signed-off-by: daz-3ux <[email protected]>
  • Loading branch information
Daz-3ux committed Sep 18, 2023
1 parent df96fe7 commit 420a7b7
Show file tree
Hide file tree
Showing 3 changed files with 319 additions and 14 deletions.
16 changes: 10 additions & 6 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
pip3 install -r requirements.txt
```

# 可测试命令

CTS 可以测试的命令及其对应的版本信息可参考[此表](cts_refer.md)

# 如何使用

一些命令行支持的参数如下所示:
Expand Down Expand Up @@ -93,12 +97,12 @@ Visit http://localhost:8000 for the report.
```
整体上是一个 JSON数组,包含多条测试 case,每一个都是 JSON Object,`command``result`是一一对应的。除过上述示例中的字段,还有一些字段如下:

|name|value| 含义 |
|---|---|-----------------------------|
|tags|standalone,cluster| 只在tags指定的模式下才允许此case |
|skipped|true| 跳过此case |
|command_binary|true| 将命令转为二进制,例如命令中包含非可见的ascii字符 |
|sort_result|true| 对返回结果进行排序 |
| name | value | 含义 |
|----------------|--------------------|-----------------------------|
| tags | standalone,cluster | 只在tags指定的模式下才允许此case |
| skipped | true | 跳过此case |
| command_binary | true | 将命令转为二进制,例如命令中包含非可见的ascii字符 |
| sort_result | true | 对返回结果进行排序 |

### 使用别的编程语言使用此工具
本项目的主要工作是我们在 `cts.json`中增加了超过 7000 行测试,如果您希望用别的编程语言(例如 Java, Go, Rust等)实现相同功能的测试工具,那么您只需要解析 `cts.json` 的格式,并且将测试依次执行即可,玩的愉快。
Expand Down
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![4.0](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/4.0.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/4.0.yaml) [![5.0](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/5.0.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/5.0.yaml) [![6.0](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.0.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.0.yaml) [![6.2](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.2.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/6.2.yaml) [![7.0](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.0.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.0.yaml) [![7.2](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.2.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/7.2.yaml) [![unstable](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/unstable.yaml/badge.svg)](https://github.com/tair-opensource/compatibility-test-suite-for-redis/actions/workflows/unstable.yaml)

compatibility-test-suite-for-redis is used to test whether your redis-like database is compatible with Redis versions (such as
compatibility-test-suite-for-redis(CTS) is used to test whether your redis-like database is compatible with Redis versions (such as
6.0, 7.0, etc.) [中文文档](README-CN.md)

# Install
Expand All @@ -13,6 +13,10 @@ requires `Python 3.7` or later.
pip3 install -r requirements.txt
```

# Testable Commands

Refer to [this table](cts_refer.md) for the commands that CTS can test and their corresponding version information.

# How to use

```
Expand Down Expand Up @@ -71,7 +75,7 @@ connecting to 127.0.0.1:6379 using standalone client
...
Visit http://localhost:8000 for the report.
```
Then, an Http Server will be started on http://localhost:8000 by default, and you can access it to get reports.
Then, a Http Server will be started on http://localhost:8000 by default, and you can access it to get reports.

## More uses

Expand All @@ -95,12 +99,12 @@ When you need to migrate the business system from A database to B, in order to p
```
Overall, it is a JSON array, containing multiple test cases, each of which is a JSON Object, and `command` and `result` are in one-to-one correspondence. In addition to the fields in the example, there are some as follows:

| name | value |meaning|
|---|-----------------------|---|
| tags | standalone or cluster |This case is only allowed in the mode specified by tags|
| skipped | true |skip this case|
| command_binary | true |Convert the command to binary, such as the command contains non-visible ascii characters|
| sort_result | true |Sort the returned results|
| name | value | meaning |
|----------------|-----------------------|------------------------------------------------------------------------------------------|
| tags | standalone or cluster | This case is only allowed in the mode specified by tags |
| skipped | true | skip this case |
| command_binary | true | Convert the command to binary, such as the command contains non-visible ascii characters |
| sort_result | true | Sort the returned results |

### Test with another programming language
The main work of this project is that we have added more than 7000 lines of tests in `cts.json`, if you want to implement tests in other programming languages (such as Java, Go, Rust, etc.), then you only need to parse `cts.json ` format, and execute the tests sequentially, have fun.
Expand Down
Loading

0 comments on commit 420a7b7

Please sign in to comment.