菜谱流程.yml
1.97 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
74
75
- config:
name: "菜谱流程"
request:
base_url: http://dc1.colorcun.com:10005?s=
- test:
name: 根据商家ID获取菜谱信息
request:
url: App.Menu.GetMenuLists
method: POST
data:
sellerid: 9
validate:
- eq: ["content.ret", 200]
- test:
name: 添加菜谱(正确操作)
variable_binds:
- name: "菜谱测试1"
- sellerid: "9"
- type: "1"
- status: "1"
- image: "/Users/orange/cover.jpeg"
- multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,status=$status,image=$image)}
request:
url: App.Menu.AddMenu
method: POST
headers:
Content-Type: ${get_content_type($multipart_encoder)}
data: $multipart_encoder
extract:
- menu_id: content.data.id
validate:
- eq: ["content.ret", 200]
#根据菜谱ID获取关联菜品数量
- test:
name: 根据菜谱ID获取关联菜品数量(有关联菜品)
request:
url: App.Menu.GetCookBookNumByMenuId
method: POST
data:
id: $menu_id
validate:
- eq: ["content.ret", 200]
#根据菜谱ID获取菜谱基本信息
- test:
name: 根据菜谱ID获取菜谱基本信息(正确操作)
request:
url: App.Menu.GetMenuById
method: POST
data:
id: $menu_id
extract:
- class_id: content.data[0].id
validate:
- eq: ["content.ret", 200]
#获取菜品分类
- test:
name: 获取菜品分类(正确操作)
request:
url: App.Cookbook.GetCookbookClassBySellerId
method: POST
data:
Sellerid: 1
validate:
- eq: ["content.ret", 200]
#获取分类下所有菜品
- test:
name: 获取分类下所有菜品(正确操作)
request:
url: App.Cookbook.GetCookbookByClassId
method: POST
data:
ClassId: 1
validate:
- eq: ["content.ret", 200]