From d9b87733a1308abf56aebbd29cc836727f0fa596 Mon Sep 17 00:00:00 2001 From: LG_lai Date: Mon, 8 Aug 2022 11:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 000-LoginToken/1-dataDriven.robot | 68 ++++++++++++++ 000-LoginToken/2.1-APPlogin.robot | 83 +++++++++++++++++ 000-LoginToken/2.2-APPlogin.robot | 63 +++++++++++++ 000-LoginToken/3-WebLogin.robot | 87 ++++++++++++++++++ 000-LoginToken/__init__.txt | 0 001-DirectSale/__init__.txt | 3 + 002-AgentSale/__init__.txt | 3 + 003-DirectSaleForwardFactoring/__init__.txt | 3 + 004-DirectSaleReverseFactoring/__init__.txt | 3 + .../3-Factoring/1.1-Trader.robot | 32 ++++--- 005-AgencyForwardFactoring/__init__.txt | 3 + 006-CounterFactoring/__init__.txt | 3 + Datadriven.xls | Bin 9728 -> 9728 bytes DatadrivenB-1.xls | Bin 9728 -> 9728 bytes DatadrivenB-2.xls | Bin 9728 -> 9728 bytes DatadrivenC-1.xls | Bin 9728 -> 9728 bytes DatadrivenC-2.xls | Bin 9728 -> 9728 bytes DatadrivenF.xls | Bin 9728 -> 9728 bytes DatadrivenP.xls | Bin 9728 -> 9728 bytes RF-TEST/2-Platform/Auction.robot | 17 ++-- 20 files changed, 348 insertions(+), 20 deletions(-) create mode 100644 000-LoginToken/1-dataDriven.robot create mode 100644 000-LoginToken/2.1-APPlogin.robot create mode 100644 000-LoginToken/2.2-APPlogin.robot create mode 100644 000-LoginToken/3-WebLogin.robot create mode 100644 000-LoginToken/__init__.txt create mode 100644 001-DirectSale/__init__.txt create mode 100644 002-AgentSale/__init__.txt create mode 100644 003-DirectSaleForwardFactoring/__init__.txt create mode 100644 004-DirectSaleReverseFactoring/__init__.txt create mode 100644 005-AgencyForwardFactoring/__init__.txt create mode 100644 006-CounterFactoring/__init__.txt diff --git a/000-LoginToken/1-dataDriven.robot b/000-LoginToken/1-dataDriven.robot new file mode 100644 index 0000000..4a27eb6 --- /dev/null +++ b/000-LoginToken/1-dataDriven.robot @@ -0,0 +1,68 @@ +*** Settings *** +Library ExcelLibrary +Library DateTime +Library String +Library Collections +Library RequestsLibrary +Library urllib3 +Library DatabaseLibrary + +*** Test Cases *** +LoginBase + #登录域名 + ${uecops} Set Variable https://api-ops-uec-test.qniao.cn #uec系统域名 + ${pscops} Set Variable https://api-ops-psc-test.qniao.cn #psc系统域名 + ${ztbops} Set Variable https://api-ops-ztb-test.qniao.cn #ztb域名 + ${ztbscops} Set Variable https://api-ops-ztbsc-test.qniao.cn #ztbsc域名 + ${uecclient} Set Variable https://api-client-uec-test.qniao.cn #uec客户端域名 + ${ztbclient} Set Variable https://api-client-ztb-test.qniao.cn #client域名 + Set Global Variable ${uecops} + Set Global Variable ${pscops} + Set Global Variable ${ztbops} + Set Global Variable ${ztbscops} + Set Global Variable ${uecclient} + Set Global Variable ${ztbclient} + #登录header + ${ztbsc_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'503258978847965401','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525'} #平台header + ${client_login_header} Set Variable {'content-type':'application/json','X-APP-ID':'470236309865238528'} #客户端登录header + ${ztbsc_factoring_header} Set Variable {'Content-Type':'application/json','Authorization':'QNT iHP4V/g6O5DXHixyNrf7tihI0qZFU9sOo6jfU0FD4Cv/lnjIGaghUHn7dGvathVr0JtFAle6xxEDqmwYB+xHfw==','X-APP-ID':'503258978847966410','X-ORGANIZATION-ID':'710132392618233856'} #保理商端header + ${ztbsc_ops_login_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'503258978847965401','Authorization':'Token 6b08add42d6bcf73abb935b2adf83525'} #平台登录header + ${ztbsc_traders_login_header} Set Variable {'Content-Type':'application/json','X-ORGANIZATION-ID':'711270061419139072','X-APP-ID':'503258978847966406'} #代理商端登录header + ${ztbsc_papermill_login_header} Set Variable {'Content-Type':'application/json','X-APP-ID':'503258978847966406'} #纸厂端登录header + ${ztbsc_factoring_login_header} Set Variable {'Content-Type':'application/json','X-ORGANIZATION-ID':'710132392618233856','X-APP-ID':'503258978847966410'} #保理商端登录header + Set Global Variable ${ztbsc_header} + Set Global Variable ${client_login_header} + Set Global Variable ${ztbsc_factoring_header} + Set Global Variable ${ztbsc_ops_login_header} + Set Global Variable ${ztbsc_traders_login_header} + Set Global Variable ${ztbsc_papermill_login_header} + Set Global Variable ${ztbsc_factoring_login_header} + #登录账号 + ${ztbsc_account} Set Variable laiyonglan@qniao.cn #平台登录账号 + ${client_account} Set Variable 13000000032 #移动端登录账号 + ${traders_account} Set Variable 15014242835 #代理商端登录账号 + ${papermill_account} Set Variable 15014242835 #纸厂端登录账号 + ${factoring_account} Set Variable 15014242835 #保理商端登录账号 + Set Global Variable ${ztbsc_account} + Set Global Variable ${client_account} + Set Global Variable ${traders_account} + Set Global Variable ${papermill_account} + Set Global Variable ${factoring_account} + #登录密码 + ${ztbsc_password} Set Variable qn123456 #平台登录密码 + ${client_password} Set Variable 888888 #移动端登录密码 + ${traders_password} Set Variable 888888 #代理商端登录密码 + ${papermill_password} Set Variable 888888 #纸厂端登录密码 + ${factoring_password} Set Variable 888888 #保理商端登录密码 + Set Global Variable ${ztbsc_password} + Set Global Variable ${client_password} + Set Global Variable ${traders_password} + Set Global Variable ${papermill_password} + Set Global Variable ${factoring_password} + ${start_time} get current date result_format=%Y-%m-%d + ${str_end_time} Add Time To Date ${start_time} 30 days + ${end_time} Get Substring ${str_end_time} 0 10 + ${time} Get Time + Set Global Variable ${start_time} + Set Global Variable ${end_time} + Set Global Variable ${time} diff --git a/000-LoginToken/2.1-APPlogin.robot b/000-LoginToken/2.1-APPlogin.robot new file mode 100644 index 0000000..099c546 --- /dev/null +++ b/000-LoginToken/2.1-APPlogin.robot @@ -0,0 +1,83 @@ +*** Settings *** +Documentation \#登录客户端 +Test Setup +Library urllib3 +Library Collections +Library RequestsLibrary +Library ExcelLibrary + +*** Test Cases *** +user_login + #验证码登录 + Disable Warnings + Create Session ZTBT ${uecclient} ${client_login_header} + ${data} Create Dictionary account=${client_account} captcha=${client_password} accountType=2 + ${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data} + ${token} Get From Dictionary ${respones.json()['data']} token + Set Global Variable ${token} + +login_token + #转换业务token + Create Session ZTBT ${ztbclient} ${client_login_header} + ${token1} Create Dictionary loginToken=${token} + ${reps} Post On Session ZTBT ztb-user-enterprise-service/authorize/get/product-line-token/by/login-token json=${token1} + ${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id + ${gettoken} Get From Dictionary ${reps.json()["data"]} token #获取token + ${client_firstlogin_header} Set Variable {'Content-Type':'application/json','Authorization':'QNT ${gettoken}','X-APP-ID':'470236309865238528'} #移动端首次登录header + Set Global Variable ${userId} + Set Global Variable ${gettoken} + Set Global Variable ${client_firstlogin_header} + #Execl写入数据 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls + #Put String To Cell ztbsc 3 7 {'Content-Type':'application/json','Authorization':'QNT ${gettoken}','X-APP-ID':'470236309865238528'} #写入移动端请求头数据 + #Save Excel DatadrivenC-1.xls + #数据驱动 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenC-1.xls + #${client_firstlogin_header} Read Cell Data By Name ztbsc D8 #客户端首次登录header + #Set Global Variable ${client_firstlogin_header} + #sleep 0.5 + +get_baseInfo + #获取用户基础信息 + Create Session baseinfo ${ztbclient} ${client_firstlogin_header} + ${reps} GET On Session baseinfo ztb-supply-chain-service/get/user/base-info + ${realName} Get From Dictionary ${reps.json()['data']} realName #获取用户真实姓名 + ${organizationList} Get From Dictionary ${reps.json()['data']} organizationList #用户组织列表 + FOR ${items} IN @{organizationList} + ${orgId} Get From Dictionary ${items} id #组织id + ${orgfullName} Get From Dictionary ${items} fullName #组织名称 + ${packerBaseInfo} Get From Dictionary ${items} packerBaseInfo #组织工厂信息 + Exit For Loop If '${orgfullName}'=='仔仔工厂' + END + ${packerId} Get From Dictionary ${packerBaseInfo['scrapPaperPackingFactoryList'][0]} id #组织工厂id + ${packerName} Get From Dictionary ${packerBaseInfo['scrapPaperPackingFactoryList'][0]} name #组织工厂名称 + ${client_headerP} Set Variable {'Content-Type':'application/json','Authorization':'QNT ${gettoken}','X-APP-ID':'470236309865238528','X-ORGANIZATION-ID':'${orgId}','X-PACKING-FACTORY-ID':'${packerId}'} #个人组织header + Set Global Variable ${orgId} + Set Global Variable ${realName} + Set Global Variable ${packerId} + Set Global Variable ${packerName} + Set Global Variable ${orgfullName} + Set Global Variable ${client_headerP} + #Execl写入数据 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls + #Put String To Cell ztbsc 3 1 {'Content-Type':'application/json','Authorization':'QNT ${gettoken}','X-APP-ID':'470236309865238528','X-ORGANIZATION-ID':'${orgId}','X-PACKING-FACTORY-ID':'${packerId}'} #写入移动端请求头数据 + #Save Excel DatadrivenB-1.xls + #数据驱动 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenB-1.xls + #${client_headerP} Read Cell Data By Name ztbsc D2 #客户端首次登录header + #Set Global Variable ${client_headerP} + #sleep 0.5 + +get_Personal_baseInfo + #切换组织--个人 + Create Session baseinfo ${ztbclient} ${client_headerP} + ${reps} GET On Session baseinfo ztb-supply-chain-service/get/user/base-info + ${organizationList} Get From Dictionary ${reps.json()['data']} organizationList #用户组织列表 + FOR ${items} IN @{organizationList} + ${orgfullName} Get From Dictionary ${items} fullName #组织名称 + ${enterpriseInfo} Get From Dictionary ${items} enterpriseInfo #组织企业信息 + ${qualificationType} Get From Dictionary ${items} qualificationType + Exit For Loop If '${orgfullName}'=='仔仔工厂' + END + ${salesTaxPoint} Set Variable 2051 + Set Global Variable ${salesTaxPoint} diff --git a/000-LoginToken/2.2-APPlogin.robot b/000-LoginToken/2.2-APPlogin.robot new file mode 100644 index 0000000..335aaf1 --- /dev/null +++ b/000-LoginToken/2.2-APPlogin.robot @@ -0,0 +1,63 @@ +*** Settings *** +Documentation \#登录客户端 +Test Setup +Library urllib3 +Library Collections +Library RequestsLibrary +Library ExcelLibrary + +*** Test Cases *** +user_login + #验证码登录 + Disable Warnings + Create Session ZTBT ${uecclient} ${client_login_header} + ${data} Create Dictionary account=${client_account} captcha=${client_password} accountType=2 + ${respones} POST On Session ZTBT uec/authorize/by-captcha json=${data} + ${token} Get From Dictionary ${respones.json()['data']} token + Set Global Variable ${token} + +login_token + #转换业务token + Create Session ZTBT ${ztbclient} ${client_login_header} + ${token1} Create Dictionary loginToken=${token} + ${reps} Post On Session ZTBT ztb-user-enterprise-service/authorize/get/product-line-token/by/login-token json=${token1} + ${userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id + ${gettoken} Get From Dictionary ${reps.json()["data"]} token #获取token + Set Global Variable ${userId} + Set Global Variable ${gettoken} + +get_baseInfo + #获取用户基础信息 + Create Session baseinfo ${ztbclient} ${client_firstlogin_header} + ${reps} GET On Session baseinfo ztb-supply-chain-service/get/user/base-info + ${realName} Get From Dictionary ${reps.json()['data']} realName #获取用户真实姓名 + ${organizationList} Get From Dictionary ${reps.json()['data']} organizationList #用户组织列表 + FOR ${items} IN @{organizationList} + ${orgId} Get From Dictionary ${items} id #组织id + ${orgfullName} Get From Dictionary ${items} fullName #组织名称 + ${packerBaseInfo} Get From Dictionary ${items} packerBaseInfo #组织工厂信息 + Exit For Loop If '${orgfullName}'=='长沙中联泵业股份有限公司' + END + ${packerId} Get From Dictionary ${packerBaseInfo['scrapPaperPackingFactoryList'][0]} id #组织工厂id + ${packerName} Get From Dictionary ${packerBaseInfo['scrapPaperPackingFactoryList'][0]} name #组织工厂名称 + ${client_headerT} Set Variable {'Content-Type':'application/json','Authorization':'QNT ${gettoken}','X-APP-ID':'470236309865238528','X-ORGANIZATION-ID':'${orgId}','X-PACKING-FACTORY-ID':'${packerId}'} #企业组织header + Set Global Variable ${orgId} + Set Global Variable ${realName} + Set Global Variable ${packerId} + Set Global Variable ${packerName} + Set Global Variable ${orgfullName} + Set Global Variable ${client_headerT} + +get_Enterprise_baseInfo + #切换组织--企业 + Create Session baseinfo ${ztbclient} ${client_headerT} + ${reps} GET On Session baseinfo ztb-supply-chain-service/get/user/base-info + ${organizationList} Get From Dictionary ${reps.json()['data']} organizationList #用户组织列表 + FOR ${items} IN @{organizationList} + ${orgfullName} Get From Dictionary ${items} fullName #组织名称 + ${enterpriseInfo} Get From Dictionary ${items} enterpriseInfo #组织企业信息 + ${qualificationType} Get From Dictionary ${items} qualificationType + Exit For Loop If '${orgfullName}'=='长沙中联泵业股份有限公司' + END + ${salesTaxPoint} Get From Dictionary ${enterpriseInfo} salesTaxPoint + Set Global Variable ${salesTaxPoint} diff --git a/000-LoginToken/3-WebLogin.robot b/000-LoginToken/3-WebLogin.robot new file mode 100644 index 0000000..0d210d9 --- /dev/null +++ b/000-LoginToken/3-WebLogin.robot @@ -0,0 +1,87 @@ +*** Settings *** +Library ExcelLibrary +Library Collections +Library RequestsLibrary +Library urllib3 + +*** Variables *** + +*** Test Cases *** +Papermill_Login + #纸厂web端登录 + #验证码登录 + Disable Warnings + Create Session papermill ${uecclient} ${ztbsc_papermill_login_header} + ${Data} Set Variable { \ \ \ \ "account":"${papermill_account}", \ \ \ \ "accountType":2, \ \ \ \ "captcha":"${papermill_password}", \ \ \ \ "$loginType":"telphone", \ \ \ \ "$isNextAutoLogin":true } + ${reps} POST On Session papermill uec/authorize/by-captcha ${Data.encode('utf-8')} + ${papermill_token} Get From Dictionary ${reps.json()['data']} token #获取uectoken + Set Global Variable ${papermill_token} + #转换业务token + Create Session ZTBT ${ztbclient} ${ztbsc_papermill_login_header} + ${loginToken} Set Variable { \ \ \ \ "loginToken":"${papermill_token}", \ \ \ \ "$configs":{ \ \ \ \ \ \ \ \ "$isBizFailedNotToast":true \ \ \ \ } } + ${reps} Post On Session ZTBT ztb-user-enterprise-service/authorize/get/product-line-token/by/login-token ${loginToken.encode('utf-8')} + ${PM_userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id + ${PM_token} Get From Dictionary ${reps.json()["data"]} token #获取token + ${ztbsc_papermill_header} Set Variable {'Content-Type':'application/json','Authorization':'QNT ${PM_token}','X-APP-ID':'503258978847966406'} #纸厂端请求头数据 + Set Global Variable ${PM_userId} + Set Global Variable ${PM_token} + Set Global Variable ${ztbsc_papermill_header} + #Execl写入数据 + Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls + Put String To Cell ztbsc 3 20 {'Content-Type':'application/json','Authorization':'QNT ${PM_token}','X-APP-ID':'503258978847966406'} #写入纸厂端请求头数据 + Save Excel Datadriven.xls + #数据驱动 + Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\Datadriven.xls + ${ztbsc_papermill_header} Read Cell Data By Name ztbsc D21 #纸厂端header + Set Global Variable ${ztbsc_papermill_header} + sleep 0.5 + #获取用户组织信息 + Create Session ZTBT ${ztbclient} ${ztbsc_papermill_header} + ${reps} GET On Session ZTBT ztb-supply-chain-service/get/paper-mill/user-base-info + ${paperMillOrgInfoList} Get From Dictionary ${reps.json()['data']} paperMillOrgInfoList #用户纸厂类型组织列表 + FOR ${items} IN @{paperMillOrgInfoList} + ${papermill_orgId} Get From Dictionary ${items} orgId #纸厂组织id + ${papermill_name} Get From Dictionary ${items} name #纸厂组织名称 + Exit For Loop If '${papermill_name}'=='516测试613' + END + ${ztbsc_papermill_header} Set Variable {'Content-Type':'application/json','Authorization':'QNT ${PM_token}','X-APP-ID':'503258978847966406','X-ORGANIZATION-ID':'${papermill_orgId}'} #纸厂端切换组织后的请求头 + Set Global Variable ${papermill_name} + Set Global Variable ${ztbsc_papermill_header} + #Execl写入数据 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls + #Put String To Cell ztbsc 3 20 {'Content-Type':'application/json','Authorization':'QNT ${PM_token}','X-APP-ID':'503258978847966406','X-ORGANIZATION-ID':'${papermill_orgId}'} #写入纸厂端请求头数据 + #Save Excel DatadrivenP.xls + #数据驱动 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenP.xls + #${ztbsc_papermill_header} Read Cell Data By Name ztbsc D21 #纸厂端header + #Set Global Variable ${ztbsc_papermill_header} + #sleep 0.5 + +Factoring_Login + #保理web端登录 + #验证码登录 + Disable Warnings + Create Session factoring ${uecclient} ${ztbsc_factoring_login_header} + ${Data} Set Variable { \ \ \ \ "account":"${papermill_account}", \ \ \ \ "accountType":2, \ \ \ \ "captcha":"${papermill_password}", \ \ \ \ "$loginType":"telphone", \ \ \ \ "$isNextAutoLogin":true } + ${reps} POST On Session factoring uec/authorize/by-captcha ${Data.encode('utf-8')} + ${factoring_token} Get From Dictionary ${reps.json()['data']} token #获取uectoken + Set Global Variable ${factoring_token} + #转换业务token + Create Session ZTBT ${uecclient} ${ztbsc_factoring_login_header} + ${loginToken} Set Variable { \ \ \ \ "loginToken":"${factoring_token}", \ \ \ \ "$configs":{ \ \ \ \ \ \ \ \ "$isBizFailedNotToast":true \ \ \ \ } } + ${reps} Post On Session ZTBT factoring/authorize/get/product-line-token/by/login-token ${loginToken.encode('utf-8')} + ${F_userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id + ${F_token} Get From Dictionary ${reps.json()["data"]} token #获取token + ${ztbsc_factoring_header} Set Variable {'Content-Type':'application/json','Authorization':'QNT ${F_token}','X-APP-ID':'503258978847966410','X-ORGANIZATION-ID':'710132392618233856'} #保理端请求头数据 + Set Global Variable ${F_userId} + Set Global Variable ${F_token} + Set Global Variable ${ztbsc_factoring_header} + #Execl写入数据 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls + #Put String To Cell ztbsc 3 24 {'Content-Type':'application/json','Authorization':'QNT ${F_token}','X-APP-ID':'503258978847966410','X-ORGANIZATION-ID':'710132392618233856'} #写入保理商端请求头数据 + #Save Excel DatadrivenF.xls + #数据驱动 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenF.xls + #${ztbsc_factoring_header} Read Cell Data By Name ztbsc D25 #保理商端header + #Set Global Variable ${ztbsc_factoring_header} + #sleep 0.5 diff --git a/000-LoginToken/__init__.txt b/000-LoginToken/__init__.txt new file mode 100644 index 0000000..e69de29 diff --git a/001-DirectSale/__init__.txt b/001-DirectSale/__init__.txt new file mode 100644 index 0000000..add1087 --- /dev/null +++ b/001-DirectSale/__init__.txt @@ -0,0 +1,3 @@ +*** Settings *** +Documentation 直卖订单 +... 仔仔工厂->516测试纸厂 diff --git a/002-AgentSale/__init__.txt b/002-AgentSale/__init__.txt new file mode 100644 index 0000000..3db1969 --- /dev/null +++ b/002-AgentSale/__init__.txt @@ -0,0 +1,3 @@ +*** Settings *** +Documentation 代卖订单 +... 仔仔工厂->长沙中联->516测试纸厂 diff --git a/003-DirectSaleForwardFactoring/__init__.txt b/003-DirectSaleForwardFactoring/__init__.txt new file mode 100644 index 0000000..0e227f7 --- /dev/null +++ b/003-DirectSaleForwardFactoring/__init__.txt @@ -0,0 +1,3 @@ +*** Settings *** +Documentation 直卖正向保理订单 +... 仔仔工厂->516测试纸厂 diff --git a/004-DirectSaleReverseFactoring/__init__.txt b/004-DirectSaleReverseFactoring/__init__.txt new file mode 100644 index 0000000..f75fa52 --- /dev/null +++ b/004-DirectSaleReverseFactoring/__init__.txt @@ -0,0 +1,3 @@ +*** Settings *** +Documentation 直卖反向保理订单 +... 长沙中联->516测试纸厂 diff --git a/005-AgencyForwardFactoring/3-Factoring/1.1-Trader.robot b/005-AgencyForwardFactoring/3-Factoring/1.1-Trader.robot index 35a6a06..11dd528 100644 --- a/005-AgencyForwardFactoring/3-Factoring/1.1-Trader.robot +++ b/005-AgencyForwardFactoring/3-Factoring/1.1-Trader.robot @@ -21,17 +21,19 @@ Traders_Login ${reps} Post On Session ZTBT ztb-user-enterprise-service/authorize/get/product-line-token/by/login-token ${loginToken.encode('utf-8')} ${T_userId} Get From Dictionary ${reps.json()["data"]} userId #获取用户id ${T_token} Get From Dictionary ${reps.json()["data"]} token #获取token + ${ztbsc_traders_header} Set Variable {'Content-Type':'application/json','Authorization':'QNT ${T_token}','X-APP-ID':'503258978847966406','X-ORGANIZATION-ID':'721760754042277888'} #代理商端请求头数据 Set Global Variable ${T_userId} Set Global Variable ${T_token} + Set Global Variable ${ztbsc_traders_header} #Execl写入数据 - Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls - Put String To Cell ztbsc 3 17 {'Content-Type':'application/json','Authorization':'QNT ${T_token}','X-APP-ID':'503258978847966406','X-ORGANIZATION-ID':'721760754042277888'} #写入代理商端请求头数据 - Save Excel DatadrivenT.xls + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls + #Put String To Cell ztbsc 3 17 {'Content-Type':'application/json','Authorization':'QNT ${T_token}','X-APP-ID':'503258978847966406','X-ORGANIZATION-ID':'721760754042277888'} #写入代理商端请求头数据 + #Save Excel DatadrivenT.xls #数据驱动 - Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenT.xls - ${ztbsc_traders_header} Read Cell Data By Name ztbsc D18 #代理商端header - Set Global Variable ${ztbsc_traders_header} - sleep 0.5 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenT.xls + #${ztbsc_traders_header} Read Cell Data By Name ztbsc D18 #代理商端header + #Set Global Variable ${ztbsc_traders_header} + #sleep 0.5 #获取用户组织信息 Create Session ZTBT ${ztbclient} ${ztbsc_traders_header} ${reps} GET On Session ZTBT ztb-supply-chain-service/get/agent/user-base-info @@ -41,16 +43,18 @@ Traders_Login ${trader_name} Get From Dictionary ${items} name #纸厂组织名称 Exit For Loop If '${trader_name}'=='${paperMillFinancialServiceProviderName}' END + ${ztbsc_traders_header} Set Variable {'Content-Type':'application/json','Authorization':'QNT ${T_token}','X-APP-ID':'503258978847966406','X-ORGANIZATION-ID':'${trader_orgId}'} #代理商端切换组织后请求头数据 Set Global Variable ${trader_name} + Set Global Variable ${ztbsc_traders_header} #Execl写入数据 - Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls - Put String To Cell ztbsc 3 17 {'Content-Type':'application/json','Authorization':'QNT ${T_token}','X-APP-ID':'503258978847966406','X-ORGANIZATION-ID':'${trader_orgId}'} #写入代理商端请求头数据 - Save Excel DatadrivenTT.xls + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls + #Put String To Cell ztbsc 3 17 {'Content-Type':'application/json','Authorization':'QNT ${T_token}','X-APP-ID':'503258978847966406','X-ORGANIZATION-ID':'${trader_orgId}'} #写入代理商端请求头数据 + #Save Excel DatadrivenTT.xls #数据驱动 - Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenTT.xls - ${ztbsc_traders_header} Read Cell Data By Name ztbsc D18 #代理商端header - Set Global Variable ${ztbsc_traders_header} - sleep 0.5 + #Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenTT.xls + #${ztbsc_traders_header} Read Cell Data By Name ztbsc D18 #代理商端header + #Set Global Variable ${ztbsc_traders_header} + #sleep 0.5 Agent_collection_list #代理商端收款管理 diff --git a/005-AgencyForwardFactoring/__init__.txt b/005-AgencyForwardFactoring/__init__.txt new file mode 100644 index 0000000..8b762f3 --- /dev/null +++ b/005-AgencyForwardFactoring/__init__.txt @@ -0,0 +1,3 @@ +*** Settings *** +Documentation 代卖正向保理订单 +... 长沙中联->412代理商->516测试纸厂 diff --git a/006-CounterFactoring/__init__.txt b/006-CounterFactoring/__init__.txt new file mode 100644 index 0000000..3a41335 --- /dev/null +++ b/006-CounterFactoring/__init__.txt @@ -0,0 +1,3 @@ +*** Settings *** +Documentation 代卖反向保理订单 +... 仔仔工厂->长沙中联->516测试纸厂 diff --git a/Datadriven.xls b/Datadriven.xls index 4dc0cb81150a15c632e2dfba1186658387daa279..51ba8c39330ea2c7a01d179d5a3afe9892f0990e 100644 GIT binary patch delta 59 zcmZqhY4F)FNl44rGCV8YBqPGvqADvY%-q)_!z81qAU7w}H?1h&!znw+*(^Az&?s9! OVsf0I(&l?YO2PncxD-MF delta 60 zcmZqhY4F)FNk}`O$}_Rd)5tAXyRyQ!)YsK5!q_A+C!o~a)uW^&+e|ws&n?G0CCSqx PuxN6;pyK9xLQ28_fff{k diff --git a/DatadrivenB-1.xls b/DatadrivenB-1.xls index 9c76946cef2f8e93c42ddc85030015d2898c3422..e238dce58075458830cc259787208fffb569f3e9 100644 GIT binary patch delta 62 zcmZqhY4F*QETmiD>!0RPSXi3xXi#Np>1JS7?CMxh5s~MaUgl)!o1AMAQR-NkSy5(Q R9B6Ah*^yg$^JXDmVF0RR6*>R_ delta 62 zcmZqhY4F*QETmf+8fa{q?&%X*YT#!c?C6}HTNs#<=iz0V73me3W|Ug$onh`67*!c! R5NK;V*^yg$^JXDmVE~Q}6hi<2 diff --git a/DatadrivenB-2.xls b/DatadrivenB-2.xls index d05b980c3447d6dd1e692015f64d18f0afc08dd8..a30d668cd411733f963530d6f094dfa4ec20f52e 100644 GIT binary patch delta 62 zcmZqhY4F*QETmiD>!0RPSXi3xXi#Np>1JS7?CMyM;T5Q#T5X*^yg$^JXDmVF0M86;A*F diff --git a/DatadrivenC-1.xls b/DatadrivenC-1.xls index 9120ac9fee6897faa8849ec943623e4d06dc76e8..1aa6c58517ccf5094560ccfefd5f888f726c9a00 100644 GIT binary patch delta 62 zcmZqhY4F*wLrAy4*FVjpu&^}W(V)uI(#^oE*wwM1A|lT-z0AqdH#yfLqSUc6v!cwr RIMCL1@>_1D&FsQIg#f`-7CHa` delta 62 zcmZqhY4F*wLrAwYG|<>I-P0$s)WFX?*wHyXw=ggz&%?_!E7B`6%_z0hJHy;DFsd@d RAkfx!@>_1D&FsQIg#e`g6+-|3 diff --git a/DatadrivenC-2.xls b/DatadrivenC-2.xls index 51cc566fdbbaf0e99fdca091154b416b3e9853cf..491d310754c4300481b7439cba68757268714ab9 100644 GIT binary patch delta 62 zcmZqhY4F*wLrAy4*FVjpu&^}W(V)uI(#^oE*wwKh!z)lfxzNqbx7;%zImI&2IK;@z RAkfx!@>_1D&FsQIg#e|j6wLqt delta 62 zcmZqhY4F*wLrAwYG|<>I-P0$s)WFX?*wHyXw=giJpdzO*BQ?^m!XrE)HOeJ7FtxJK RB+%A&@>_1D&FsQIg#f>q7Eb^G diff --git a/DatadrivenF.xls b/DatadrivenF.xls index 5e9ec820ae0e045ae2215a5f958db2512effea89..177108e11cfab7e8e0e7ceb7498918186c283c80 100644 GIT binary patch delta 63 zcmZqhY4F+5C!|+m92A)yu3cVi;g(-&Wa5+USYTk3=a%Xo;t}c{l~a;kSsWVZ}4=6kzO`o|PPx9#P^I85$L0 S?CWT2JK2F(X7ddp4PgM>jTOlN diff --git a/DatadrivenP.xls b/DatadrivenP.xls index 0d31915bc731137ad9503a6971c6d36d65dd707b..37a43994b4a573683a9c4a0424cd497cb92b9863 100644 GIT binary patch delta 61 zcmZqhY4F)FNl3@n!zVk_&o9W#*w;TSIVGYb)YZt@up%we)uN=hFh8#{xiHW>qrfAu Q*v)Zrf}q0YdqPUW0F(n2BLDyZ delta 60 zcmZqhY4F)FNk}`O$}_Rd)5tAXyRyQ!)YsK5!q_A+C!o~a)uW^&+e|ws&n?G0CCSqx PuxN6;pyK9xLQ28_fff{k diff --git a/RF-TEST/2-Platform/Auction.robot b/RF-TEST/2-Platform/Auction.robot index 4760604..48c1d04 100644 --- a/RF-TEST/2-Platform/Auction.robot +++ b/RF-TEST/2-Platform/Auction.robot @@ -8,14 +8,19 @@ Library String *** Test Cases *** create_delegation #创建委托 - #获取委托方组织 + #获取委托方组织列表 Create Session auction ${uecops} ${ztbsc_header} - ${reps} GET On Session auction uec/admin/get/organization-list params=pageNum=1&pageSize=30&keyword=东莞市致远纸业有限公司 + ${reps} GET On Session auction uec/admin/get/organization-list params=pageNum=1&pageSize=300&keyword= + ${records} Get From Dictionary ${reps.json()['data']} records #委托方组织列表 + ${auctionOrgInfo} Evaluate random.choice(${records}) random + ${auctionFullName} Get From Dictionary ${auctionOrgInfo} fullName #委托方组织名称 + #获取委托方组织 + ${reps} GET On Session auction uec/admin/get/organization-list params=pageNum=1&pageSize=30&keyword=${auctionFullName} ${fullName} Get From Dictionary ${reps.json()['data']['records'][0]} fullName #委托方组织名称 ${orgId} Get From Dictionary ${reps.json()['data']['records'][0]} id #委托方组织id Set Global Variable ${fullName} #创建委托拍品 - ${autionData} Set Variable { \ \ \ \ "auctionEntrustDto":{ \ \ \ \ \ \ \ \ "contact":"就挺秃然的", \ \ \ \ \ \ \ \ "contactNumber":"15014242835", \ \ \ \ \ \ \ \ "entrustTime":"${time}", \ \ \ \ \ \ \ \ "orgId":"${orgId}" \ \ \ \ }, \ \ \ \ "auctionLotDto":{ \ \ \ \ \ \ \ \ "address":"重庆", \ \ \ \ \ \ \ \ "lotDescribe":"黄废", \ \ \ \ \ \ \ \ "name":"书本纸(黄废)" \ \ \ \ } } + ${autionData} Set Variable { \ \ \ \ "auctionEntrustDto":{ \ \ \ \ \ \ \ \ "contact":"小小", \ \ \ \ \ \ \ \ "contactNumber":"15014242835", \ \ \ \ \ \ \ \ "entrustTime":"${time}", \ \ \ \ \ \ \ \ "orgId":"${orgId}" \ \ \ \ }, \ \ \ \ "auctionLotDto":{ \ \ \ \ \ \ \ \ "address":"重庆", \ \ \ \ \ \ \ \ "lotDescribe":"黄废", \ \ \ \ \ \ \ \ "name":"一级纸(黄废)" \ \ \ \ } } ${reps} POST On Session auction auction-service/admin/create/auction ${autionData.encode('utf-8')} Should Be Equal As Strings ${reps.json()['message']} successful #委托拍品列表 @@ -73,11 +78,11 @@ auction_detail ${time} Get Current Date result_format=%Y-%m-%d %H:%M:00 #获取当前时间 ${start_time} Add Time To Date ${time} 00:05:00 #获取未来两小时 ${start_time} Get Substring ${start_time} 0 19 #截取正常时间时间 - ${end_time} Add Time To Date ${time} 1 day #获取第二天当前时间 - #${end_time} Add Time To Date ${time} 00:10:00 + #${end_time} Add Time To Date ${time} 1 day #获取第二天当前时间 + ${end_time} Add Time To Date ${time} 00:10:00 ${end_time} Get Substring ${end_time} 0 19 #截取正常时间时间 #保存拍品规则 - ${Auction_rules} Set Variable { \ \ \ \ "auctionBidderDtoList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "id":"${bidders_List}" \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "auctionLotDto":{ \ \ \ \ \ \ \ \ "startingPrice":2500, \ \ \ \ \ \ \ \ "id":"${auctionLotId}" \ \ \ \ }, \ \ \ \ "auctionDto":{ \ \ \ \ \ \ \ \ "id":null, \ \ \ \ \ \ \ \ "auctionEntrustId":"${auctionEntrustId}", \ \ \ \ \ \ \ \ "bidOptions":"10,30,15,20", \ \ \ \ \ \ \ \ "bidScale":10, \ \ \ \ \ \ \ \ "endTime":"${end_time}", \ \ \ \ \ \ \ \ "startTime":"${start_time}" \ \ \ \ } } + ${Auction_rules} Set Variable { \ \ \ \ "auctionBidderDtoList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "id":"${bidders_List}" \ \ \ \ \ \ \ \ } \ \ \ \ ], \ \ \ \ "auctionLotDto":{ \ \ \ \ \ \ \ \ "startingPrice":2150, \ \ \ \ \ \ \ \ "id":"${auctionLotId}" \ \ \ \ }, \ \ \ \ "auctionDto":{ \ \ \ \ \ \ \ \ "id":null, \ \ \ \ \ \ \ \ "auctionEntrustId":"${auctionEntrustId}", \ \ \ \ \ \ \ \ "bidOptions":"10,30,15,20", \ \ \ \ \ \ \ \ "bidScale":10, \ \ \ \ \ \ \ \ "endTime":"${end_time}", \ \ \ \ \ \ \ \ "startTime":"${start_time}" \ \ \ \ } } ${reps} POST On Session auction auction-service/admin/modify/auction-rule ${Auction_rules.encode('utf-8')} Should Be Equal As Strings ${reps.json()['message']} successful #委托拍品列表