*** Settings *** Library RequestsLibrary Library Collections Library DateTime Library urllib3 *** Variables *** ${header} {'X-APP-ID':'470236309865238555','Authorization':'${gettoken}','Content-Type':'application/json'} ${URL} https://api-ops-uec-test.qniao.cn *** Test Cases *** Find_enterprise #查找企业基本信息 Disable Warnings Create Session ZTBT https://api-ops-ztb-test.qniao.cn ${header} ${reps} Get On Session ZTBT recycle-user-center/admin/get/enterprise-profile-list params=pageNum=1&pageSize=10 ${records} Get From Dictionary ${reps.json()["data"]} records #企业列表 FOR ${items} IN @{records} ${enterpriseName} Get From Dictionary ${items} enterpriseName #企业名称 ${enterpriseId} Get From Dictionary ${items} enterpriseId #企业id Exit For Loop If '${enterpriseName}'=='${paperMilld_name}' END Set Global Variable ${enterpriseId} Set Global Variable ${enterpriseName} get_enterprise-profile-list #获取企业列表 Create Session ZTBT ${URL} ${header} ${reps} Get On Session ZTBT recycle-user-center/admin/get/enterprise-profile-list pageNum=1&pageSize=10 log ${reps.json()} get_user-list #获取关联用户信息 Create Session ZTBT ${URL} ${header} ${reps} Get On Session ZTBT uec/admin/get/user/user-list pageNum=1&pageSize=30&keyword=133 log ${reps.json()} Upload_pictures #上传图片 #${dict} Create Dictionary Content-Type=image/jpeg filename=20210803.jpg #Create Session ZTBT ${URL} ${dict} ${filepath} Evaluate open('E:/lyl/图片/16pic_6879381_b.jpg','rb') ${image} Evaluate open('E:/lyl/图片/16pic_6879381_b.jpg','rb') ${file} Create Dictionary filepath=${filepath} image=${image} Create Session ZTBT ${URL} log ${file} ${result} Post On Session ZTBT recycle-user-center/upload/image files=${file} ${pictures} Get From Dictionary ${result.json()} data log ${result.content} Set Global Variable ${pictures}