-
Notifications
You must be signed in to change notification settings - Fork 0
/
group01.postman_collection.json
89 lines (89 loc) · 1.87 KB
/
group01.postman_collection.json
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"info": {
"_postman_id": "eb4952a6-e119-48d6-9633-91e80d4ce423",
"name": "group01",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "step 1",
"event": [
{
"listen": "test",
"script": {
"id": "8c709fb1-d54b-4f52-b2a5-0351c2beb268",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"Response time is less than 5000ms\", function () {",
" pm.expect(pm.response.responseTime).to.be.below(5000);",
"});",
"",
"pm.test(\"Your test name\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.length).to.eql(10);",
" pm.expect(jsonData[0].address.zipcode).to.eql('92998-3874');",
" pm.globals.set(\"data\", jsonData[0].address.zipcode);",
"});",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://jsonplaceholder.typicode.com/users",
"protocol": "https",
"host": [
"jsonplaceholder",
"typicode",
"com"
],
"path": [
"users"
]
}
},
"response": []
},
{
"name": "step 2",
"event": [
{
"listen": "test",
"script": {
"id": "14030faf-4907-423d-916a-f81df912f53f",
"exec": [
"pm.globals.get(\"data\");"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://jsonplaceholder.typicode.com/users",
"protocol": "https",
"host": [
"jsonplaceholder",
"typicode",
"com"
],
"path": [
"users"
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
}