-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from calloc134/docs/20230907-docs
Docs/20230907 docs
- Loading branch information
Showing
6 changed files
with
116 additions
and
240 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
# Data Structure | ||
|
||
|
||
Data file is a json file that contains the data used in the test cases. | ||
Each data supports multiple test cases. | ||
|
||
```json | ||
{ | ||
"no_login/ApiUserMe(GET)": [ | ||
{ | ||
"body": { | ||
"handle": "johndoe2", | ||
"password": "Password123@" | ||
}, | ||
"query": { | ||
"handle": "johndoe2" | ||
}, | ||
"expect_status": 200 | ||
} | ||
], | ||
(...) | ||
} | ||
``` | ||
|
||
### body | ||
The body of the request. | ||
Type: `object` | ||
|
||
### query | ||
The query of the request. | ||
Type: `object` | ||
|
||
### expect_status | ||
The expected status code of the response. | ||
This status code is used to determine whether the test case is passed or failed. | ||
Type: `number` |
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,59 @@ | ||
--- | ||
sidebar_position: 5 | ||
--- | ||
|
||
# Output | ||
|
||
```json | ||
{ | ||
"base_url": "http://localhost", | ||
"results": [ | ||
{ | ||
"name": "no_login/ApiUserMe(DELETE)[0]", | ||
"category": "no_login", | ||
"status": "success", | ||
"duration": 0.0126284, | ||
"message": "success (status: 401 Unauthorized, expect status: 401)" | ||
}, | ||
(...) | ||
] | ||
} | ||
``` | ||
|
||
## base_url | ||
|
||
The base url of the api server. | ||
Type: `string` | ||
|
||
## results | ||
|
||
An array that stores the test results. | ||
Type: `array` | ||
|
||
Each element in the results array is as follows. | ||
|
||
### name | ||
|
||
The name of the step. | ||
Type: `string` | ||
|
||
### category | ||
|
||
The category to which the step belongs. | ||
Type: `string` | ||
|
||
### status | ||
|
||
Indicates the result of the step. | ||
Takes one of the values `success` or `failure`. | ||
Type: `string` | ||
|
||
### duration | ||
|
||
Indicates the execution time of the step. | ||
Type: `float` | ||
|
||
### message | ||
|
||
Indicates the message of the step. | ||
Type: `string` |
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