Commit 56fb5fa6 authored by Missv4you's avatar Missv4you

12

parent bdbbc66c
Pipeline #6953 canceled with stages
from base.logs import case_log
from base.setting import setting
loginfo = case_log()
\ No newline at end of file
import requests
import json
from base.setting import setting
from base import loginfo
class ApiRequests:
"""
请求类
"""
def __init__(self, header=None):
self.header = json.loads(setting.env['header'])
if header:
self.header.update(header)
def post_main(self, url, data):
return requests.post(url=url, data=data, headers=self.header, verify=False)
def get_main(self, url):
return requests.get(url=url, headers=self.header, verify=False)
def run_main(self, url, data=None, flag=True, method='post'):
"""
:param url: 接口地址
:param data: 请求数据
:param flag: 是否执行
:param method: 请求方式
:return: 结果数据
"""
url = setting.env['domain'] + url
if flag:
# 进行编码处理
if method.lower() == 'get':
res = self.get_main(url)
else:
loginfo.info('请求参数: \n\t\t\t\t\t\t{}'.format(data))
res = self.post_main(url, json.dumps(data))
return res.content.decode('utf-8')
This diff is collapsed.
import logging
from logging import handlers
from base.setting import setting
import time
data_time = time.strftime('%Y-%m-%d', time.localtime()) + '.log'
def case_log():
log_format = '%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message)s'
logging.basicConfig(level=logging.DEBUG, format=log_format)
logger = logging.getLogger()
# 屏幕写入
# th = logging.StreamHandler()
# 文件输出
format_str = logging.Formatter(log_format)
sh = handlers.TimedRotatingFileHandler(filename=setting.log_path['path'] + data_time, when='D', encoding='utf-8')
sh.setFormatter(format_str)
logger.addHandler(sh)
# logger.addHandler(th)
return logger
if __name__ == '__main__':
log = case_log()
log.debug('hello')
"""
配置类,读取配置信息
"""
import configparser
import os
class Setting:
def __init__(self, path=None):
if not path:
base_path = os.path.dirname(os.path.abspath(os.path.dirname(__file__)))
self.config_path = os.path.join(base_path, 'config/config.ini')
else:
self.config_path = path
self.config = configparser.ConfigParser()
self.config.read(self.config_path)
self.setting()
def setting(self):
for attr in self.config.sections():
self.__dict__[attr] = dict(self.config.items(attr))
setting = Setting()
from util.excel_data import OperatorExcel
import copy
class TestData:
def __init__(self, file=None):
api_datas = OperatorExcel(file).get_all_case()
scene_datas = OperatorExcel(file).get_scene_case()
self.title, self.case_data = api_datas[0], api_datas[1:]
self.scene_title, self.scene_data = scene_datas[0], scene_datas[1:]
def get_data(self):
case_datas = []
for case in self.case_data:
case_dict = {}
for index, title in enumerate(self.title):
case_dict[title] = case[index]
case_datas.append(case_dict)
return case_datas
def get_scene_data(self):
scene_datas = []
for case in self.scene_data:
case_dict = {}
for index, title in enumerate(self.scene_title):
case_dict[title] = case[index]
scene_datas.append(case_dict)
for scene in scene_datas:
if scene['scene_case']:
a = copy.deepcopy(scene['scene_case'])
tmp_case = copy.deepcopy(a.split('-'))
tmp_cases = []
for c in tmp_case:
for cc in self.get_data():
if c == cc['name']:
tmp_cases.append(cc)
scene['scene_case'] = tmp_cases
return scene_datas
if __name__ == '__main__':
TestData().get_scene_data()
import json
import os
from base import loginfo
from base.setting import setting
class TestCase:
"""
测试基类
"""
def __init__(self, **kwargs):
"""
:param name: 用例名称
:param priority: 优先级 1,2,3
:param api_address: 请求地址
:param save_field: 需要保存的字段
:param method: 请求方法 post,get
:param data: 请求参数
:param expected: 期望结果
:param actual: 实际结果
:param case_pass: 是否通过 成功,失败
"""
self.name = kwargs.get('name')
self.priority = kwargs.get('priority')
self.api_address = kwargs.get('api_address')
self.method = kwargs.get('method')
# 请求参数--需要转换成json,支持以F=开头的路径方式传入
self.request_data = kwargs.get('request_data')
if str(self.request_data).startswith('F='):
path = self.request_data.split('F=')[-1]
if setting.json_data['json_data_path']:
base_path = setting.json_data['json_data_path']
self.request_data = self.read_json_case(os.path.join(base_path, path))
else:
self.request_data = self.read_json_case(path)
else:
if isinstance(self.request_data, str):
self.request_data = json.loads(self.request_data)
self.expected = kwargs.get('expected')
self.actual = kwargs.get('actual')
self.case_pass = kwargs.get('case_pass')
self.assert_method = kwargs.get('assert_method')
self.save_field = kwargs.get('save_field')
self.logs = None
def read_json_case(self, path):
with open(path, 'r', encoding='utf-8') as fp:
data = fp.read()
try:
data = json.loads(data)
except Exception as e:
print('json数据转换失败{}'.format(e))
finally:
return data
def api_assert(self):
"""
根据传入参数调用断言方法
:return: bool
"""
loginfo.debug('期望结果: {}, 断言方式: {}'.format(self.expected, self.assert_method))
if self.assert_method == 'include_text':
self.include_text()
elif self.assert_method == 'include_json':
self.include_json()
elif self.assert_method == 'equal_text':
self.equal_text()
elif self.assert_method == '':
self.assert_json()
else:
self.equal_json()
# 文本包含
def include_text(self):
if self.expected in str(self.actual):
self.case_pass = True
# json包含
def include_json(self):
self.expected = json.loads(self.expected)
self.actual = json.loads(self.actual)
if self.assert_json(self.expected, self.actual):
self.case_pass = True
def assert_json(self, exp, act):
if isinstance(exp, str) and isinstance(act, str) and exp == act:
return True
elif isinstance(exp, dict):
for j in exp.keys():
if j in act:
return self.assert_json(exp[j], act[j])
else:
return False
elif isinstance(exp, list) and isinstance(act, list):
for i in exp:
if i in act:
return self.assert_json(i, act[act.index(i)])
else:
return False
else:
return False
# 文本相等
def equal_text(self):
if self.expected == self.actual:
self.case_pass = True
# json相等
def equal_json(self):
if self.expected == self.actual:
self.case_pass = True
if __name__ == '__main__':
a = {'c': 'ww'}
b = {'a': 'aaa', 'b': 'bbb', 'c': {'ggg': '111'}, 'd': [{'xsd': 'tttt'}, {'rr': 'aaa'}]}
print(a)
print(b)
a = TestCase().assert_json(a, b)
print(a)
[env]
domain=http://119.3.73.53:18082/
header={"Content-Type": "application/json;charset=UTF-8","User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36"}
[login]
username=ADMIN
password=password
[log_path]
path=../logs/logs
[report]
name=WMS-API-TEST
report_path=../report/report.html
[json_data]
json_data_path=..\data\json_data\
\ No newline at end of file
This diff is collapsed.
{
"selectedRows": [
{
"header": {
"currentData": {
"id": "",
"warehouse_id": "${warehouse_id}",
"asn_no": "",
"ext_no": "",
"come_from": "WMS",
"come_from_label": "",
"owner_id": "${owner_id}",
"type": "100",
"type_label": "",
"bill_status": "100",
"bill_status_label": "",
"priority": "0",
"qty": "",
"receive_qty": "",
"order_time": "",
"est_arrival_time": "",
"actual_arrival_time": "",
"start_receive_time": "",
"end_receive_time": "",
"dock_id": "",
"dock_start_time": "",
"dock_end_time": "",
"supplier_id": "",
"supplier_code": "",
"supplier_name": "",
"supplier_address": "",
"supplier_contact": "",
"supplier_phone": "",
"carrier_id": "",
"carrier_code": "",
"carrier_name": "",
"carrier_address": "",
"carrier_contact": "",
"carrier_phone": "",
"carrier_plate_num": "",
"carrier_trailer_num": "",
"carrier_driver": "",
"carrier_driver_phone": "",
"carrier_waybill_num": "",
"remark": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"warehouse__code": "${warehouse_code}",
"warehouse__name": "${warehouse_code}",
"owner__code": "${owner_code}",
"owner__name": "${owner_code}",
"dock__code": "",
"dock__name": "",
"supplier__code": "",
"supplier__name": "",
"carrier__code": "",
"carrier__name": "",
"_TX_CODE": ""
},
"originalData": {
"id": "",
"warehouse_id": "",
"asn_no": "",
"ext_no": "",
"come_from": "WMS",
"come_from_label": "",
"owner_id": "",
"type": "",
"type_label": "",
"bill_status": "100",
"bill_status_label": "",
"priority": "",
"qty": "",
"receive_qty": "",
"order_time": "",
"est_arrival_time": "",
"actual_arrival_time": "",
"start_receive_time": "",
"end_receive_time": "",
"dock_id": "",
"dock_start_time": "",
"dock_end_time": "",
"supplier_id": "",
"supplier_code": "",
"supplier_name": "",
"supplier_address": "",
"supplier_contact": "",
"supplier_phone": "",
"carrier_id": "",
"carrier_code": "",
"carrier_name": "",
"carrier_address": "",
"carrier_contact": "",
"carrier_phone": "",
"carrier_plate_num": "",
"carrier_trailer_num": "",
"carrier_driver": "",
"carrier_driver_phone": "",
"carrier_waybill_num": "",
"remark": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"warehouse__code": "",
"warehouse__name": "",
"owner__code": "",
"owner__name": "",
"dock__code": "",
"dock__name": "",
"supplier__code": "",
"supplier__name": "",
"carrier__code": "",
"carrier__name": "",
"_TX_CODE": ""
}
},
"lines": {
"rows": [
{
"currentData": {
"_TX_CODE": "I",
"id": "",
"warehouse_id": "",
"asn_id": "",
"asn_no": "",
"line_no": "",
"ext_line_no": "",
"owner_id": "",
"sku_id": "${sku_id}",
"pack_id": "${pack_id}",
"uom": "EA",
"uom_base_qty": 1,
"qty": 1,
"receive_qty": "",
"location_id": "${location_id}",
"lpn": "",
"case_num": "",
"bill_status": "100",
"bill_status_label": "",
"remark": "",
"inventory_lot_id": "",
"sku_status": "",
"receive_time": "",
"produce_time": "",
"expire_time": "",
"supplier": "",
"asn_num": "",
"purchase_num": "",
"purchase_price": "",
"lot_attribute01": "",
"lot_attribute02": "",
"lot_attribute03": "",
"lot_attribute04": "",
"lot_attribute05": "",
"lot_attribute06": "",
"lot_attribute07": "",
"lot_attribute08": "",
"lot_attribute09": "",
"lot_attribute10": "",
"lot_attribute11": "",
"lot_attribute12": "",
"lot_attribute13": "",
"lot_attribute14": "",
"lot_attribute15": "",
"lot_attribute16": "",
"lot_attribute17": "",
"lot_attribute18": "",
"lot_attribute19": "",
"lot_attribute20": "",
"sort_num": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"uom_qty": 1,
"sku__code": "${sku_code}",
"sku__name": "${sku_code}",
"pack__code": "${pack_code}",
"pack__name": "${pack_code}",
"pack__each_code": "EA",
"pack__each_qty": 1,
"pack__inner_code": "IP",
"pack__inner_qty": null,
"pack__case_code": "CS",
"pack__case_qty": null,
"pack__pallet_code": "PL",
"pack__pallet_qty": null,
"location__code": "${location_code}",
"location__name": "${location_code}",
"inventory_lot__lot": ""
},
"originalData": {
"_TX_CODE": "I",
"id": "",
"warehouse_id": "",
"asn_id": "",
"asn_no": "",
"line_no": "",
"ext_line_no": "",
"owner_id": "",
"sku_id": "",
"pack_id": "",
"uom": "",
"uom_base_qty": "",
"qty": "",
"receive_qty": "",
"location_id": "",
"lpn": "",
"case_num": "",
"bill_status": "100",
"bill_status_label": "",
"remark": "",
"inventory_lot_id": "",
"sku_status": "",
"receive_time": "",
"produce_time": "",
"expire_time": "",
"supplier": "",
"asn_num": "",
"purchase_num": "",
"purchase_price": "",
"lot_attribute01": "",
"lot_attribute02": "",
"lot_attribute03": "",
"lot_attribute04": "",
"lot_attribute05": "",
"lot_attribute06": "",
"lot_attribute07": "",
"lot_attribute08": "",
"lot_attribute09": "",
"lot_attribute10": "",
"lot_attribute11": "",
"lot_attribute12": "",
"lot_attribute13": "",
"lot_attribute14": "",
"lot_attribute15": "",
"lot_attribute16": "",
"lot_attribute17": "",
"lot_attribute18": "",
"lot_attribute19": "",
"lot_attribute20": "",
"sort_num": "",
"container_empty": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"uom_qty": "",
"sku__code": "",
"sku__name": "",
"pack__code": "",
"pack__name": "",
"pack__each_code": "EA",
"pack__each_qty": "1",
"pack__inner_code": "IP",
"pack__inner_qty": "",
"pack__case_code": "CS",
"pack__case_qty": "",
"pack__pallet_code": "PL",
"pack__pallet_qty": "",
"location__code": "",
"location__name": "",
"inventory_lot__lot": ""
}
}
]
}
}
],
"aux": {
"new": true
}
}
{
"selectedRows": [
{
"header": {
"currentData": {
"id": "",
"warehouse_id": "${warehouse_id}",
"asn_no": "",
"ext_no": "",
"come_from": "WMS",
"come_from_label": "",
"owner_id": "${owner_id}",
"type": "103",
"type_label": "",
"bill_status": "100",
"bill_status_label": "",
"priority": "0",
"qty": "",
"receive_qty": "",
"order_time": "",
"est_arrival_time": "",
"actual_arrival_time": "",
"start_receive_time": "",
"end_receive_time": "",
"dock_id": "",
"dock_start_time": "",
"dock_end_time": "",
"supplier_id": "",
"supplier_code": "",
"supplier_name": "",
"supplier_address": "",
"supplier_contact": "",
"supplier_phone": "",
"carrier_id": "",
"carrier_code": "",
"carrier_name": "",
"carrier_address": "",
"carrier_contact": "",
"carrier_phone": "",
"carrier_plate_num": "",
"carrier_trailer_num": "",
"carrier_driver": "",
"carrier_driver_phone": "",
"carrier_waybill_num": "",
"remark": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"warehouse__code": "${warehouse_code}",
"warehouse__name": "${warehouse_code}",
"owner__code": "${owner_code}",
"owner__name": "${owner_code}",
"dock__code": "",
"dock__name": "",
"supplier__code": "",
"supplier__name": "",
"carrier__code": "",
"carrier__name": "",
"_TX_CODE": ""
},
"originalData": {
"id": "",
"warehouse_id": "",
"asn_no": "",
"ext_no": "",
"come_from": "WMS",
"come_from_label": "",
"owner_id": "",
"type": "",
"type_label": "",
"bill_status": "100",
"bill_status_label": "",
"priority": "",
"qty": "",
"receive_qty": "",
"order_time": "",
"est_arrival_time": "",
"actual_arrival_time": "",
"start_receive_time": "",
"end_receive_time": "",
"dock_id": "",
"dock_start_time": "",
"dock_end_time": "",
"supplier_id": "",
"supplier_code": "",
"supplier_name": "",
"supplier_address": "",
"supplier_contact": "",
"supplier_phone": "",
"carrier_id": "",
"carrier_code": "",
"carrier_name": "",
"carrier_address": "",
"carrier_contact": "",
"carrier_phone": "",
"carrier_plate_num": "",
"carrier_trailer_num": "",
"carrier_driver": "",
"carrier_driver_phone": "",
"carrier_waybill_num": "",
"remark": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"warehouse__code": "",
"warehouse__name": "",
"owner__code": "",
"owner__name": "",
"dock__code": "",
"dock__name": "",
"supplier__code": "",
"supplier__name": "",
"carrier__code": "",
"carrier__name": "",
"_TX_CODE": ""
}
},
"lines": {
"rows": [
{
"currentData": {
"_TX_CODE": "I",
"id": "",
"warehouse_id": "",
"asn_id": "",
"asn_no": "",
"line_no": "",
"ext_line_no": "",
"owner_id": "",
"sku_id": "${sku_id}",
"pack_id": "${pack_id}",
"uom": "EA",
"uom_base_qty": 1,
"qty": 1,
"receive_qty": "",
"location_id": "${location_id}",
"lpn": "",
"case_num": "",
"bill_status": "100",
"bill_status_label": "",
"remark": "",
"inventory_lot_id": "",
"sku_status": "",
"receive_time": "",
"produce_time": "",
"expire_time": "",
"supplier": "",
"asn_num": "",
"purchase_num": "",
"purchase_price": "",
"lot_attribute01": "",
"lot_attribute02": "",
"lot_attribute03": "",
"lot_attribute04": "",
"lot_attribute05": "",
"lot_attribute06": "",
"lot_attribute07": "",
"lot_attribute08": "",
"lot_attribute09": "",
"lot_attribute10": "",
"lot_attribute11": "",
"lot_attribute12": "",
"lot_attribute13": "",
"lot_attribute14": "",
"lot_attribute15": "",
"lot_attribute16": "",
"lot_attribute17": "",
"lot_attribute18": "",
"lot_attribute19": "",
"lot_attribute20": "",
"sort_num": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"uom_qty": 1,
"sku__code": "${sku_code}",
"sku__name": "${sku_code}",
"pack__code": "${pack_code}",
"pack__name": "${pack_code}",
"pack__each_code": "EA",
"pack__each_qty": 1,
"pack__inner_code": "IP",
"pack__inner_qty": null,
"pack__case_code": "CS",
"pack__case_qty": null,
"pack__pallet_code": "PL",
"pack__pallet_qty": null,
"location__code": "${location_code}",
"location__name": "${location_code}",
"inventory_lot__lot": ""
},
"originalData": {
"_TX_CODE": "I",
"id": "",
"warehouse_id": "",
"asn_id": "",
"asn_no": "",
"line_no": "",
"ext_line_no": "",
"owner_id": "",
"sku_id": "",
"pack_id": "",
"uom": "",
"uom_base_qty": "",
"qty": "",
"receive_qty": "",
"location_id": "",
"lpn": "",
"case_num": "",
"bill_status": "100",
"bill_status_label": "",
"remark": "",
"inventory_lot_id": "",
"sku_status": "",
"receive_time": "",
"produce_time": "",
"expire_time": "",
"supplier": "",
"asn_num": "",
"purchase_num": "",
"purchase_price": "",
"lot_attribute01": "",
"lot_attribute02": "",
"lot_attribute03": "",
"lot_attribute04": "",
"lot_attribute05": "",
"lot_attribute06": "",
"lot_attribute07": "",
"lot_attribute08": "",
"lot_attribute09": "",
"lot_attribute10": "",
"lot_attribute11": "",
"lot_attribute12": "",
"lot_attribute13": "",
"lot_attribute14": "",
"lot_attribute15": "",
"lot_attribute16": "",
"lot_attribute17": "",
"lot_attribute18": "",
"lot_attribute19": "",
"lot_attribute20": "",
"sort_num": "",
"container_empty": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"uom_qty": "",
"sku__code": "",
"sku__name": "",
"pack__code": "",
"pack__name": "",
"pack__each_code": "EA",
"pack__each_qty": "1",
"pack__inner_code": "IP",
"pack__inner_qty": "",
"pack__case_code": "CS",
"pack__case_qty": "",
"pack__pallet_code": "PL",
"pack__pallet_qty": "",
"location__code": "",
"location__name": "",
"inventory_lot__lot": ""
}
}
]
}
}
],
"aux": {
"new": true
}
}
This diff is collapsed.
This diff is collapsed.
{
"selectedRows": [
{
"header": {
"currentData": {
"id": "",
"warehouse_id": "${warehouse_id}",
"asn_no": "",
"ext_no": "",
"come_from": "WMS",
"come_from_label": "",
"owner_id": "${owner_id}",
"type": "101",
"type_label": "",
"bill_status": "100",
"bill_status_label": "",
"priority": "0",
"qty": "",
"receive_qty": "",
"order_time": "",
"est_arrival_time": "",
"actual_arrival_time": "",
"start_receive_time": "",
"end_receive_time": "",
"dock_id": "",
"dock_start_time": "",
"dock_end_time": "",
"supplier_id": "",
"supplier_code": "",
"supplier_name": "",
"supplier_address": "",
"supplier_contact": "",
"supplier_phone": "",
"carrier_id": "",
"carrier_code": "",
"carrier_name": "",
"carrier_address": "",
"carrier_contact": "",
"carrier_phone": "",
"carrier_plate_num": "",
"carrier_trailer_num": "",
"carrier_driver": "",
"carrier_driver_phone": "",
"carrier_waybill_num": "",
"remark": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"warehouse__code": "${warehouse_code}",
"warehouse__name": "${warehouse_code}",
"owner__code": "${owner_code}",
"owner__name": "${owner_code}",
"dock__code": "",
"dock__name": "",
"supplier__code": "",
"supplier__name": "",
"carrier__code": "",
"carrier__name": "",
"_TX_CODE": ""
},
"originalData": {
"id": "",
"warehouse_id": "",
"asn_no": "",
"ext_no": "",
"come_from": "WMS",
"come_from_label": "",
"owner_id": "",
"type": "",
"type_label": "",
"bill_status": "100",
"bill_status_label": "",
"priority": "",
"qty": "",
"receive_qty": "",
"order_time": "",
"est_arrival_time": "",
"actual_arrival_time": "",
"start_receive_time": "",
"end_receive_time": "",
"dock_id": "",
"dock_start_time": "",
"dock_end_time": "",
"supplier_id": "",
"supplier_code": "",
"supplier_name": "",
"supplier_address": "",
"supplier_contact": "",
"supplier_phone": "",
"carrier_id": "",
"carrier_code": "",
"carrier_name": "",
"carrier_address": "",
"carrier_contact": "",
"carrier_phone": "",
"carrier_plate_num": "",
"carrier_trailer_num": "",
"carrier_driver": "",
"carrier_driver_phone": "",
"carrier_waybill_num": "",
"remark": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"warehouse__code": "",
"warehouse__name": "",
"owner__code": "",
"owner__name": "",
"dock__code": "",
"dock__name": "",
"supplier__code": "",
"supplier__name": "",
"carrier__code": "",
"carrier__name": "",
"_TX_CODE": ""
}
},
"lines": {
"rows": [
{
"currentData": {
"_TX_CODE": "I",
"id": "",
"warehouse_id": "",
"asn_id": "",
"asn_no": "",
"line_no": "",
"ext_line_no": "",
"owner_id": "",
"sku_id": "${sku_id}",
"pack_id": "${pack_id}",
"uom": "EA",
"uom_base_qty": 1,
"qty": 1,
"receive_qty": "",
"location_id": "${location_id}",
"lpn": "",
"case_num": "",
"bill_status": "100",
"bill_status_label": "",
"remark": "",
"inventory_lot_id": "",
"sku_status": "",
"receive_time": "",
"produce_time": "",
"expire_time": "",
"supplier": "",
"asn_num": "",
"purchase_num": "",
"purchase_price": "",
"lot_attribute01": "",
"lot_attribute02": "",
"lot_attribute03": "",
"lot_attribute04": "",
"lot_attribute05": "",
"lot_attribute06": "",
"lot_attribute07": "",
"lot_attribute08": "",
"lot_attribute09": "",
"lot_attribute10": "",
"lot_attribute11": "",
"lot_attribute12": "",
"lot_attribute13": "",
"lot_attribute14": "",
"lot_attribute15": "",
"lot_attribute16": "",
"lot_attribute17": "",
"lot_attribute18": "",
"lot_attribute19": "",
"lot_attribute20": "",
"sort_num": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"uom_qty": 1,
"sku__code": "${sku_code}",
"sku__name": "${sku_code}",
"pack__code": "${pack_code}",
"pack__name": "${pack_code}",
"pack__each_code": "EA",
"pack__each_qty": 1,
"pack__inner_code": "IP",
"pack__inner_qty": null,
"pack__case_code": "CS",
"pack__case_qty": null,
"pack__pallet_code": "PL",
"pack__pallet_qty": null,
"location__code": "${location_code}",
"location__name": "${location_code}",
"inventory_lot__lot": ""
},
"originalData": {
"_TX_CODE": "I",
"id": "",
"warehouse_id": "",
"asn_id": "",
"asn_no": "",
"line_no": "",
"ext_line_no": "",
"owner_id": "",
"sku_id": "",
"pack_id": "",
"uom": "",
"uom_base_qty": "",
"qty": "",
"receive_qty": "",
"location_id": "",
"lpn": "",
"case_num": "",
"bill_status": "100",
"bill_status_label": "",
"remark": "",
"inventory_lot_id": "",
"sku_status": "",
"receive_time": "",
"produce_time": "",
"expire_time": "",
"supplier": "",
"asn_num": "",
"purchase_num": "",
"purchase_price": "",
"lot_attribute01": "",
"lot_attribute02": "",
"lot_attribute03": "",
"lot_attribute04": "",
"lot_attribute05": "",
"lot_attribute06": "",
"lot_attribute07": "",
"lot_attribute08": "",
"lot_attribute09": "",
"lot_attribute10": "",
"lot_attribute11": "",
"lot_attribute12": "",
"lot_attribute13": "",
"lot_attribute14": "",
"lot_attribute15": "",
"lot_attribute16": "",
"lot_attribute17": "",
"lot_attribute18": "",
"lot_attribute19": "",
"lot_attribute20": "",
"sort_num": "",
"container_empty": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"uom_qty": "",
"sku__code": "",
"sku__name": "",
"pack__code": "",
"pack__name": "",
"pack__each_code": "EA",
"pack__each_qty": "1",
"pack__inner_code": "IP",
"pack__inner_qty": "",
"pack__case_code": "CS",
"pack__case_qty": "",
"pack__pallet_code": "PL",
"pack__pallet_qty": "",
"location__code": "",
"location__name": "",
"inventory_lot__lot": ""
}
}
]
}
}
],
"aux": {
"new": true
}
}
{
"selectedRows": [
{
"header": {
"currentData": {
"id": "",
"warehouse_id": "${warehouse_id}",
"asn_no": "",
"ext_no": "",
"come_from": "WMS",
"come_from_label": "",
"owner_id": "${owner_id}",
"type": "102",
"type_label": "",
"bill_status": "100",
"bill_status_label": "",
"priority": "0",
"qty": "",
"receive_qty": "",
"order_time": "",
"est_arrival_time": "",
"actual_arrival_time": "",
"start_receive_time": "",
"end_receive_time": "",
"dock_id": "",
"dock_start_time": "",
"dock_end_time": "",
"supplier_id": "",
"supplier_code": "",
"supplier_name": "",
"supplier_address": "",
"supplier_contact": "",
"supplier_phone": "",
"carrier_id": "",
"carrier_code": "",
"carrier_name": "",
"carrier_address": "",
"carrier_contact": "",
"carrier_phone": "",
"carrier_plate_num": "",
"carrier_trailer_num": "",
"carrier_driver": "",
"carrier_driver_phone": "",
"carrier_waybill_num": "",
"remark": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"warehouse__code": "${warehouse_code}",
"warehouse__name": "${warehouse_code}",
"owner__code": "${owner_code}",
"owner__name": "${owner_code}",
"dock__code": "",
"dock__name": "",
"supplier__code": "",
"supplier__name": "",
"carrier__code": "",
"carrier__name": "",
"_TX_CODE": ""
},
"originalData": {
"id": "",
"warehouse_id": "",
"asn_no": "",
"ext_no": "",
"come_from": "WMS",
"come_from_label": "",
"owner_id": "",
"type": "",
"type_label": "",
"bill_status": "100",
"bill_status_label": "",
"priority": "",
"qty": "",
"receive_qty": "",
"order_time": "",
"est_arrival_time": "",
"actual_arrival_time": "",
"start_receive_time": "",
"end_receive_time": "",
"dock_id": "",
"dock_start_time": "",
"dock_end_time": "",
"supplier_id": "",
"supplier_code": "",
"supplier_name": "",
"supplier_address": "",
"supplier_contact": "",
"supplier_phone": "",
"carrier_id": "",
"carrier_code": "",
"carrier_name": "",
"carrier_address": "",
"carrier_contact": "",
"carrier_phone": "",
"carrier_plate_num": "",
"carrier_trailer_num": "",
"carrier_driver": "",
"carrier_driver_phone": "",
"carrier_waybill_num": "",
"remark": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"warehouse__code": "",
"warehouse__name": "",
"owner__code": "",
"owner__name": "",
"dock__code": "",
"dock__name": "",
"supplier__code": "",
"supplier__name": "",
"carrier__code": "",
"carrier__name": "",
"_TX_CODE": ""
}
},
"lines": {
"rows": [
{
"currentData": {
"_TX_CODE": "I",
"id": "",
"warehouse_id": "",
"asn_id": "",
"asn_no": "",
"line_no": "",
"ext_line_no": "",
"owner_id": "",
"sku_id": "${sku_id}",
"pack_id": "${pack_id}",
"uom": "EA",
"uom_base_qty": 1,
"qty": 1,
"receive_qty": "",
"location_id": "${location_id}",
"lpn": "",
"case_num": "",
"bill_status": "100",
"bill_status_label": "",
"remark": "",
"inventory_lot_id": "",
"sku_status": "",
"receive_time": "",
"produce_time": "",
"expire_time": "",
"supplier": "",
"asn_num": "",
"purchase_num": "",
"purchase_price": "",
"lot_attribute01": "",
"lot_attribute02": "",
"lot_attribute03": "",
"lot_attribute04": "",
"lot_attribute05": "",
"lot_attribute06": "",
"lot_attribute07": "",
"lot_attribute08": "",
"lot_attribute09": "",
"lot_attribute10": "",
"lot_attribute11": "",
"lot_attribute12": "",
"lot_attribute13": "",
"lot_attribute14": "",
"lot_attribute15": "",
"lot_attribute16": "",
"lot_attribute17": "",
"lot_attribute18": "",
"lot_attribute19": "",
"lot_attribute20": "",
"sort_num": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"uom_qty": 1,
"sku__code": "${sku_code}",
"sku__name": "${sku_code}",
"pack__code": "${pack_code}",
"pack__name": "${pack_code}",
"pack__each_code": "EA",
"pack__each_qty": 1,
"pack__inner_code": "IP",
"pack__inner_qty": null,
"pack__case_code": "CS",
"pack__case_qty": null,
"pack__pallet_code": "PL",
"pack__pallet_qty": null,
"location__code": "${location_code}",
"location__name": "${location_code}",
"inventory_lot__lot": ""
},
"originalData": {
"_TX_CODE": "I",
"id": "",
"warehouse_id": "",
"asn_id": "",
"asn_no": "",
"line_no": "",
"ext_line_no": "",
"owner_id": "",
"sku_id": "",
"pack_id": "",
"uom": "",
"uom_base_qty": "",
"qty": "",
"receive_qty": "",
"location_id": "",
"lpn": "",
"case_num": "",
"bill_status": "100",
"bill_status_label": "",
"remark": "",
"inventory_lot_id": "",
"sku_status": "",
"receive_time": "",
"produce_time": "",
"expire_time": "",
"supplier": "",
"asn_num": "",
"purchase_num": "",
"purchase_price": "",
"lot_attribute01": "",
"lot_attribute02": "",
"lot_attribute03": "",
"lot_attribute04": "",
"lot_attribute05": "",
"lot_attribute06": "",
"lot_attribute07": "",
"lot_attribute08": "",
"lot_attribute09": "",
"lot_attribute10": "",
"lot_attribute11": "",
"lot_attribute12": "",
"lot_attribute13": "",
"lot_attribute14": "",
"lot_attribute15": "",
"lot_attribute16": "",
"lot_attribute17": "",
"lot_attribute18": "",
"lot_attribute19": "",
"lot_attribute20": "",
"sort_num": "",
"container_empty": "",
"domain_name": "",
"version": "0",
"insert_user": "",
"insert_user_common_name": "",
"insert_date": "",
"update_user": "",
"update_user_common_name": "",
"update_date": "",
"uom_qty": "",
"sku__code": "",
"sku__name": "",
"pack__code": "",
"pack__name": "",
"pack__each_code": "EA",
"pack__each_qty": "1",
"pack__inner_code": "IP",
"pack__inner_qty": "",
"pack__case_code": "CS",
"pack__case_qty": "",
"pack__pallet_code": "PL",
"pack__pallet_qty": "",
"location__code": "",
"location__name": "",
"inventory_lot__lot": ""
}
}
]
}
}
],
"aux": {
"new": true
}
}
This diff is collapsed.
"""
支持用例编写的另一种方式(待扩展)
"""
\ No newline at end of file
This diff is collapsed.
{
"testPass": 0,
"testResult": [
{
"CaseName": "test_template",
"api": "test_errors_save_imgs",
"parameter": "parameter",
"result": "result",
"status": "失败",
"log": null
}
],
"testName": "测试deafult报告",
"testAll": 1,
"testFail": 1,
"beginTime": "2018-01-26 16:12:03",
"totalTime": "18s",
"testSkip": 0,
"testError": 0
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment