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.
21 lines
1.1 KiB
21 lines
1.1 KiB
*** Settings ***
|
|
Library RequestsLibrary
|
|
|
|
*** Test Cases ***
|
|
pwlogin
|
|
${header} Create Dictionary Content-Type=application/x-www-form-urlencoded X-APP-ID=470236309865238555
|
|
Create Session ZTBT http://api-ops-ztb-test.qniao.cn ${header}
|
|
&{data} Create Dictionary username=laiyonglan@qniao.cn password=qn123456
|
|
log ${data}
|
|
${reps} Post On Session ZTBT recycle-service/admin/login data=${data}
|
|
log ${reps.json()}
|
|
${gettoken} Set Variable Token 6b08add42d6bcf73abb935b2adf83525
|
|
Should Be Equal As Strings ${reps.json()["message"]} 登陆成功
|
|
Set Global Variable ${gettoken}
|
|
|
|
login-info
|
|
${header} Create Dictionary X-APP-ID=470236309865238555 Authorization=Token 6b08add42d6bcf73abb935b2adf83525
|
|
Create Session login-info http://api-ops-ztb-test.qniao.cn ${header}
|
|
${reps_data} Get On Session login-info recycle-service/admin/employee/get/login-info
|
|
log ${reps_data}
|
|
Should Be Equal As Strings ${reps_data.json()["message"]} successful
|