Create Session dating ${${dating}.dating域名} ${client_header}
Create Session dating ${${dating}.dating域名} ${client_header}
${reps} GET On Session dating dating-agency-service/user/get/marriage/recommendation/page params=advancedQuery=false&queryType=1&minAge=18&maxAge=80&minHeight=0&maxHeight=207&minimumIncome=0&maximumIncome=10000000&unlock=0&pageNum=1&pageSize=1000
${reps} GET On Session dating dating-agency-service/user/get/marriage/recommendation/page params=advancedQuery=false&queryType=1&minAge=18&maxAge=80&minHeight=0&maxHeight=207&minimumIncome=0&maximumIncome=10000000&unlock=0&pageNum=1&pageSize=1000
@ -81,10 +82,105 @@ Library DatabaseLibrary
Set Global Variable ${total}
Set Global Variable ${total}
END
END
数据库查询征婚资料数量
数据库查询征婚资料数量-无条件
Connect To Database Using Custom Params pymysql database='dating_agency_service',user='root',password='qniaothreetwoonego',host='8.135.8.221'
Connect To Database Using Custom Params pymysql database='dating_agency_service',user='root',password='qniaothreetwoonego',host='8.135.8.221'
${genderCode} Set Variable If ${genderCode}==1 0 1
${genderCode} Set Variable If ${genderCode}==1 0 1
${check} Query SELECT COUNT(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '${genderCode}' AND `profile_photo` <> 'null' AND `is_delete` = '0' #查询数据库资料数量
${check} Query SELECT COUNT(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '${genderCode}' AND `profile_photo` <> 'null' AND `is_delete` = '0' #查询数据库资料数量
${count} Set Variable ${check[0][0]}
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
Disconnect From Database
用户查询${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=advancedQuery=false&queryType=1&minAge=18&maxAge=80&minHeight=0&maxHeight=207&minimumIncome=0&maximumIncome=10000000&maritalStatusCode=0&unlock=0&pageNum=1&pageSize=1000
${total} Get From Dictionary ${reps.json()['data']} total
Set Global Variable ${total}
END
数据库查询征婚资料数量-未婚
Connect To Database Using Custom Params pymysql database='dating_agency_service',user='root',password='qniaothreetwoonego',host='8.135.8.221'
${genderCode} Set Variable If ${genderCode}==1 0 1
${check} Query SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '${genderCode}' AND `profile_photo` <> 'null' AND `is_delete` = '0' AND `marital_status_code` = '0' #查询数据库资料数量
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
用户查询${dating}搜索列表-现居地
#无条件搜索
region固定省市-广州
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=advancedQuery=false&queryType=1&minAge=18&maxAge=80&minHeight=0&maxHeight=207&minimumIncome=0&maximumIncome=10000000&provinceCode=${provinceCode}&provinceName=${provinceName}&cityCode=${cityCode}&cityName=${cityName}&unlock=0&pageNum=1&pageSize=1000
${total} Get From Dictionary ${reps.json()['data']} total
Set Global Variable ${total}
END
数据库查询征婚资料数量-现居地
Connect To Database Using Custom Params pymysql database='dating_agency_service',user='root',password='qniaothreetwoonego',host='8.135.8.221'
${genderCode} Set Variable If ${genderCode}==1 0 1
${check} Query SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '${genderCode}' AND `profile_photo` <> 'null' AND `is_delete` = '0' AND `province_code` = '${provinceCode}' AND `province_name` = '${provinceName}' AND `city_code` = '${cityCode}' AND `city_name` = '${cityName}' #查询数据库资料数量
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
用户查询${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=advancedQuery=false&queryType=1&minAge=18&maxAge=80&minHeight=0&maxHeight=207&minimumIncome=0&maximumIncome=10000000&educationCode=${educationCode}&education=${education}&unlock=0&pageNum=1&pageSize=1000
${total} Get From Dictionary ${reps.json()['data']} total
Set Global Variable ${total}
END
数据库查询征婚资料数量-学历
Connect To Database Using Custom Params pymysql database='dating_agency_service',user='root',password='qniaothreetwoonego',host='8.135.8.221'
${genderCode} Set Variable If ${genderCode}==1 0 1
${check} Query SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '${genderCode}' AND `profile_photo` <> 'null' AND `is_delete` = '0' AND `education_code` = '${educationCode}' AND `education` = '${education}' #查询数据库资料数量
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
选择${dating}征婚人的学历
#获取学历列表
FOR ${client_header} IN @{Cheader_list}
Create Session dating ${${dating}.dating域名} ${client_header}
${reps} GET On Session dating dating-agency-service/user/get/education/list
${data_list} Get From Dictionary ${reps.json()} data
${education_data} Evaluate random.choice(${data_list}) random #随机获取学历
#${education_data} Get From List ${data_list} 3 #0高中以下,1中专,2大专,3本科。4硕士,5博士
${education} Get From Dictionary ${education_data} desc #学历名称
${educationCode} Get From Dictionary ${education_data} value #学历编码
Set Global Variable ${education}
Set Global Variable ${educationCode}
END
region固定省市-广州
Disable Warnings
Create Session region http://qncloud.oss-cn-shenzhen.aliyuncs.com
${reps} GET On Session region address.json
${local_data} Get From Dictionary ${reps.json()} data
FOR ${province} IN @{local_data} #省列表数据
${provinceCode} Get From Dictionary ${province} value #获取省编码
${provinceName} Get From Dictionary ${province} label #获取省名称
Exit For Loop If '${provinceName}'=='广东省'
END
${city_data} Get From Dictionary ${province} children #广东省市列表数据
FOR ${city} IN @{city_data}
${cityCode} Get From Dictionary ${city} value #获取市编码
${cityName} Get From Dictionary ${city} label #获取市名称
Exit For Loop If '${cityName}'=='广州市'
END
${district_data} Get From Dictionary ${city} children #广州市列表数据
log ${district_data}
${district} Evaluate random.choice(${district_data}) random
${districtCode} Get From Dictionary ${district} value #随机获取广州市区编码
${districtName} Get From Dictionary ${district} label #随机获取广州市区名称