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.
33 lines
1.7 KiB
33 lines
1.7 KiB
*** Settings ***
|
|
Library RequestsLibrary
|
|
Library Collections
|
|
Library urllib3
|
|
|
|
*** Variables ***
|
|
&{operation_psc_header} Content-Type=application/x-www-form-urlencoded X-APP-ID=503258978847965324
|
|
|
|
*** Test Cases ***
|
|
operate_mail
|
|
Disable Warnings
|
|
Create Session pscops https://api-ops-psc-test.qniao.cn headers=${operation_psc_header}
|
|
&{data} Create Dictionary username=liangjinman@qniao.cn password=qn123456
|
|
${resp} POST On Session pscops /payment-settlement-center/admin/login ${data}
|
|
Log ${resp.status_code}
|
|
Log ${resp.text}
|
|
Log ${resp.json()}
|
|
Should Be Equal As Numbers 200 ${resp.status_code}
|
|
Should Be Equal As Strings 登陆成功 ${resp.json()["message"]}
|
|
${gettoken_operate_psc} get from Dictionary ${resp.headers} Authorization
|
|
log ${gettoken_operate_psc}
|
|
Set Global Variable ${gettoken_operate_psc}
|
|
&{operationpsc_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847965324 Authorization=${gettoken_operate_psc}
|
|
Set Suite Variable ${operationpsc_header}
|
|
|
|
get_operate_userinfo
|
|
Create Session pscops https://api-ops-psc-test.qniao.cn headers=${operationpsc_header}
|
|
${response} Get On Session pscops /payment-settlement-center/admin/employee/get/login-info
|
|
log ${response.json()}
|
|
Should Be Equal As Numbers 200 ${response.status_code}
|
|
Should Be Equal As Strings successful ${response.json()["message"]}
|
|
Should Be Equal As Strings 498985714734731264 ${response.json()["data"]["adminId"]}
|
|
Should Be Equal As Strings 管理员 ${response.json()["data"]["positionList"][0]["name"]}
|