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.
36 lines
1.7 KiB
36 lines
1.7 KiB
*** Settings ***
|
|
Suite Setup
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
|
|
*** Variables ***
|
|
${header} {'content-type':'application/json','X-APP-ID':'470236309865238528'}
|
|
|
|
*** Test Cases ***
|
|
userlogin
|
|
[Setup]
|
|
#验证码登录
|
|
#${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528
|
|
Create Session ZTBT http://api-client-uec-test.qniao.cn ${header}
|
|
${data} Create Dictionary account=15014242835 captcha=888888 accountType=2
|
|
${respones} POST On Session ZTBT /uec/authorize/by-captcha json=${data}
|
|
log ${respones.status_code}
|
|
log ${respones.json()}
|
|
#${gettoken} Get From Dictionary ${respones.json()["data"]} token
|
|
#log ${respones.json()["data"]["token"]}
|
|
#Set Global Variable ${gettoken}
|
|
[Teardown]
|
|
|
|
login-token
|
|
#${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528
|
|
Create Session ZTBT http://api-client-ztb-test.qniao.cn ${header}
|
|
${token} Create Dictionary loginToken=d6SX3ESr8Jb2tYq/89Ft7Il1BXlAwuqExhT0SidZaW5Qvn46CGIPL5/MAlzIPOqJCEf163PPtJkxGAlYXRd5Fg==
|
|
${reps} Post On Session ZTBT recycle-user-center/authorize/get/product-line-token/by/login-token json=${token}
|
|
${gettoken} Get From Dictionary ${reps.json()["data"]} token
|
|
log ${reps.json()["data"]["token"]}
|
|
Set Global Variable ${gettoken}
|
|
|
|
getuserinfo
|
|
${header} Create Dictionary content-type=application/json X-APP-ID=470236309865238528 Authorization=${gettoken}
|
|
Create Session userinfo https://api-client-uec-test.qniao.cn ${header}
|
|
${reps} Get On Session userinfo /uec/get/user-info
|