-
Notifications
You must be signed in to change notification settings - Fork 0
/
acceptance.postman.json
64 lines (63 loc) · 1.61 KB
/
acceptance.postman.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
{
"info": {
"name": "Simple AT on the TODO API",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
"description": "A sample collection to test the TODO API"
},
"item": [{
"name": "Create a new item",
"event": [{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('expect response be 200', function () {",
" pm.response.to.be.ok",
"})",
"pm.test('expect response json contain id', function () {",
" pm.expect(pm.response.json()).to.have.property('id')",
"})",
"pm.environment.set(\"id\", pm.response.json().id)"
]
}
}],
"request": {
"url": "http://{{targetHost}}:8080/todos/add?item=text",
"method": "POST"
}
},{
"name": "Mark the item as done",
"event": [{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('expect response be 200', function () {",
" pm.response.to.be.ok",
"})"
]
}
}],
"request": {
"url": "http://{{targetHost}}:8080/todos/done?id={{id}}",
"method": "POST"
}
},{
"name": "Remove the item",
"event": [{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
"pm.test('expect response be 200', function () {",
" pm.response.to.be.ok",
"})"
]
}
}],
"request": {
"url": "http://{{targetHost}}:8080/todos/remove?id={{id}}",
"method": "POST"
}
}]
}