/
DemoCollection.postman_collection.json
58 lines (58 loc) · 1.38 KB
/
DemoCollection.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
{
"info": {
"_postman_id": "50c9ef84-27b8-4baa-a941-f68a39d2cef8",
"name": "DemoCollection",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Demo_GET",
"event": [
{
"listen": "test",
"script": {
"id": "6d0f9aa7-59e4-4182-8ede-7661409a92e9",
"exec": [
"pm.test(\"Status code is 200\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"var ExpName = pm.variables.get(\"name\");",
"var ExpEmail = pm.variables.get(\"email\");",
"",
"pm.test(\"Verify if id -> 1 has the name as Leanne Graham\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.name).to.eql(ExpName);",
"});",
"",
"pm.test(\"Verify if id -> 1 has the email as Sincere@april.biz\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.email).to.eql(ExpEmail);",
"});"
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": ""
},
"url": {
"raw": "{{POSTURL}}",
"host": [
"{{POSTURL}}"
]
}
},
"response": []
}
],
"protocolProfileBehavior": {}
}