-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStatisticsService.postman_collection.json
More file actions
73 lines (73 loc) · 1.9 KB
/
StatisticsService.postman_collection.json
File metadata and controls
73 lines (73 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"info": {
"_postman_id": "929b8ecb-37eb-4584-a0e4-7ca256b2f6c0",
"name": "StatisticsService",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "29410217"
},
"item": [
{
"name": "Get current user count",
"event": [
{
"listen": "test",
"script": {
"exec": [
"\r",
"pm.test(\"Response status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"\r",
"pm.test(\"Response has the required fields\", function () {\r",
" const responseData = pm.response.json();\r",
"\r",
" pm.expect(responseData).to.be.an('object');\r",
" pm.expect(responseData).to.have.property('count');\r",
"});\r",
"\r",
"\r",
"pm.test(\"Count is a non-negative integer\", function () {\r",
" const responseData = pm.response.json();\r",
" \r",
" pm.expect(responseData).to.be.an('object');\r",
" pm.expect(responseData.count).to.be.a('number').and.to.be.at.least(0);\r",
"});\r",
"\r",
"\r",
"pm.test(\"Content-Type header is application/json\", function () {\r",
" pm.expect(pm.response.headers.get(\"Content-Type\")).to.include(\"application/json\");\r",
"});\r",
"\r",
"\r",
"pm.test(\"Response body is not empty\", function () {\r",
" const responseData = pm.response.json();\r",
" \r",
" pm.expect(responseData).to.not.be.empty;\r",
"});\r",
"\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:5177/userCount",
"protocol": "http",
"host": [
"localhost"
],
"port": "5177",
"path": [
"userCount"
]
}
},
"response": []
}
]
}