diff --git a/0-Login/phone-test.txt b/0-Login/phone-test.txt index 808563b..7cd26e0 100644 --- a/0-Login/phone-test.txt +++ b/0-Login/phone-test.txt @@ -1,2 +1,2 @@ 手机号 -18898674523 \ No newline at end of file +18873415690 \ No newline at end of file diff --git a/1-Applet/2-Homepage/BlindDate/Blind.robot b/1-Applet/2-Homepage/BlindDate/Blind.robot index 9f3f183..e4ae9b3 100644 --- a/1-Applet/2-Homepage/BlindDate/Blind.robot +++ b/1-Applet/2-Homepage/BlindDate/Blind.robot @@ -12,5 +12,23 @@ Resource BlindResource.robot 用户搜索征婚资料-无条件 Given 查询婚介征婚人的资料信息 And 查询婚介征婚人资料 - When 用户查询婚介搜索列表 - Then 数据库查询征婚资料数量 + When 用户查询婚介搜索列表-无条件 + Then 数据库查询征婚资料数量-无条件 + +用户搜索征婚资料-未婚 + Given 查询婚介征婚人的资料信息 + And 查询婚介征婚人资料 + When 用户查询婚介搜索列表-未婚 + Then 数据库查询征婚资料数量-未婚 + +用户搜索征婚资料-现居地 + Given 查询婚介征婚人的资料信息 + And 查询婚介征婚人资料 + When 用户查询婚介搜索列表-现居地 + Then 数据库查询征婚资料数量-现居地 + +用户搜索征婚资料-学历 + Given 查询婚介征婚人的资料信息 + And 查询婚介征婚人资料 + When 用户查询婚介搜索列表-学历 + Then 数据库查询征婚资料数量-学历 diff --git a/1-Applet/2-Homepage/BlindDate/BlindResource.robot b/1-Applet/2-Homepage/BlindDate/BlindResource.robot index 7ed1d62..cd20456 100644 --- a/1-Applet/2-Homepage/BlindDate/BlindResource.robot +++ b/1-Applet/2-Homepage/BlindDate/BlindResource.robot @@ -73,7 +73,8 @@ Library DatabaseLibrary Set Global Variable ${age_list} Set Global Variable ${height_list} -用户查询${dating}搜索列表 +用户查询${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&unlock=0&pageNum=1&pageSize=1000 @@ -81,10 +82,105 @@ Library DatabaseLibrary 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' #查询数据库资料数量 ${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&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 #随机获取广州市区名称 + Set Global Variable ${cityCode} + Set Global Variable ${cityName} + Set Global Variable ${districtCode} + Set Global Variable ${districtName} + Set Global Variable ${provinceCode} + Set Global Variable ${provinceName} diff --git a/1-Applet/2-Homepage/MarriageInfo/Authentication.robot b/1-Applet/2-Homepage/MarriageInfo/Authentication.robot index a3b7851..b5f8e59 100644 --- a/1-Applet/2-Homepage/MarriageInfo/Authentication.robot +++ b/1-Applet/2-Homepage/MarriageInfo/Authentication.robot @@ -385,7 +385,7 @@ Resource ../../../0-Login/LoginResource.robot Set Global Variable ${education} Set Global Variable ${educationCode} END - #提交择偶学历 + #提交个人资料学历 FOR ${miId} ${client_header} IN ZIP ${miId_list} ${Cheader_list} Create Session dating ${${dating}.dating域名} ${client_header} ${data} Set Variable { \ \ \ \ "id": "${miId}", \ \ \ \ "education": "${education}", \ \ \ \ "educationCode": ${educationCode} } diff --git a/output/log.html b/output/log.html index a87a7df..e20f8a4 100644 --- a/output/log.html +++ b/output/log.html @@ -1806,25 +1806,25 @@ function stopPropagation(event) { window.output = {};