Commit f2b0f333ad3eca0e86fc71d106510c96f2a2b807

Authored by yangfan
1 parent 0aa01eca

商家服务数据清理

... ... @@ -5,383 +5,6 @@ import json
reload(sys)
sys.setdefaultencoding('utf8')
def get_data(name, phone, map_address, longPoint, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_data_noname(phone, map_address, longPoint, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'phone': phone,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_data_nophone(name, map_address, longPoint, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_data_nomapaddress(name, phone, longPoint, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'phone': phone,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_data_nofile(name, phone, map_address, longPoint, latPoint, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_data_noimage(name, phone, map_address, longPoint, latPoint, filePath):
m = MultipartEncoder(
fields={
'name': name,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg')
}
)
return m
def get_data_nolong(name, phone, map_address, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'phone': phone,
'map_address': map_address,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_data_nolat(name, phone, map_address, longPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_content_type(data):
return data.content_type
def set_data(sellerid, name, phone, map_address, longPoint, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'id': sellerid,
'name': name,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_data_noid(name, phone, map_address, longPoint, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_data_noname(sellerid, phone, map_address, longPoint, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'id': sellerid,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_data_nophone(sellerid, name, map_address, longPoint, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'id': sellerid,
'name': name,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_data_nomapaddress(sellerid, name, phone, longPoint, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'id': sellerid,
'name': name,
'phone': phone,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_data_nolong(sellerid, name, phone, map_address, latPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'id': sellerid,
'name': name,
'phone': phone,
'map_address': map_address,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_data_nolat(sellerid, name, phone, map_address, longPoint, filePath, imagePath):
m = MultipartEncoder(
fields={
'id': sellerid,
'name': name,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg'),
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_data_nofile(sellerid, name, phone, map_address, longPoint, latPoint, imagePath):
m = MultipartEncoder(
fields={
'id': sellerid,
'name': name,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_data_noimage(sellerid, name, phone, map_address, longPoint, latPoint, filePath):
m = MultipartEncoder(
fields={
'id': sellerid,
'name': name,
'phone': phone,
'map_address': map_address,
'long': longPoint,
'lat': latPoint,
'file': ('file', open(filePath, 'rb'), 'image/jpeg')
}
)
return m
def get_menu(name, sellerid, status, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'sellerid': sellerid,
'status': status,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_menu_noname(sellerid, status, imagePath):
m = MultipartEncoder(
fields={
'sellerid': sellerid,
'status': status,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_menu_noid(name, status, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'status': status,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_menu_nostatus(name, sellerid, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'sellerid': sellerid,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def get_menu_noimage(name, sellerid, status):
m = MultipartEncoder(
fields={
'name': name,
'sellerid': sellerid,
'status': status
}
)
return m
def set_menu(menuid, name, status, imagePath):
m = MultipartEncoder(
fields={
'id': menuid,
'name': name,
'status': status,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_menu_noid(name, status, imagePath):
m = MultipartEncoder(
fields={
'name': name,
'status': status,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_menu_noname(menuid, status, imagePath):
m = MultipartEncoder(
fields={
'id': menuid,
'status': status,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_menu_nostatus(menuid, name, imagePath):
m = MultipartEncoder(
fields={
'id': menuid,
'name': name,
'image': ('image', open(imagePath, 'rb'), 'image/jpeg')
}
)
return m
def set_menu_noimage(menuid, name, status):
m = MultipartEncoder(
fields={
'id': menuid,
'name': name,
'status': status
}
)
return m
def get_cook(**args):
fields = {}
for key in args:
if key == "image":
fields[key] = ("image", open(bytes(args[key]), "rb"), "image/jpeg")
else:
fields[key] = bytes(args[key])
m = MultipartEncoder(fields)
return m
def get_data(**args):
fields = {}
for key in args:
... ... @@ -391,3 +14,7 @@ def get_data(**args):
fields[key] = bytes(args[key])
m = MultipartEncoder(fields)
return m
def get_content_type(data):
return data.content_type
\ No newline at end of file
... ...
<!DOCTYPE html>
<html>
<head>
<title>Test Result</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<h2 class="text-capitalize">Test Result</h2>
<p class='attribute'><strong>Start Time: </strong>2018-02-05 18:05:43</p>
<p class='attribute'><strong>Duration: </strong>8.259s</p>
<p class='attribute'><strong>Status: </strong>Pass: 26</p>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-10 col-md-10">
<table class='table table-hover table-responsive'>
<thead>
<tr>
<th>商家服务singleAPI</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr class='success'>
<td class="col-xs-9">添加商家信息(正确操作)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">添加商家信息(不填name)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">添加商家信息(不填phone)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">添加商家信息(不填map_address)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">添加商家信息(不填file)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">添加商家信息(不填image)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">添加商家信息(不填long)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">添加商家信息(不填lat)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">添加商家信息(重复name)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">添加商家信息(重复phone)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">获取商家列表数据(查询第一页)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">获取商家列表数据(查询不存在的页码)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID获取商家信息(sellerid=5)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID获取商家信息(sellerid不存在)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(正确操作)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(不填id)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(不填name)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(不填phone)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(不填map_address)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(不填long)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(不填lat)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(不填file)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(不填image)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(重复name)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(重复phone)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr class='success'>
<td class="col-xs-9">根据商家ID修改商家信息(不存在的商家)</td>
<td class="col-xs-3">
<span class="label label-success">
Pass
</span>
</td>
</tr>
<tr>
<td>
Total Test Runned: 26
</td>
<td>
<span>Pass: 26</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('td').on('click', '.btn', function(e){
e.preventDefault();
var $this = $(this);
var $nextRow = $this.closest('tr').next('tr');
$nextRow.slideToggle("fast");
$this.text(function(i, text){
if (text === 'View') {
return 'Hide';
} else {
return 'View';
};
});
});
});
</script>
</body>
</html>
\ No newline at end of file
... ...
... ... @@ -2,18 +2,42 @@
name: "商家服务"
request:
base_url: http://dc1.colorcun.com:10005?s=
variable_binds:
- add_name: "雁来客栈"
- add_phone: "13198765432"
- add_map_address: "陕西省西安市"
- add_long: "123"
- add_lat: "456"
- add_file: "/Users/orange/cover.jpeg"
- add_image: "/Users/orange/cover.jpeg"
- norepeat_name: "玲珑坊"
- norepeat_phone: "13123456789"
- pageNum: 1
- pageLarge: 10000
- sellerid_no: 10000
- update_id: "9"
- update_name: "呷哺修改1"
- update_phone: "18066666666"
- update_map_address: "陕西省西安市"
- update_long: "123"
- update_lat: "456"
- update_file: "/Users/orange/cover.jpeg"
- update_image: "/Users/orange/cover.jpeg"
- repeat_name: "测试商家"
- repeat_phone: "18049359987"
- sellerid_no_str: "10000"
#添加商家信息
- test:
name: 添加商家信息(正确操作)
variable_binds:
- name: "呷哺1"
- phone: "18011111111"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- name: $add_name
- phone: $add_phone
- map_address: $add_map_address
- long: $add_long
- lat: $add_lat
- file: $add_file
- image: $add_image
- multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -21,18 +45,20 @@
headers:
Content-Type: ${get_content_type($multipart_encoder)}
data: $multipart_encoder
extract:
- sellerid: content.data.sellerid
validate:
- eq: ["content.ret", 200]
- test:
name: 添加商家信息(不填name)
variable_binds:
- phone: "18011111111"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- phone: $add_phone
- map_address: $add_map_address
- long: $add_long
- lat: $add_lat
- file: $add_file
- image: $add_image
- multipart_encoder: ${get_data(phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -47,12 +73,12 @@
- test:
name: 添加商家信息(不填phone)
variable_binds:
- name: "呷哺1"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- name: $add_name
- map_address: $add_map_address
- long: $add_long
- lat: $add_lat
- file: $add_file
- image: $add_image
- multipart_encoder: ${get_data(name=$name,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -66,13 +92,12 @@
- test:
name: 添加商家信息(不填map_address)
variable_binds:
- name: "呷哺1"
- phone: "18011111111"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- name: $add_name
- phone: $add_phone
- long: $add_long
- lat: $add_lat
- file: $add_file
- image: $add_image
- multipart_encoder: ${get_data(name=$name,phone=$phone,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -86,12 +111,12 @@
- test:
name: 添加商家信息(不填file)
variable_binds:
- name: "呷哺1"
- phone: "18011111111"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- image: "/Users/orange/cover.jpeg"
- name: $add_name
- phone: $add_phone
- map_address: $add_map_address
- long: $add_long
- lat: $add_lat
- image: $add_image
- multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -105,12 +130,12 @@
- test:
name: 添加商家信息(不填image)
variable_binds:
- name: "呷哺1"
- phone: "18011111111"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- name: $add_name
- phone: $add_phone
- map_address: $add_map_address
- long: $add_long
- lat: $add_lat
- file: $add_file
- multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file)}
request:
url: App.Seller.AddSeller
... ... @@ -124,12 +149,12 @@
- test:
name: 添加商家信息(不填long)
variable_binds:
- name: "呷哺1"
- phone: "18011111111"
- map_address: "陕西省西安市"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- name: $add_name
- phone: $add_phone
- map_address: $add_map_address
- lat: $add_lat
- file: $add_file
- image: $add_image
- multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -143,12 +168,12 @@
- test:
name: 添加商家信息(不填lat)
variable_binds:
- name: "呷哺1"
- phone: "18011111111"
- map_address: "陕西省西安市"
- long: "123"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- name: $add_name
- phone: $add_phone
- map_address: $add_map_address
- long: $add_long
- file: $add_file
- image: $add_image
- multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -162,13 +187,13 @@
- test:
name: 添加商家信息(重复name)
variable_binds:
- name: "呷哺1"
- phone: "18011111112"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- name: $add_name
- phone: $norepeat_phone
- map_address: $add_map_address
- long: $add_long
- lat: $add_lat
- file: $add_file
- image: $add_image
- multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -182,13 +207,13 @@
- test:
name: 添加商家信息(重复phone)
variable_binds:
- name: "呷哺2"
- phone: "18011111111"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- name: $norepeat_name
- phone: $add_phone
- map_address: $add_map_address
- long: $add_long
- lat: $add_lat
- file: $add_file
- image: $add_image
- multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -207,7 +232,7 @@
url: App.Seller.SellerLists
method: POST
data:
page: 1
page: $pageNum
validate:
- eq: ["content.ret", 200]
- test:
... ... @@ -216,7 +241,7 @@
url: App.Seller.SellerLists
method: POST
data:
page: 300
page: $pageLarge
validate:
- eq: ["content.ret", 396]
- eq: ["content.msg","非法请求:暂无商家"]
... ... @@ -228,17 +253,17 @@
url: App.Seller.GetSellerById
method: POST
data:
sellerid: 5
sellerid: $sellerid
validate:
- eq: ["content.ret", 200]
- eq: ["content.data.data.id", "5"]
- eq: ["content.data.data.id", $sellerid]
- test:
name: 根据商家ID获取商家信息(sellerid不存在)
request:
url: App.Seller.GetSellerById
method: POST
data:
sellerid: 10000
sellerid: $sellerid_no
validate:
- eq: ["content.ret", 396]
- eq: ["content.msg","非法请求:暂无商家"]
... ... @@ -247,14 +272,14 @@
- test:
name: 根据商家ID修改商家信息(正确操作)
variable_binds:
- id: "15"
- name: "呷哺修改1"
- phone: "18022222222"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- id: $update_id
- name: $update_name
- phone: $update_phone
- map_address: $update_map_address
- long: $update_long
- lat: $update_lat
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.SetSellerById
... ... @@ -267,13 +292,13 @@
- test:
name: 根据商家ID修改商家信息(不填id)
variable_binds:
- name: "呷哺修改1"
- phone: "18022222222"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- name: $update_name
- phone: $update_phone
- map_address: $update_map_address
- long: $update_long
- lat: $update_lat
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.SetSellerById
... ... @@ -287,13 +312,13 @@
- test:
name: 根据商家ID修改商家信息(不填name)
variable_binds:
- id: "15"
- phone: "18022222221"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- id: $update_id
- phone: $update_phone
- map_address: $update_map_address
- long: $update_long
- lat: $update_lat
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(id=$id,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.SetSellerById
... ... @@ -307,13 +332,13 @@
- test:
name: 根据商家ID修改商家信息(不填phone)
variable_binds:
- id: "15"
- name: "呷哺修改2"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- id: $update_id
- name: $update_name
- map_address: $update_map_address
- long: $update_long
- lat: $update_lat
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(id=$id,name=$name,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.SetSellerById
... ... @@ -327,13 +352,13 @@
- test:
name: 根据商家ID修改商家信息(不填map_address)
variable_binds:
- id: "15"
- name: "呷哺修改2"
- phone: "18022222221"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- id: $update_id
- name: $update_name
- phone: $update_phone
- long: $update_long
- lat: $update_lat
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.SetSellerById
... ... @@ -347,13 +372,13 @@
- test:
name: 根据商家ID修改商家信息(不填long)
variable_binds:
- id: "15"
- name: "呷哺修改2"
- phone: "18022222221"
- map_address: "陕西省西安市"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- id: $update_id
- name: $update_name
- phone: $update_phone
- map_address: $update_map_address
- lat: $update_lat
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.SetSellerById
... ... @@ -367,13 +392,13 @@
- test:
name: 根据商家ID修改商家信息(不填lat)
variable_binds:
- id: "15"
- name: "呷哺修改2"
- phone: "18022222221"
- map_address: "陕西省西安市"
- long: "123"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- id: $update_id
- name: $update_name
- phone: $update_phone
- map_address: $update_map_address
- long: $update_long
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,file=$file,image=$image)}
request:
url: App.Seller.SetSellerById
... ... @@ -387,13 +412,13 @@
- test:
name: 根据商家ID修改商家信息(不填file)
variable_binds:
- id: "15"
- name: "呷哺修改2"
- phone: "18022222221"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- image: "/Users/orange/cover.jpeg"
- id: $update_id
- name: $update_name
- phone: $update_phone
- map_address: $update_map_address
- long: $update_long
- lat: $update_lat
- image: $update_image
- multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,image=$image)}
request:
url: App.Seller.SetSellerById
... ... @@ -407,13 +432,13 @@
- test:
name: 根据商家ID修改商家信息(不填image)
variable_binds:
- id: "15"
- name: "呷哺修改2"
- phone: "18022222221"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- id: $update_id
- name: $update_name
- phone: $update_phone
- map_address: $update_map_address
- long: $update_long
- lat: $update_lat
- file: $update_file
- multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file)}
request:
url: App.Seller.SetSellerById
... ... @@ -427,14 +452,14 @@
- test:
name: 根据商家ID修改商家信息(重复name)
variable_binds:
- id: "15"
- name: "呷哺修改1"
- phone: "18022222221"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- id: $update_id
- name: $repeat_name
- phone: $update_phone
- map_address: $update_map_address
- long: $update_long
- lat: $update_lat
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -448,14 +473,14 @@
- test:
name: 根据商家ID修改商家信息(重复phone)
variable_binds:
- id: "15"
- name: "呷哺修改2"
- phone: "18022222222"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- id: $update_id
- name: $norepeat_name
- phone: $repeat_phone
- map_address: $update_map_address
- long: $update_long
- lat: $update_lat
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.AddSeller
... ... @@ -469,14 +494,14 @@
- test:
name: 根据商家ID修改商家信息(不存在的商家)
variable_binds:
- id: "500000"
- name: "测试店修改"
- phone: "1804342484"
- map_address: "陕西省西安市"
- long: "123"
- lat: "456"
- file: "/Users/orange/cover.jpeg"
- image: "/Users/orange/cover.jpeg"
- id: $sellerid_no_str
- name: $norepeat_name
- phone: $norepeat_phone
- map_address: $update_map_address
- long: $update_long
- lat: $update_lat
- file: $update_file
- image: $update_image
- multipart_encoder: ${get_data(id=$id,name=$name,phone=$phone,map_address=$map_address,long=$long,lat=$lat,file=$file,image=$image)}
request:
url: App.Seller.SetSellerById
... ...
- config:
name: "打印服务"
request:
base_url: http://dc1.colorcun.com:10005?s=
\ No newline at end of file
... ...
... ... @@ -10,6 +10,7 @@
- name: "菜谱测试1"
- sellerid: "15"
- status: "1"
- type: "1"
- image: "/Users/orange/cover.jpeg"
- multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,status=$status,image=$image)}
request:
... ... @@ -25,6 +26,7 @@
variable_binds:
- sellerid: "15"
- status: "1"
- type: "1"
- image: "/Users/orange/cover.jpeg"
- multipart_encoder: ${get_data(sellerid=$sellerid,status=$status,image=$image)}
request:
... ... @@ -41,6 +43,7 @@
variable_binds:
- name: "菜谱测试1"
- status: "1"
- type: "1"
- image: "/Users/orange/cover.jpeg"
- multipart_encoder: ${get_data(name=$name,status=$status,image=$image)}
request:
... ... @@ -57,6 +60,7 @@
variable_binds:
- name: "菜谱测试1"
- sellerid: "15"
- type: "1"
- image: "/Users/orange/cover.jpeg"
- multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,image=$image)}
request:
... ... @@ -74,6 +78,7 @@
- name: "菜谱测试1"
- sellerid: "15"
- status: "1"
- type: "1"
- multipart_encoder: ${get_data(name=$name,sellerid=$sellerid,status=$status)}
request:
url: App.Menu.AddMenu
... ...
- 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.id
validate:
- eq: ["content.ret", 200]
#获取分类下所有菜品
- test:
name: 获取分类下所有菜品(正确操作)
request:
url: App.Cookbook.GetCookbookByClassId
method: POST
data:
ClassId: 1
validate:
- eq: ["content.ret", 200]
... ...