diff --git a/DA_data.yaml b/DA_data.yaml index ac7c17c..a4b7e7a 100644 --- a/DA_data.yaml +++ b/DA_data.yaml @@ -1,7 +1,10 @@ 婚介: - UEC域名: http://dating-agency-api-test.qniao.cn - Header: {'Content-Type':'application/json','X-APP-ID':'50325897884795880','Authorization':'iHP4V/g6O5DXHixyNrf7tqm9NQUY2iykUwyijwv+6CYAmPXOz5yLZBPGAo6w2T84i0dM06R0EX8AG62EJziGfg=='} - Admin_Header: {'Content-Type':'application/json','X-APP-ID':'50325897884795880'} + dating域名: http://dating-agency-api-test.qniao.cn + Client域名: + CHeader: {'Content-Type':'application/json','X-APP-ID':'50325897884795880'} + Header: {'Content-Type':'application/json','X-APP-ID':'50325897884795880','Authorization':'iHP4V/g6O5DXHixyNrf7tn7+VIdU5Zwq5m1fgO3jm5PtMrj2OlLQWd+AfAy9eJMn9vowK3P78Iz93vXw55+blg=='} + AHeader: {'Content-Type':'application/json','X-APP-ID':'50325897884795881'} + 用户: diff --git a/Login/Login-interface.robot b/Login/Login-interface.robot index 842d22d..cc5d325 100644 --- a/Login/Login-interface.robot +++ b/Login/Login-interface.robot @@ -1,6 +1,6 @@ *** Settings *** Documentation 接口:短信验证码登录认证 -Suite Setup Import Variables ${CURDIR}\\DA_data.yaml +Suite Setup Import Variables ${EXECDIR}\\Dating-agency\\DA_data.yaml Resource resource.robot *** Test Cases *** @@ -9,8 +9,9 @@ Resource resource.robot Given 读取TXT文件 When 用户获取婚介平台短信验证码 Then 数据库查询用户生效且未过期的验证码 + #And 依次获取验证码 And 用户手机号验证码登录婚介平台 - And 查询用户的婚介组织 + #And 查询用户的婚介组织 手机号验证码已过期登录 #验证码已过期 @@ -18,3 +19,10 @@ Resource resource.robot When 用户获取婚介平台短信验证码 Then 数据库查询用户生效且已过期的验证码 And 用户手机号错误验证码登录婚介平台 + +000 + ${id-list} Create List 1 2 3 + FOR ${id} IN @{id-list} + Set Global Variable ${id} + END + ${tempdir} Set Variable ${EXECDIR} diff --git a/Login/phone-test.txt b/Login/phone-test.txt index f7bd761..4be3daa 100644 --- a/Login/phone-test.txt +++ b/Login/phone-test.txt @@ -1,2 +1,3 @@ 手机号 -13168550964 \ No newline at end of file +15014242835 +19128859944 \ No newline at end of file diff --git a/Login/resource.robot b/Login/resource.robot index ce5ebdf..c494421 100644 --- a/Login/resource.robot +++ b/Login/resource.robot @@ -41,8 +41,8 @@ Library OperatingSystem ${captcha} Set Variable ${check[0][0]} Set Global Variable ${captcha} Append To List ${captcha_list} ${captcha} + Disconnect From Database END - Disconnect From Database Set Global Variable ${captcha_list} 数据库查询用户生效且已过期的验证码 @@ -54,8 +54,8 @@ Library OperatingSystem ${check} Query SELECT code FROM da_captcha WHERE verifiable_account = '${account}' AND status = 1 AND is_delete = 0 AND expired_time < '${Time}' #查询手机号获取的验证码 ${captcha} Set Variable ${check[0][0]} Append To List ${captcha_list} ${captcha} + Disconnect From Database END - Disconnect From Database Set Global Variable ${captcha} Set Global Variable ${captcha_list} @@ -67,7 +67,7 @@ Library OperatingSystem 用户手机号验证码登录${dating}平台 #用户手机号验证码登录婚介平台 - FOR ${account} IN @{id} + FOR ${account} ${captcha} IN ZIP ${id} ${captcha_list} Disable Warnings Create Session dating ${${dating}.dating域名} ${${dating}.AHeader} ${data} Set Variable { \ \ "account":"${account}", \ \ "accountType":2, \ \ "captcha":"${captcha}" } #手机号验证码登录参数 @@ -81,7 +81,6 @@ Library OperatingSystem Run Keyword If ${code}==0 Should Be Equal As Strings ${message} successful ... ELSE Should Be Equal As Strings ${message} 验证码错误或无效验证码,请重试! END - Set Global Variable ${userId} Set Global Variable ${login_header} Set Global Variable ${client_header} @@ -105,3 +104,10 @@ Library OperatingSystem ${reps} GET On Session dating /dating-agency-uec/user/list/own-organization params=userId=${userid} ${message} Get From Dictionary ${reps.json()} message Should Be Equal As Strings ${message} successful + +000 + ${result} Create List 4 5 6 + FOR ${i} IN @{result} + ${data} Set Variable { \ \ \ \ "id": "${id}", \ \ \ \ "result": "${i}" } + log ${data} + END diff --git a/WriteInfo/DA_data.yaml b/WriteInfo/DA_data.yaml index 0ad92fe..a4b7e7a 100644 --- a/WriteInfo/DA_data.yaml +++ b/WriteInfo/DA_data.yaml @@ -3,6 +3,7 @@ Client域名: CHeader: {'Content-Type':'application/json','X-APP-ID':'50325897884795880'} Header: {'Content-Type':'application/json','X-APP-ID':'50325897884795880','Authorization':'iHP4V/g6O5DXHixyNrf7tn7+VIdU5Zwq5m1fgO3jm5PtMrj2OlLQWd+AfAy9eJMn9vowK3P78Iz93vXw55+blg=='} + AHeader: {'Content-Type':'application/json','X-APP-ID':'50325897884795881'} diff --git a/WriteInfo/Infomation.robot b/WriteInfo/Infomation.robot index fc68ecc..9b1fc66 100644 --- a/WriteInfo/Infomation.robot +++ b/WriteInfo/Infomation.robot @@ -1,12 +1,12 @@ *** Settings *** -Suite Setup Import Variables ${CURDIR}\\DA_data.yaml +Suite Setup Import Variables ${EXECDIR}\\Dating-agency\\DA_data.yaml Resource InfoResource.robot Resource ../Login/resource.robot Library Collections Library RequestsLibrary *** Test Cases *** -WritebaseInfo +用户首次填写资料 Given 用户首次填写婚介资料 Then 选择婚介性别资料 And 选择婚介征婚人的城市 @@ -17,54 +17,6 @@ WritebaseInfo And 选择婚介征婚人的月收入 And 选择婚介征婚人的昵称 -sex_info - #选择性别 - #Given 用户打开小程序 - Given 选择婚介性别资料 - #And 重新进入小程序 - -city_info - #选择推荐城市 - Given 用户打开小程序 - Then 选择婚介证婚人的城市 - And 返回上一步 - And 重新进入小程序 - -age_info - #选择出生年份 - Given 用户打开小程序 - Then 选择${dating}征婚人的出生年份 - And 返回上一步 - And 重新进入小程序 - -hight_info - #选择身高 - Given 用户打开小程序 - Then 选择${dating}征婚人的身高 - And 返回上一步 - And 重新进入小程序 - -edu_info - #选择学历 - Given 用户打开小程序 - Then 选择${dating}征婚人的学历 - And 返回上一步 - And 重新进入小程序 - -marry_info - #选择婚姻状况 - Given 用户打开小程序 - Then 选择${dating}征婚人的婚姻状况 - And 返回上一步 - And 重新进入小程序 - -money_info - #选择月收入 - Given 用户打开小程序 - Then 月收入 - And 返回上一步 - And 重新进入小程序 - region Disable Warnings Create Session region http://qncloud.oss-cn-shenzhen.aliyuncs.com