File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,31 +130,43 @@ curl -i http://localhost:1234/users
130130```http
131131HTTP/1.1 200 OK
132132Content-Type: application/json; charset=utf-8
133- Date: Fri, 12 Mar 2021 05:59:12 GMT
133+ Date: Sat, 13 Mar 2021 13:28:48 GMT
134134Content-Length: 459
135135
136- [{
137- "id": "30160f4c-a4ee-420b-ba61-fb0f78a3e312",
138- "name": "Mary",
139- "title": "",
140- "price": 0,
141- "weight": 60.5,
142- "available": true
143- }, {
144- "id": "04c7aca2-c27b-4ff1-8756-1bdf57ab7993",
145- "name": "Benjamin",
146- "title": "",
147- "price": 0,
148- "weight": 65,
149- "available": true
150- }, {
151- "id": "51784d48-4abd-4f01-83df-4cd43869027c",
152- "name": "Lee",
153- "title": "",
154- "price": 0,
155- "weight": 50.8,
156- "available": false
157- }]
136+ [
137+ {
138+ "age" : 18,
139+ "id" : "732e930c-59ce-4087-b509-6288b5d2d6c5",
140+ "stature" : 180,
141+ "weight" : 62.5,
142+ "name" : "Jack",
143+ "available" : true
144+ },
145+ {
146+ "age" : 25,
147+ "id" : "30160f4c-a4ee-420b-ba61-fb0f78a3e312",
148+ "stature" : 175,
149+ "weight" : 60.5,
150+ "name" : "Mary",
151+ "available" : true
152+ },
153+ {
154+ "age" : 32,
155+ "id" : "04c7aca2-c27b-4ff1-8756-1bdf57ab7993",
156+ "stature" : 185,
157+ "weight" : 65,
158+ "name" : "Benjamin",
159+ "available" : true
160+ },
161+ {
162+ "age" : 15,
163+ "id" : "51784d48-4abd-4f01-83df-4cd43869027c",
164+ "stature" : 160,
165+ "weight" : 50.799999999999997,
166+ "name" : "Lee",
167+ "available" : false
168+ }
169+ ]
158170```
159171
160172接下来我们来看在`httptester`中如何来写断言。
@@ -210,3 +222,8 @@ httptester run --method 'POST' -u 'http://localhost:1234/users' \
210222
211223`-e`表示如果出现失败或报错,将错误信息打印出来
212224
225+
226+
227+ ---
228+ 如果对这个小工具感兴趣,欢迎给我点赞。
229+ 如果有任何问题或建议,也欢迎给在此项目中给我提issue或者pull request。
You can’t perform that action at this time.
0 commit comments