You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -164,11 +164,11 @@ Folder to store required functions or methods for global use. Default will be fi
164
164
165
165
### /tests/pages
166
166
167
-
Folder to store the detail request of each API. For detailed explanation, you can go to [Pages](pages.md) section.
167
+
Folder to store the detail request of each API. For detailed explanation, you can go to [Pages](#pages) section.
168
168
169
169
### /tests/scenarios
170
170
171
-
Folder to store your test files. It is linked closely with pages file, especially with the same name files. For detailed explanation, you can go to [Scenarios](scenarios.md) section.
171
+
Folder to store your test files. It is linked closely with pages file, especially with the same name files. For detailed explanation, you can go to [Scenarios](#scenarios) section.
172
172
173
173
### /tests/schema
174
174
@@ -288,7 +288,7 @@ module.exports = () => {
288
288
289
289
How it's done:
290
290
- since the `pages` file consist a class, you can create a new object from the class to use the defined method
291
-
- to build request specification and execute the request, you may use the `request()` method defined in [`pages`](pages.md) file
291
+
- to build request specification and execute the request, you may use the `request()` method defined in [`pages`](#pages) file
292
292
293
293
7. For response validation, the template create 2 default validations, which are:
294
294
- status code
@@ -343,8 +343,8 @@ The difference with requests that do not have a body are, except the default tem
343
343
| Key | Required | Definition |
344
344
| ------------- | ------------- | ---- |
345
345
|<i>ddt</i>|`true`| object to store the combination of one data test|
346
-
|<i>example</i>|`false`|`example` key and `value_key` value is the example of key-value usage if you want to change the value of specified key from body request. <br><br>if you do not specify this key-value, the request will be executed with the default request defined in [`pages`]() file. |
347
-
|<i>attachment</i>|`false`|`attachment` is a key that stored object with key-value of body request that needs to attach some files and needs to change the default of request defined in`pages` file |
346
+
|<i>example</i>|`false`|`example` key and `value_key` value is the example of key-value usage if you want to change the value of specified key from body request. <br><br>if you do not specify this key-value, the request will be executed with the default request defined in [`pages`](#pages) file. |
347
+
|<i>attachment</i>|`false`|`attachment` is a key that stored object with key-value of body request that needs to attach some files and needs to change the default of request defined in[`pages`](#pages) file |
348
348
|<i>file</i>|`true`if you use `attachment` key |`file` is example of key from body request that stores the file attachment and you want to configure the value of file <br><br> you may configure the key based on your request API and the value based on the path where your file is stored (relative to your local project directory path) |
349
349
|<i>response</i>|`true`|`response` is a key that stored object with key-value of general configurations of each data test, which are the testcase name and the expected validation<br><br> you can configure the key-value inside object based on your needs, whether you need the default key (`case`, `schema`, `status`) or maybe you need other key-value, e.g `message`|
350
350
@@ -381,7 +381,7 @@ The difference with requests that do not have a body are, except the default tem
381
381
382
382
Except for the `datas.response.case` and `datas.ddt` mapping, you can configure the mapping freely based on the `data` variable you set up
383
383
384
-
P.S: You can see the detailed implementation in [Implementation]() page
384
+
P.S: You can see the detailed implementation in [Implementation](#implementation) page
385
385
386
386
387
387
## Pages
@@ -437,7 +437,7 @@ The template defines some general things, which are:
437
437
Furthermore, it will be used to get the defined response JSON body.
438
438
2. `class request{}`
439
439
440
-
This is the main content of page file. It will consist some default methods that will be explained below. If you want to use these methods, you can create a new object in your [`scenarios`](scenarios.md) file.
440
+
This is the main content of page file. It will consist some default methods that will be explained below. If you want to use these methods, you can create a new object in your [`scenarios`](#scenarios) file.
441
441
442
442
Code section:
443
443
```js
@@ -696,7 +696,7 @@ For detailed explanation:
696
696
697
697
- `attaches` variable - for file type data - you may ignore this section
698
698
699
-
If `data` variable is storing the text type data, `attaches` variable stores the file type data. If you read the [scenarios](scenarios.md#default-templates-with-body-request) section, it will get the object data of `attachment` keys.
699
+
If `data` variable is storing the text type data, `attaches` variable stores the file type data. If you read the [scenarios](#default-templates-with-body-request) section, it will get the object data of `attachment` keys.
700
700
701
701
Later, this variable will be used as an argument in `this.attach(attaches)` code section. For each key-value of file-type body request, it will be mapped to chai syntax `.attach()`.
0 commit comments