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.
81 lines
4.5 KiB
81 lines
4.5 KiB
*** Settings ***
|
|
Library urllib3
|
|
Library String
|
|
Library Collections
|
|
Library RequestsLibrary
|
|
Library DatabaseLibrary
|
|
|
|
*** Keywords ***
|
|
查询${dating}征婚人的资料信息
|
|
#通过userid获取征婚人的资料
|
|
FOR ${userId} ${client_header} IN ZIP ${userid_list} ${Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${reps} GET On Session dating /dating-agency-service/user/get/marriage/information/details params=userId=${userId}
|
|
${miId} Get From Dictionary ${reps.json()['data']} id #获取资料id
|
|
${nickName} Get From Dictionary ${reps.json()['data']} nickName #获取用户名称
|
|
${miId_list} Create List
|
|
${genderCode} Get From Dictionary ${reps.json()['data']} genderCode #用户性别
|
|
${message} Get From Dictionary ${reps.json()} message
|
|
Append To List ${miId_list} ${miId}
|
|
log ${miId_list}
|
|
Should Be Equal As Strings ${message} successful
|
|
END
|
|
Set Global Variable ${nickName}
|
|
Set Global Variable ${miId_list}
|
|
Set Global Variable ${genderCode}
|
|
|
|
查询${dating}征婚人资料
|
|
#通过miId查询征婚人资料
|
|
FOR ${miId} ${client_header} IN ZIP ${miId_list} ${Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${reps} GET On Session dating dating-agency-service/user/get/marriage/information/details/byid params=miId=${miId}
|
|
${age} Get From Dictionary ${reps.json()['data']} age #年龄
|
|
${height} Get From Dictionary ${reps.json()['data']} height #获取征婚人身高
|
|
${cityCode} Get From Dictionary ${reps.json()['data']} cityCode #现居市编码
|
|
${cityName} Get From Dictionary ${reps.json()['data']} cityName #现居市名称
|
|
${birthYear} Get From Dictionary ${reps.json()['data']} birthYear #出生年份
|
|
${education} Get From Dictionary ${reps.json()['data']} education #学历名称
|
|
${genderCode} Get From Dictionary ${reps.json()['data']} genderCode #性别
|
|
${provinceCode} Get From Dictionary ${reps.json()['data']} provinceCode #现居省编码
|
|
${provinceName} Get From Dictionary ${reps.json()['data']} provinceName #现居省名称
|
|
${educationCode} Get From Dictionary ${reps.json()['data']} educationCode #学历编码
|
|
END
|
|
Set Global Variable ${age}
|
|
Set Global Variable ${height}
|
|
Set Global Variable ${cityCode}
|
|
Set Global Variable ${cityName}
|
|
Set Global Variable ${birthYear}
|
|
Set Global Variable ${education}
|
|
Set Global Variable ${genderCode}
|
|
Set Global Variable ${provinceCode}
|
|
Set Global Variable ${provinceName}
|
|
Set Global Variable ${educationCode}
|
|
|
|
查看${dating}平台相亲列表
|
|
#相亲推荐页
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${reps} GET On Session dating dating-agency-service/user/get/marriage/recommendation/page params=queryType=0&pageNum=1&pageSize=30
|
|
${records} Get From Dictionary ${reps.json()['data']} records #推荐列表
|
|
${userData} Evaluate random.choice(${records}) random
|
|
${miId} Get From Dictionary ${userData} miId #资料id
|
|
Set Global Variable ${miId}
|
|
END
|
|
|
|
用户标记${dating}资料like
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${data} Set Variable {"miId":"${miId}"}
|
|
${reps} POST On Session dating dating-agency-service/user/like/his ${data.encode('utf-8')}
|
|
END
|
|
|
|
用户查询${dating}我喜欢列表
|
|
#查询我喜欢列表
|
|
FOR ${client_header} IN @{Cheader_list}
|
|
Create Session dating ${${dating}.dating域名} ${client_header}
|
|
${reps} GET On Session dating /dating-agency-service/user/get/user/mutual/attention/page params=pageNum=1&pageSize=10&attentionType=0
|
|
${records} Get From Dictionary ${reps.json()['data']} records
|
|
${Data} Evaluate random.choice(${records}) random
|
|
${miIdData} Get From Dictionary ${Data} miId
|
|
Exit For Loop If ${miIdData}==${miId}
|
|
END
|