@@ -107,21 +107,21 @@ describe('TODO api testing', () => {
107107
108108``` yaml
109109---
110- - name : fetches TODO items - GET
110+ - title : fetches TODO items - GET
111111 GET : /todos/
112112 asserts : # Asserts accepts a list of expressions, usually via json_paths to identify the items being refered to.
113113 ok : $.resp.status == 200 # Rely on an expressions libray for parsing expressions
114114 array : $.resp.json
115115 exports : # values which should be accesible to future steps.
116116 todoItem : $.resp.json[0]._id
117117
118- - name : deletes TODO items - DELETE
118+ - title : deletes TODO items - DELETE
119119 DELETE : /todos/$.stages[0].todoItem # relative syntax exists: $.stages[-1].todoItem, -1 means one stage before me
120120 asserts :
121121 empty : $.resp.json.todos
122122 string : $.resp.json
123123
124- - name : Adds Todo item - POST
124+ - title : Adds Todo item - POST
125125 POST : /todos/
126126 json :
127127 task : " run tests"
@@ -137,21 +137,21 @@ describe('TODO api testing', () => {
137137
138138` ` ` yaml
139139---
140- - name : fetches TODO items - GET
140+ - title : fetches TODO items - GET
141141 GET: /todos/
142142 asserts:
143143 ok: $.resp.status == 200
144144 array: $.resp.json
145145 exports:
146146 todoItem: $.resp.json[0]._id
147147
148- - name : deletes TODO items - DELETE
148+ - title : deletes TODO items - DELETE
149149 DELETE: /todos/$.stages[0].todoItem
150150 asserts:
151151 empty: $.resp.json.todos
152152 string: $.resp.json
153153
154- - name : Adds Todo item - POST
154+ - title : Adds Todo item - POST
155155 POST: /todos/
156156 json:
157157 task: "run tests"
@@ -200,11 +200,11 @@ The `request` field in `testkit` defines the API request to be made and consists
200200
201201 ` ` ` yaml
202202 # POST request
203- - name : Adds Todo item - POST
203+ - title : Adds Todo item - POST
204204 POST: /todos/
205205
206206 # GET request
207- - name : Fetches Todo items - GET
207+ - title : Fetches Todo items - GET
208208 GET: /todos/
209209 ` ` `
210210
@@ -213,7 +213,7 @@ The `request` field in `testkit` defines the API request to be made and consists
213213 Example :
214214
215215 ` ` ` yaml
216- - name : Fetches Todo items - GET with headers
216+ - title : Fetches Todo items - GET with headers
217217 GET: /todos/
218218 headers:
219219 Authorization: Bearer <token>
@@ -228,7 +228,7 @@ The `request` field in `testkit` defines the API request to be made and consists
228228 Here's an example illustrating the usage of the `json` property :
229229
230230 ` ` ` yaml
231- - name : Create User - POST
231+ - title : Create User - POST
232232 POST: /users/
233233 json:
234234 name: John Doe
@@ -251,7 +251,7 @@ The `asserts` field accepts a collection of key-value pairs, where the keys repr
251251Here's an example to demonstrate the usage of the `asserts` field :
252252
253253` ` ` yaml
254- - name : Fetches Todo items - GET
254+ - title : Fetches Todo items - GET
255255 GET: /todos/
256256 asserts:
257257 ok: $.resp.status == 200
@@ -294,7 +294,7 @@ To use the `exports` field, you define key-value pairs where the keys represent
294294Here's an example that demonstrates the usage of the `exports` field :
295295
296296` ` ` yaml
297- - name : Fetches Todo items - GET
297+ - title : Fetches Todo items - GET
298298 GET: /todos/
299299 exports:
300300 todoItem: $.resp.json[0]._id
@@ -317,7 +317,7 @@ By capturing relevant data using the `exports` field, you can store it as an exp
317317For example, let's say you retrieve an ID from an API response in one stage using the `exports` field :
318318
319319` ` ` yaml
320- - name : Fetch User - GET
320+ - title : Fetch User - GET
321321 GET: /users/1
322322 exports:
323323 userId: $.resp.body.id
@@ -326,7 +326,7 @@ For example, let's say you retrieve an ID from an API response in one stage usin
326326To reference this `userId` export in a subsequent API request, you can use the `$.stages[n].<VAL>` syntax :
327327
328328` ` ` yaml
329- - name : Update User - PUT
329+ - title : Update User - PUT
330330 PUT: /users/$.stages[0].userId
331331 json:
332332 name: 'John Doe'
@@ -338,7 +338,7 @@ You can also use relative references like `$.stages[-n]` which refers to the `ex
338338Example :
339339
340340` ` ` yaml
341- - name : deletes TODO items - DELETE
341+ - title : deletes TODO items - DELETE
342342 DELETE: /todos/$.stages[-1].todoItem #-1 means one stage before me
343343 asserts:
344344 string: $.resp.json.task
@@ -353,7 +353,7 @@ To make date assertions in Testkit you'll need to provided the date string and t
353353Example :
354354
355355` ` ` yaml
356- - name : Get User Profile - GET
356+ - title : Get User Profile - GET
357357 GET: /user/jon_doe
358358 asserts:
359359 date: $.resp.json.createdAt %Y-%m-%d %H:%M:%S %Z
@@ -423,7 +423,7 @@ To utilize environment variables in Testkit, you can access them using the follo
423423Example :
424424
425425` ` ` yaml
426- - name : Register
426+ - title : Register
427427 POST: '$.env.APIURL/users'
428428 headers:
429429 Content-Type: application/json
0 commit comments