纸通宝交易版
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.
 
 

28 lines
1.9 KiB

*** Settings ***
Library RequestsLibrary
Library Collections
*** Variables ***
${header} {'Content-Type': 'application/json','X-APP-ID':'503258978847953924'}
*** Test Cases ***
login
${header} Create Dictionary Content-Type=application/json X-APP-ID=503258978847953924
Create Session ZTBF http://api-client-uec-test.qniao.cn ${header}
${data} Create Dictionary account=13517986787 captcha=888888 accountType=2
log ${data}
#${data} Set Variable {"account":"13517986787","accountType":2,"captcha":"888888","signType":1,"sign":"c2d5ef09b96575e04503461af4bc7044","signStr":"{\"account\":\"13517986787\",\"accountType\":2,\"captcha\":\"888888\",\"signType\":1}"}
${respones} POST On Session ZTBF /uec/authorize/by-captcha json=${data}
${gettoken} Get From Dictionary ${respones.json()["data"]} token
Set Global Variable ${gettoken}
login-token
${header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847953924 Authorization=QNT ${gettoken}
Create Session ZTB https://api-client-ztb-test.qniao.cn ${header}
${data} Set Variable {"loginToken":"iHP4V/g6O5DXHixyNrf7tiEqeqolNkEcjrvrx0L2SEViRwIt3pF89Av3SPmQ/4DDkNTf2tJix8dVTigIo/0C2A==","signType":1,"sign":"485c081cb954d1fd6d448c939e9f5b1d","signStr":"{\"loginToken\":\"iHP4V/g6O5DXHixyNrf7tiEqeqolNkEcjrvrx0L2SEViRwIt3pF89Av3SPmQ/4DDkNTf2tJix8dVTigIo/0C2A==\",\"signType\":1}"}
${respones} POST On Session ZTB recycle-user-center/authorize/get/product-line-token/by/login-token ${data}
员工管理
${header} Create Dictionary X-APP-ID=503258978847953924 X-FACTORY-ID=615992051053498368 Authorization=QNT ${gettoken}
Create Session ZTBF https://api-client-ztb-test.qniao.cn ${header}
${reps} Get On Session ZTBF recycle-user-center/get/self-department-role-list