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}
Append To List ${genderCodeList} ${genderCode}
Should Be Equal As Strings ${message} successful
END
Set Global Variable ${nickName}
Set Global Variable ${miId_list}
Set Global Variable ${genderCode}
Set Global Variable ${genderCodeList}
查询${dating}征婚人资料
#通过miId查询征婚人资料
@ -86,58 +88,78 @@ Library DatabaseLibrary
用户查询${dating}搜索列表-无条件
#无条件搜索
FOR ${client_header} IN @{Cheader_list}
${totalList} Create List
FOR ${client_header} ${matchmakerFlag} IN ZIP ${Cheader_list} ${matchmakerFlagList}
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&matchmakerFlag=${matchmakerFlag}
${total} Get From Dictionary ${reps.json()['data']} total
Set Global Variable ${total}
Append To List ${totalList} ${total}
Set Global Variable ${totalList}
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' #查询数据库资料数量
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
FOR ${genderCode} ${total} IN ZIP ${genderCodeList} ${totalList}
Connect To Database Using Custom Params pymysql database='dating_agency_service',user='root',password='qniaothreetwoonego',host='8.135.8.221'
${checkData} Set Variable If ${genderCode}==None SELECT COUNT(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `profile_photo` <> 'null' AND `is_delete` = '0' #查询数据库资料数量
... ${genderCode}==1 SELECT COUNT(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '0' AND `profile_photo` <> 'null' AND `is_delete` = '0'
... ${genderCode}==0 SELECT COUNT(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '1' AND `profile_photo` <> 'null' AND `is_delete` = '0'
${check} Query ${checkData}
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
END
用户查询${dating}搜索列表-婚姻状况
#微醺条件搜索
${StatusCode} Create List 0 1 2
${maritalCode} Evaluate random.choice(${StatusCode}) random #随机获取多个婚姻状况
FOR ${client_header} IN @{Cheader_list}
${totalList} Create List
${maritalCodeList} Create List
FOR ${client_header} ${matchmakerFlag} IN ZIP ${Cheader_list} ${matchmakerFlagList}
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=${maritalCode}&unlock=0&pageNum=1&pageSize=1000
${maritalCode} Evaluate random.choice(${StatusCode}) random #随机获取多个婚姻状况
${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=${maritalCode}&unlock=0&pageNum=1&pageSize=1000&matchmakerFlag=${matchmakerFlag}
${total} Get From Dictionary ${reps.json()['data']} total
Set Global Variable ${total}
Append To List ${totalList} ${total}
Append To List ${maritalCodeList} ${maritalCode}
Set Global Variable ${totalList}
Set Global Variable ${maritalCodeList}
END
Set Global Variable ${maritalCode}
数据库查询征婚资料数量-婚姻状况
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` = '${maritalCode}' #查询数据库资料数量
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
FOR ${maritalCode} ${genderCode} ${total} IN ZIP ${maritalCodeList} ${genderCodeList} ${totalList}
Connect To Database Using Custom Params pymysql database='dating_agency_service',user='root',password='qniaothreetwoonego',host='8.135.8.221'
${checkData} Set Variable If ${genderCode}==None SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `profile_photo` <> 'null' AND `is_delete` = '0' AND `marital_status_code` = '${maritalCode}'
... ${genderCode}==0 SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = 1 AND `profile_photo` <> 'null' AND `is_delete` = '0' AND `marital_status_code` = '${maritalCode}'
... ${genderCode}==1 SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = 0 AND `profile_photo` <> 'null' AND `is_delete` = '0' AND `marital_status_code` = '${maritalCode}'
${check} Query ${checkData} #查询数据库资料数量
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
END
用户查询${dating}搜索列表-现居地
#无条件搜索
#region固定省市-广州
FOR ${client_header} IN @{Cheader_list}
region固定省市-广州
${totalList} Create List
FOR ${client_header} ${matchmakerFlag} IN ZIP ${Cheader_list} ${matchmakerFlagList}
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
${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&matchmakerFlag=${matchmakerFlag}
${total} Get From Dictionary ${reps.json()['data']} total
Set Global Variable ${total}
Append To List ${totalList} ${total}
Set Global Variable ${totalList}
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 `city_code` = '${cityCode}' #查询数据库资料数量
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
FOR ${genderCode} ${total} IN ZIP ${genderCodeList} ${totalList}
Connect To Database Using Custom Params pymysql database='dating_agency_service',user='root',password='qniaothreetwoonego',host='8.135.8.221'
${checkData} Set Variable If ${genderCode}==None SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE \ `profile_photo` <> 'null' AND `is_delete` = '0' AND `province_code` = '${provinceCode}' AND `city_code` = '${cityCode}'
... ${genderCode}==0 SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '1' AND `profile_photo` <> 'null' AND `is_delete` = '0' AND `province_code` = '${provinceCode}' AND `city_code` = '${cityCode}'
... ${genderCode}==1 SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '$1' AND `profile_photo` <> 'null' AND `is_delete` = '0' AND `province_code` = '${provinceCode}' AND `city_code` = '${cityCode}'
${check} Query ${checkData} #查询数据库资料数量
${count} Set Variable ${check[0][0]}
Should Be Equal As Numbers ${count} ${total}
Disconnect From Database
END
region固定省市-广州
Disable Warnings
@ -169,21 +191,27 @@ region固定省市-广州
用户查询${dating}搜索列表-学历
#微醺条件搜索
#选择婚介征婚人的学历
FOR ${client_header} IN @{Cheader_list}
选择婚介征婚人的学历
${totalList} Create List
FOR ${client_header} ${matchmakerFlag} IN ZIP ${Cheader_list} ${matchmakerFlagList}
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
${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&matchmakerFlag=${matchmakerFlag}
${total} Get From Dictionary ${reps.json()['data']} total
Set Global Variable ${total}
Append To List ${totalList} ${total}
Set Global Variable ${totalList}
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
FOR ${genderCode} ${total} IN ZIP ${genderCodeList} ${totalList}
Connect To Database Using Custom Params pymysql database='dating_agency_service',user='root',password='qniaothreetwoonego',host='8.135.8.221'
${checkData} Set Variable If ${genderCode}==None SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `profile_photo` <> 'null' AND `is_delete` = '0' AND `education_code` = '${educationCode}' AND `education` = '${education}'
... ${genderCode}==0 SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '1' AND `profile_photo` <> 'null' AND `is_delete` = '0' AND `education_code` = '${educationCode}' AND `education` = '${education}'
... ${genderCode}==1 SELECT count(*) FROM `dating_agency_service`.`da_marriage_information` WHERE `gender_code` = '0' AND `profile_photo` <> 'null' AND `is_delete` = '0' AND `education_code` = '${educationCode}' AND `education` = '${education}'