Browse Source

优化

pull/1/head
LG_lai 3 years ago
parent
commit
d9b87733a1
20 changed files with 348 additions and 20 deletions
  1. 68
      000-LoginToken/1-dataDriven.robot
  2. 83
      000-LoginToken/2.1-APPlogin.robot
  3. 63
      000-LoginToken/2.2-APPlogin.robot
  4. 87
      000-LoginToken/3-WebLogin.robot
  5. 0
      000-LoginToken/__init__.txt
  6. 3
      001-DirectSale/__init__.txt
  7. 3
      002-AgentSale/__init__.txt
  8. 3
      003-DirectSaleForwardFactoring/__init__.txt
  9. 3
      004-DirectSaleReverseFactoring/__init__.txt
  10. 32
      005-AgencyForwardFactoring/3-Factoring/1.1-Trader.robot
  11. 3
      005-AgencyForwardFactoring/__init__.txt
  12. 3
      006-CounterFactoring/__init__.txt
  13. BIN
      Datadriven.xls
  14. BIN
      DatadrivenB-1.xls
  15. BIN
      DatadrivenB-2.xls
  16. BIN
      DatadrivenC-1.xls
  17. BIN
      DatadrivenC-2.xls
  18. BIN
      DatadrivenF.xls
  19. BIN
      DatadrivenP.xls
  20. 17
      RF-TEST/2-Platform/Auction.robot

68
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}

83
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}

63
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}

87
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

0
000-LoginToken/__init__.txt

3
001-DirectSale/__init__.txt

@ -0,0 +1,3 @@
*** Settings ***
Documentation 直卖订单
... 仔仔工厂->516测试纸厂

3
002-AgentSale/__init__.txt

@ -0,0 +1,3 @@
*** Settings ***
Documentation 代卖订单
... 仔仔工厂->长沙中联->516测试纸厂

3
003-DirectSaleForwardFactoring/__init__.txt

@ -0,0 +1,3 @@
*** Settings ***
Documentation 直卖正向保理订单
... 仔仔工厂->516测试纸厂

3
004-DirectSaleReverseFactoring/__init__.txt

@ -0,0 +1,3 @@
*** Settings ***
Documentation 直卖反向保理订单
... 长沙中联->516测试纸厂

32
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
#代理商端收款管理

3
005-AgencyForwardFactoring/__init__.txt

@ -0,0 +1,3 @@
*** Settings ***
Documentation 代卖正向保理订单
... 长沙中联->412代理商->516测试纸厂

3
006-CounterFactoring/__init__.txt

@ -0,0 +1,3 @@
*** Settings ***
Documentation 代卖反向保理订单
... 仔仔工厂->长沙中联->516测试纸厂

BIN
Datadriven.xls

BIN
DatadrivenB-1.xls

BIN
DatadrivenB-2.xls

BIN
DatadrivenC-1.xls

BIN
DatadrivenC-2.xls

BIN
DatadrivenF.xls

BIN
DatadrivenP.xls

17
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
#委托拍品列表

Loading…
Cancel
Save