diff --git a/001-DirectSale/1-Client/create_order.robot b/001-DirectSale/1-Client/create_order.robot index 0c2cad1..ca87096 100644 --- a/001-DirectSale/1-Client/create_order.robot +++ b/001-DirectSale/1-Client/create_order.robot @@ -81,6 +81,7 @@ order_list FOR ${item} IN @{orderlist} ${plateNumber1} Get From Dictionary ${item['packerOrderList'][0]} plateNumber #获取订单车牌号 ${supplyChainInstanceId} Get From Dictionary ${item['packerOrderList'][0]} supplyChainInstanceId #获取物流编号 - Exit For Loop If '${plateNumber1}'=='${plateNumber}' + ${paperMillCategoryName} Get From Dictionary ${item['packerOrderList'][0]} paperMillCategoryName #获取下单的品类名称 + Exit For Loop If '${plateNumber1}'=='${plateNumber}'and'${paperMillCategoryName}'=='${categoryName}' END Set Global Variable ${supplyChainInstanceId} diff --git a/002-AgentSale/1-Client/create_order.robot b/002-AgentSale/1-Client/create_order.robot index 803ffc8..6552602 100644 --- a/002-AgentSale/1-Client/create_order.robot +++ b/002-AgentSale/1-Client/create_order.robot @@ -81,6 +81,7 @@ order_list FOR ${item} IN @{orderlist} ${plateNumber1} Get From Dictionary ${item['packerOrderList'][0]} plateNumber #获取订单车牌号 ${supplyChainInstanceId} Get From Dictionary ${item['packerOrderList'][0]} supplyChainInstanceId #获取物流编号 - Exit For Loop If '${plateNumber1}'=='${plateNumber}' + ${paperMillCategoryName} Get From Dictionary ${item['packerOrderList'][0]} paperMillCategoryName #获取下单的品类名称 + Exit For Loop If '${plateNumber1}'=='${plateNumber}'and'${paperMillCategoryName}'=='${categoryName}' END Set Global Variable ${supplyChainInstanceId} diff --git a/003-DirectSaleForwardFactoring/1-Client/create_order.robot b/003-DirectSaleForwardFactoring/1-Client/create_order.robot index 803ffc8..6552602 100644 --- a/003-DirectSaleForwardFactoring/1-Client/create_order.robot +++ b/003-DirectSaleForwardFactoring/1-Client/create_order.robot @@ -81,6 +81,7 @@ order_list FOR ${item} IN @{orderlist} ${plateNumber1} Get From Dictionary ${item['packerOrderList'][0]} plateNumber #获取订单车牌号 ${supplyChainInstanceId} Get From Dictionary ${item['packerOrderList'][0]} supplyChainInstanceId #获取物流编号 - Exit For Loop If '${plateNumber1}'=='${plateNumber}' + ${paperMillCategoryName} Get From Dictionary ${item['packerOrderList'][0]} paperMillCategoryName #获取下单的品类名称 + Exit For Loop If '${plateNumber1}'=='${plateNumber}'and'${paperMillCategoryName}'=='${categoryName}' END Set Global Variable ${supplyChainInstanceId} diff --git a/004-DirectSaleReverseFactoring/1-Client/create_order.robot b/004-DirectSaleReverseFactoring/1-Client/create_order.robot index 08722ce..23950e1 100644 --- a/004-DirectSaleReverseFactoring/1-Client/create_order.robot +++ b/004-DirectSaleReverseFactoring/1-Client/create_order.robot @@ -81,6 +81,7 @@ order_list FOR ${item} IN @{orderlist} ${plateNumber1} Get From Dictionary ${item['packerOrderList'][0]} plateNumber #获取订单车牌号 ${supplyChainInstanceId} Get From Dictionary ${item['packerOrderList'][0]} supplyChainInstanceId #获取物流编号 - Exit For Loop If '${plateNumber1}'=='${plateNumber}' + ${paperMillCategoryName} Get From Dictionary ${item['packerOrderList'][0]} paperMillCategoryName #获取下单的品类名称 + Exit For Loop If '${plateNumber1}'=='${plateNumber}'and'${paperMillCategoryName}'=='${categoryName}' END Set Global Variable ${supplyChainInstanceId} diff --git a/005-AgencyForwardFactoring/1-Client/create_order.robot b/005-AgencyForwardFactoring/1-Client/create_order.robot index 08722ce..23950e1 100644 --- a/005-AgencyForwardFactoring/1-Client/create_order.robot +++ b/005-AgencyForwardFactoring/1-Client/create_order.robot @@ -81,6 +81,7 @@ order_list FOR ${item} IN @{orderlist} ${plateNumber1} Get From Dictionary ${item['packerOrderList'][0]} plateNumber #获取订单车牌号 ${supplyChainInstanceId} Get From Dictionary ${item['packerOrderList'][0]} supplyChainInstanceId #获取物流编号 - Exit For Loop If '${plateNumber1}'=='${plateNumber}' + ${paperMillCategoryName} Get From Dictionary ${item['packerOrderList'][0]} paperMillCategoryName #获取下单的品类名称 + Exit For Loop If '${plateNumber1}'=='${plateNumber}'and'${paperMillCategoryName}'=='${categoryName}' END Set Global Variable ${supplyChainInstanceId} diff --git a/006-CounterFactoring/1-Client/create_order.robot b/006-CounterFactoring/1-Client/create_order.robot index 803ffc8..6552602 100644 --- a/006-CounterFactoring/1-Client/create_order.robot +++ b/006-CounterFactoring/1-Client/create_order.robot @@ -81,6 +81,7 @@ order_list FOR ${item} IN @{orderlist} ${plateNumber1} Get From Dictionary ${item['packerOrderList'][0]} plateNumber #获取订单车牌号 ${supplyChainInstanceId} Get From Dictionary ${item['packerOrderList'][0]} supplyChainInstanceId #获取物流编号 - Exit For Loop If '${plateNumber1}'=='${plateNumber}' + ${paperMillCategoryName} Get From Dictionary ${item['packerOrderList'][0]} paperMillCategoryName #获取下单的品类名称 + Exit For Loop If '${plateNumber1}'=='${plateNumber}'and'${paperMillCategoryName}'=='${categoryName}' END Set Global Variable ${supplyChainInstanceId} diff --git a/Datadriven.xls b/Datadriven.xls index 5f8ee34..0c066e3 100644 Binary files a/Datadriven.xls and b/Datadriven.xls differ diff --git a/DatadrivenB-1.xls b/DatadrivenB-1.xls index f421ec0..57e56ad 100644 Binary files a/DatadrivenB-1.xls and b/DatadrivenB-1.xls differ diff --git a/DatadrivenB-2.xls b/DatadrivenB-2.xls index 37d1751..0865d34 100644 Binary files a/DatadrivenB-2.xls and b/DatadrivenB-2.xls differ diff --git a/DatadrivenB.xls b/DatadrivenB.xls index 5b01616..0ec768b 100644 Binary files a/DatadrivenB.xls and b/DatadrivenB.xls differ diff --git a/DatadrivenC-1.xls b/DatadrivenC-1.xls index d6b95e2..0d6cfaa 100644 Binary files a/DatadrivenC-1.xls and b/DatadrivenC-1.xls differ diff --git a/DatadrivenC-2.xls b/DatadrivenC-2.xls index fb0cc61..5812f92 100644 Binary files a/DatadrivenC-2.xls and b/DatadrivenC-2.xls differ diff --git a/DatadrivenC.xls b/DatadrivenC.xls index 84b89ef..d6f2ccb 100644 Binary files a/DatadrivenC.xls and b/DatadrivenC.xls differ diff --git a/DatadrivenF.xls b/DatadrivenF.xls index aa50754..19f145f 100644 Binary files a/DatadrivenF.xls and b/DatadrivenF.xls differ diff --git a/DatadrivenP.xls b/DatadrivenP.xls index 19d9fd9..d684517 100644 Binary files a/DatadrivenP.xls and b/DatadrivenP.xls differ diff --git a/RF-TEST/0-Data driven/dataDriven.robot b/RF-TEST/0-Data driven/dataDriven.robot index 7c6739a..d6e3d69 100644 --- a/RF-TEST/0-Data driven/dataDriven.robot +++ b/RF-TEST/0-Data driven/dataDriven.robot @@ -133,11 +133,7 @@ ztbsc #${ServiceFeeType} Evaluate random.choice(${ServiceFeeType}) random #保理服务费类型 #Run Keyword If ${ServiceFeeType}==3041 Run Keyword ServiceFee3041 # ELSE IF ${ServiceFeeType}==3042 Run Keyword ServiceFee3042 # ELSE IF ${ServiceFeeType}==3043 Run Keyword ServiceFee3043 # ELSE ${ServiceFeeType}==3044 Run Keyword ServiceFee3044 - #Mock - #Make Headers - Create Mock Session login - Create Mock Request Matcher post recycle-service/admin/login form-data username=laiyonglan@qniao.cn password=qn123456 - Create Mock Response 200 + #判断多个条件满足时跳出For循环 *** Keywords *** ServiceFee3041 diff --git a/RF-TEST/1-Client/APPlogin.robot b/RF-TEST/1-Client/APPlogin.robot index 760359e..06b8614 100644 --- a/RF-TEST/1-Client/APPlogin.robot +++ b/RF-TEST/1-Client/APPlogin.robot @@ -26,11 +26,11 @@ login_token Set Global Variable ${userId} Set Global Variable ${gettoken} #Execl写入数据 - Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls + Open Excel D:\\LYL\\Study\\Robot_framework\\space\\ztb-ops-rf-api\\数据驱动.xls Put String To Cell ztbsc 3 7 {'Content-Type':'application/json','Authorization':'QNT ${gettoken}','X-APP-ID':'470236309865238528'} #写入移动端请求头数据 Save Excel DatadrivenC.xls #数据驱动 - Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenC.xls + Open Excel D:\\LYL\\Study\\Robot_framework\\space\\ztb-ops-rf-api\\DatadrivenC.xls ${client_firstlogin_header} Read Cell Data By Name ztbsc D8 #客户端首次登录header Set Global Variable ${client_firstlogin_header} sleep 0.5 @@ -45,7 +45,7 @@ get_baseInfo ${orgId} Get From Dictionary ${items} id #组织id ${orgfullName} Get From Dictionary ${items} fullName #组织名称 ${packerBaseInfo} Get From Dictionary ${items} packerBaseInfo #组织工厂信息 - Exit For Loop If '${orgId}'=='721760754042277888' #仔仔工厂组织id:721761724339982336 #长沙中联组织id:721760754042277888 + Exit For Loop If '${orgId}'=='721761724339982336' #仔仔工厂组织id:721761724339982336 #长沙中联组织id:721760754042277888 END ${packerId} Get From Dictionary ${packerBaseInfo['scrapPaperPackingFactoryList'][0]} id #组织工厂id ${packerName} Get From Dictionary ${packerBaseInfo['scrapPaperPackingFactoryList'][0]} name #组织工厂名称 @@ -55,11 +55,11 @@ get_baseInfo Set Global Variable ${packerName} Set Global Variable ${orgfullName} #Execl写入数据 - Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\数据驱动.xls + Open Excel D:\\LYL\\Study\\Robot_framework\\space\\ztb-ops-rf-api\\数据驱动.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.xls #数据驱动 - Open Excel D:\\LYL\\Study\\Robot_framework\\New_Trading\\DatadrivenB.xls + Open Excel D:\\LYL\\Study\\Robot_framework\\space\\ztb-ops-rf-api\\DatadrivenB.xls ${client_header} Read Cell Data By Name ztbsc D2 #客户端首次登录header Set Global Variable ${client_header} sleep 0.5 diff --git a/RF-TEST/1-Client/create_order.robot b/RF-TEST/1-Client/create_order.robot index e55494c..3e0a8fd 100644 --- a/RF-TEST/1-Client/create_order.robot +++ b/RF-TEST/1-Client/create_order.robot @@ -48,11 +48,19 @@ get-carinfo #获取使用过的车辆信息 Create Session get-carinfo ${ztbclient} ${client_header} ${reps} Get On Session get-carinfo ztb-supply-chain-service/user/get/supply-reservation-order-org-vehicle-info-record-list - ${carNumber} Set Variable ${reps.json()['data']} #获取车辆列表 - ${plateNumber1} Evaluate random.choice(${carNumber}) random - #log to console \nvalue:${plateNumber1} - ${plateNumber} Get From Dictionary ${plateNumber1} plateNumber #车辆信息 + ${carNumber} Get From Dictionary ${reps.json()} data #获取车辆列表 + ${carNumberList} Create List + FOR ${CarNumberInfo} IN @{carNumber} + ${plateNumber} Get From Dictionary ${CarNumberInfo} plateNumber #获取车牌号 + Append To List ${carNumberList} ${plateNumber} + END + ${num} Evaluate random.randint(1,5) random + ${plateNumber} Evaluate random.sample(${carNumberList} ,${num}) random + ${plateNumberList} Convert To String ${plateNumber} + ${plateNumbers} Replace String Using Regexp ${plateNumberList} ' " + ${plateNumber} Evaluate random.choice(${plateNumber}) random Set Global Variable ${plateNumber} + Set Global Variable ${plateNumbers} financial_service_provider #支付渠道--直卖 @@ -66,7 +74,7 @@ createorder ${datatime} get current date result_format=%Y-%m-%d #${DT} Add Time To Date ${datatime} -1 day #${str} Get Substring ${DT} 0 10 - ${data} Set Variable { \ \ \ \ "paperMillId":"${paperMillId}", \ \ \ \ "paperMillScrapPaperCategoryId":"${categoryid}", \ \ \ \ "estimatedCategoryPrice":"${quotedPrice}", \ \ \ \ "estimatedTotalVolume":30000, \ \ \ \ "paperMillFinancialServiceProviderId":"${serviceId}", \ \ \ \ "customerName":"${realName}", \ \ \ \ "arrivalTime":"${datatime}", \ \ \ \ "plateNumbers":[ \ \ \ \ \ \ \ \ "${plateNumber}" \ \ \ \ ], \ \ \ \ "salesTaxPoint":${salesTaxPoint}} + ${data} Set Variable { \ \ \ \ "paperMillId":"${paperMillId}", \ \ \ \ "paperMillScrapPaperCategoryId":"${categoryid}", \ \ \ \ "estimatedCategoryPrice":"${quotedPrice}", \ \ \ \ "estimatedTotalVolume":30000, \ \ \ \ "paperMillFinancialServiceProviderId":"${serviceId}", \ \ \ \ "customerName":"${realName}", \ \ \ \ "arrivalTime":"${datatime}", \ \ \ \ "plateNumbers":${plateNumbers}, \ \ \ \ "salesTaxPoint":${salesTaxPoint}} log ${data} Create Session createorder ${ztbclient} ${client_header} ${reps} Post On Session createorder ztb-supply-chain-service/user/create/supply-reservation-order ${data.encode('utf-8')} @@ -79,9 +87,16 @@ order_list Create Session orderlist ${ztbclient} ${client_header} ${reps} GET On Session orderlist ztb-supply-chain-service/get/packer/order-list params=status=&pageNum=1&pageSize=15 ${orderlist} Get From Dictionary ${reps.json()['data']} records #组织交易订单列表 + ${Time} Get Current Date result_format=%Y-%m-%d FOR ${item} IN @{orderlist} - ${plateNumber1} Get From Dictionary ${item['packerOrderList'][0]} plateNumber #获取订单车牌号 - ${supplyChainInstanceId} Get From Dictionary ${item['packerOrderList'][0]} supplyChainInstanceId #获取物流编号 - Exit For Loop If '${plateNumber1}'=='${plateNumber}' + ${packerOrderList} Get From Dictionary ${item} packerOrderList #订单车辆信息 + ${orderTime} Get From Dictionary ${item} orderTime #下单时间 + Exit For Loop If '${orderTime}'=='${Time}' + END + FOR ${OrderInfo} IN @{packerOrderList} + ${CarNumber} Get From Dictionary ${OrderInfo} plateNumber #获取订单车牌号 + ${supplyChainInstanceId} Get From Dictionary ${OrderInfo} supplyChainInstanceId #获取物流编号 + ${paperMillCategoryName} Get From Dictionary ${OrderInfo} paperMillCategoryName #获取下单的品类名称 + Exit For Loop If '${CarNumber}'=='${plateNumber}'and'${paperMillCategoryName}'=='${categoryName}' END Set Global Variable ${supplyChainInstanceId} diff --git a/RF-TEST/2-Platform/Order/1-Platform dispatch.robot b/RF-TEST/2-Platform/Order/1-Platform dispatch.robot index 3074468..99f4212 100644 --- a/RF-TEST/2-Platform/Order/1-Platform dispatch.robot +++ b/RF-TEST/2-Platform/Order/1-Platform dispatch.robot @@ -54,7 +54,9 @@ orderdetail #订单详情 Create Session order ${ztbscops} ${ztbsc_header} ${reps} GET On Session order ztb-supply-chain-service/admin/get/supply-reservation-order-detail params=supplyChainInstanceId=${supplyChainInstanceId} + ${plateNumberList} Get From Dictionary ${reps.json()['data']} plateNumber #订单车牌号 Should Be Equal As Strings ${reps.json()['code']} 0 + Set Global Variable ${plateNumberList} Direct_saletype #选择交易类型-直卖 @@ -77,7 +79,7 @@ Agent_saletype Direct_dispatch #提交直卖派单 Create Session order center ${ztbscops} ${ztbsc_header} - ${data} Set Variable { \ \ \ \ "id":"${id}", \ \ \ \ "supplyChainInstanceId":"${supplyChainInstanceId}", \ \ \ \ "supplyReservationOrderId":"${supplyReservationOrderId}", \ \ \ \ "plateNumber":"${plateNumber}", \ \ \ \ "sellerOrgId":"${sellerOrgId}", \ \ \ \ "sellerName":"${sellerName}", \ \ \ \ "orderPlacerPhone":"${orderPlacerPhone}", \ \ \ \ "paperMillScrapPaperCategoryName":"${paperMillScrapPaperCategoryName}", \ \ \ \ "paperMillScrapPaperCategoryId":"${paperMillScrapPaperCategoryId}", \ \ \ \ "arrivalTime":"${arrivalTime}", \ \ \ \ "paperMillOrgId":"${paperMillOrgId}", \ \ \ \ "receivingPaperMillName":"${receivingPaperMillName}", \ \ \ \ "isHosted":"${isHosted}", \ \ \ \ "transactionType":"${transactionType}", \ \ \ \ "paperMillFinancialServiceProviderId":"${dispatchSaleServiceProviderId}", \ \ \ \ "orderTime":"${orderTime}", \ \ \ \ "orderPlacerName":"${realName}", \ \ \ \ "dispatchStatus":"${dispatchStatus}", \ \ \ \ "dispatchSaleServiceProviderId":"${dispatchSaleServiceProviderId}" } + ${data} Set Variable { \ \ \ \ "id":"${id}", \ \ \ \ "supplyChainInstanceId":"${supplyChainInstanceId}", \ \ \ \ "supplyReservationOrderId":"${supplyReservationOrderId}", \ \ \ \ "plateNumber":"${plateNumberList}", \ \ \ \ "sellerOrgId":"${sellerOrgId}", \ \ \ \ "sellerName":"${sellerName}", \ \ \ \ "orderPlacerPhone":"${orderPlacerPhone}", \ \ \ \ "paperMillScrapPaperCategoryName":"${paperMillScrapPaperCategoryName}", \ \ \ \ "paperMillScrapPaperCategoryId":"${paperMillScrapPaperCategoryId}", \ \ \ \ "arrivalTime":"${arrivalTime}", \ \ \ \ "paperMillOrgId":"${paperMillOrgId}", \ \ \ \ "receivingPaperMillName":"${receivingPaperMillName}", \ \ \ \ "isHosted":"${isHosted}", \ \ \ \ "transactionType":"${transactionType}", \ \ \ \ "paperMillFinancialServiceProviderId":"${dispatchSaleServiceProviderId}", \ \ \ \ "orderTime":"${orderTime}", \ \ \ \ "orderPlacerName":"${realName}", \ \ \ \ "dispatchStatus":"${dispatchStatus}", \ \ \ \ "dispatchSaleServiceProviderId":"${dispatchSaleServiceProviderId}" } ${reps} POST On Session order center ztb-supply-chain-service/admin/dispatch/supply-reservation-order ${data.encode('utf-8')} Should Be Equal As Strings ${reps.json()['message']} successful sleep 1