You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
2.9 KiB
72 lines
2.9 KiB
*** Settings ***
|
|
Library DateTime
|
|
Library Collections
|
|
Library RequestsLibrary
|
|
Library urllib3
|
|
Library SSHLibrary
|
|
|
|
*** Variables ***
|
|
${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'}
|
|
${URL} https://api-ops-ztb-test.qniao.cn
|
|
|
|
*** Test Cases ***
|
|
get_price-guide-list
|
|
#获取情报信息列表
|
|
Disable Warnings
|
|
Create Session ZTBT ${URL} ${header}
|
|
${reps} Get On Session ZTBT recycle-service/admin/information-management/page params=queryDate=&pageNum=1&pageSize=100000
|
|
log ${reps.json()}
|
|
|
|
update_price-guide-list
|
|
#编辑情报信息
|
|
Disable Warnings
|
|
Create Session ZTBT ${URL} ${header}
|
|
${data} Set Variable \ { \ \ \ \ "id": 0, \ \ \ \ "isShow": 0, \ \ \ \ "paperMillOrgId": 0 \ \ }
|
|
${reps} Post On Session ZTBT recycle-service/admin/priceGuide/update/price-guide-list ${data.encode('utf-8')}
|
|
|
|
Download_template
|
|
#下载导入模板
|
|
Disable Warnings
|
|
Create Session ZTBT ${URL} ${header}
|
|
${reps} Get On Session ZTBT recycle-service/admin/information-management/down-load-template
|
|
${data} Get From Dictionary ${reps.json()} data #获取文件
|
|
Set Global Variable ${data}
|
|
|
|
download_temp
|
|
#导出文档
|
|
#Create Session ZTBT ${URL} ${header}
|
|
#${reps} Get On Session ZTBT recycle-service/admin/download/temp/${data}
|
|
#log ${reps.content}
|
|
Open Connection 39.108.227.105 22
|
|
Login root @Qniaoyy2020
|
|
Get File /root/recycle-service/files/temp/${data}
|
|
|
|
Import
|
|
#批量导入
|
|
Disable Warnings
|
|
${file} Evaluate open("E:/lyl/Test/1631937001388.xlsx","rb")
|
|
${file_data} Create Dictionary file=${file}
|
|
${headers} Create Dictionary multipart/form-data; boundary=<calculated when request is sent> X-APP-ID=470236309865238555 Authorization=${gettoken}
|
|
Create Session ZTBT ${URL} ${headers}
|
|
${reponse} Post On Session ZTBT recycle-service/admin/received-weight/upload/ files=${file_data}
|
|
|
|
Export
|
|
#导出纸厂车辆排队信息
|
|
Disable Warnings
|
|
Create Session ZTBT ${URL} ${header}
|
|
${data} Set Variable { \ \ \ \ "paperMillId":null, \ \ \ \ "queryDate":[ \ \ \ \ \ ] }
|
|
${reps} Post On Session ZTBT recycle-service/admin/information-management/export ${data}
|
|
${DT} Get From Dictionary ${reps.json()} data
|
|
Set Global Variable ${DT}
|
|
|
|
download_temp1
|
|
#导出文档
|
|
#Create Session ZTBT ${URL} ${header}
|
|
#${reps} Get On Session ZTBT recycle-service/admin/download/temp/${data}
|
|
#log ${reps.content}
|
|
Open Connection 39.108.227.105 22
|
|
Login root @Qniaoyy2020
|
|
Get File /root/recycle-service/files/temp/${DT}
|
|
Write cd /root/recycle-service/files/temp/
|
|
Write rm -f \ ${DT}
|
|
Close Connection
|