9 changed files with 994 additions and 2748 deletions
Split View
Diff Options
-
20-Login/phone-test.txt
-
501-Applet/6-Activity/ActivityResource.robot
-
41-Applet/6-Activity/Avtivity.robot
-
801-Applet/6-Activity/LoginResource.robot
-
21-Applet/6-Activity/phone.txt
-
1Phone.txt
-
8output/log.html
-
3587output/output.xml
-
8output/report.html
@ -1,2 +1,2 @@ |
|||
手机号 |
|||
13168550964 |
|||
15675143029 |
|||
@ -0,0 +1,80 @@ |
|||
*** Settings *** |
|||
Library urllib3 |
|||
Library String |
|||
Library DateTime |
|||
Library Collections |
|||
Library RequestsLibrary |
|||
Library DatabaseLibrary |
|||
Library OperatingSystem |
|||
|
|||
*** Keywords *** |
|||
读取TXT文件 |
|||
#读取TXT文件 |
|||
${file} Get File ${CURDIR}\\phone.txt #读取文件 |
|||
${skip-line} Set Variable 1 #跳过第一行 |
|||
${lines} Set Variable -1 #读取整个文件,从第二行开始 |
|||
${content} Get Lines Containing String ${file} ${skip-line} ${lines} |
|||
FOR ${id} IN ${content} |
|||
${id} String.Split String ${id} \n |
|||
END |
|||
Set Global Variable ${id} |
|||
|
|||
用户手机号验证码登录${dating}平台-888888 |
|||
#用户手机号验证码登录婚介平台 |
|||
${userid_list} Create List |
|||
${Cheader_list} Create List |
|||
${Aheader_list} Create List |
|||
${phoneList} Create List |
|||
FOR ${account} IN @{id} |
|||
Disable Warnings |
|||
Create Session dating ${${dating}.dating域名} ${${dating}.AHeader} |
|||
${data} Set Variable { \ \ "account":"${account}", \ \ "accountType":2, \ \ "captcha":888888 } #手机号验证码登录参数 |
|||
${reps} POST On Session dating /dating-agency-uec/authorize/by-captcha ${data.encode('utf-8')} |
|||
${code} Get From Dictionary ${reps.json()} code #获取相应状态码 |
|||
${token} Get From Dictionary ${reps.json()['data']} token #获取token |
|||
${userId} Get From Dictionary ${reps.json()['data']} userId #获取用户id |
|||
${message} Get From Dictionary ${reps.json()} message |
|||
${login_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT ${token}','X-Organization-Id':'963432943739605555'} #更新header |
|||
log ${login_header} |
|||
${client_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'50325897884795880','Authorization':'QNT ${token}'} |
|||
Append To List ${userid_list} ${userId} |
|||
Append To List ${Cheader_list} ${client_header} |
|||
Append To List ${Aheader_list} ${login_header} |
|||
Append To List ${phoneList} ${account} |
|||
Run Keyword If ${code}==0 Should Be Equal As Strings ${message} successful |
|||
... ELSE Should Be Equal As Strings ${message} 验证码错误或无效验证码,请重试! |
|||
END |
|||
Set Global Variable ${phoneList} |
|||
Set Global Variable ${userid_list} |
|||
Set Global Variable ${Aheader_list} |
|||
Set Global Variable ${Cheader_list} |
|||
Set Global Variable ${login_header} |
|||
Set Global Variable ${client_header} |
|||
|
|||
查询用户的${dating}组织 |
|||
#查询用户在婚介的组织数据 |
|||
${Aheader} Create List |
|||
FOR ${userId} ${login_header} IN ZIP ${userid_list} ${Aheader_list} |
|||
Disable Warnings |
|||
Create Session dating ${${dating}.dating域名} ${login_header} |
|||
${reps} GET On Session dating /dating-agency-uec/user/list/own-organization params=userId=${userid} |
|||
${data} Get From Dictionary ${reps.json()} data #获取用户组织数据 |
|||
${message} Get From Dictionary ${reps.json()} message |
|||
Should Be Equal As Strings ${message} successful |
|||
Run Keyword If ${data}==[] log 未获取到组织信息! |
|||
... ELSE log ${data} |
|||
END |
|||
|
|||
获取${dating}平台用户baseinfo |
|||
#获取baseinfo |
|||
${matchmakerFlagList} Create List |
|||
FOR ${admin_header} IN @{Aheader_list} |
|||
Create Session dating ${${dating}.dating域名} ${admin_header} |
|||
${reps} GET On Session dating dating-agency-uec/user/get/base-info |
|||
${phone} Get From Dictionary ${reps.json()['data']} phone #登录用户手机号 |
|||
${matchmakerFlag} Get From Dictionary ${reps.json()['data']} matchmakerFlag #登录用户是否是红娘 |
|||
Append To List ${matchmakerFlagList} ${matchmakerFlag} |
|||
END |
|||
Set Global Variable ${phone} |
|||
Set Global Variable ${matchmakerFlag} |
|||
Set Global Variable ${matchmakerFlagList} |
|||
@ -0,0 +1,2 @@ |
|||
手机号 |
|||
15014242835 |
|||
8
output/log.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
3587
output/output.xml
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save