From f0908168f44186a7267cc4fb18716841cebb586c Mon Sep 17 00:00:00 2001 From: LG_lai Date: Sat, 17 Sep 2022 15:31:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=A7=94=E6=89=98=E6=8B=8D?= =?UTF-8?q?=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RF-TEST/2-Platform/Auction.robot | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/RF-TEST/2-Platform/Auction.robot b/RF-TEST/2-Platform/Auction.robot index 9d298ed..01581ef 100644 --- a/RF-TEST/2-Platform/Auction.robot +++ b/RF-TEST/2-Platform/Auction.robot @@ -20,7 +20,11 @@ create_delegation ${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":"一级纸(黄废)" \ \ \ \ } } + ${quantity} Evaluate round(random.uniform(0,30),3) random #拍品重量/吨 + ${startingPrice} Evaluate random.randint(1500,1800) random #拍品起拍价 + ${expectedPrice} Evaluate random.randint(1800,2150) random #拍品目标价 + ${contactNumber} Evaluate random.choice(['139','188','185','136','158','151'])+"".join(random.choice("0123456789") for i in range(8)) random #11位随机数 + ${autionData} Set Variable { \ \ \ \ "auctionEntrustDto":{ \ \ \ \ \ \ \ \ "contact":"${auctionFullName}", \ \ \ \ \ \ \ \ "quantity":${quantity}, \ \ \ \ \ \ \ \ "contactNumber":"${contactNumber}", \ \ \ \ \ \ \ \ "startingPrice":${startingPrice}, \ \ \ \ \ \ \ \ "expectedPrice":${expectedPrice}, \ \ \ \ \ \ \ \ "orgId":"${orgId}", \ \ \ \ \ \ \ \ "sellerName":"${auctionFullName}", \ \ \ \ \ \ \ \ "entrustTime":"${time}" \ \ \ \ }, \ \ \ \ "auctionLotDto":{ \ \ \ \ \ \ \ \ "name":"${auctionFullName}的拍品", \ \ \ \ \ \ \ \ "address":"${auctionFullName}委托公司地址", \ \ \ \ \ \ \ \ "lotDescribe":"${auctionFullName}的拍品" \ \ \ \ } } ${reps} POST On Session auction auction-service/admin/create/auction ${autionData.encode('utf-8')} Should Be Equal As Strings ${reps.json()['message']} successful #委托拍品列表 @@ -28,8 +32,8 @@ create_delegation ${List} Get From Dictionary ${reps.json()['data']} records #委托拍品列表 FOR ${items} IN @{List} ${auctionEntrustId} Get From Dictionary ${items} auctionEntrustId #委托拍品id - ${auctionSellerOrgName} Get From Dictionary ${items} auctionSellerOrgName #委托组织名称 - Exit For Loop If '${auctionSellerOrgName}'=='${fullName}' + ${sellerName} Get From Dictionary ${items} sellerName #委托组织名称 + Exit For Loop If '${sellerName}'=='${fullName}' END Set Global Variable ${auctionEntrustId} @@ -100,8 +104,8 @@ auction_detail FOR ${items} IN @{List} ${isDown} Get From Dictionary ${items} isDown #拍品上、下架状态 ${auctionId} Get From Dictionary ${items} auctionId #竞拍唯一标识 - ${auctionSellerOrgName} Get From Dictionary ${items} auctionSellerOrgName #委托组织名称 - Exit For Loop If '${auctionSellerOrgName}'=='${fullName}' + ${sellerName} Get From Dictionary ${items} sellerName #委托组织名称 + Exit For Loop If '${sellerName}'=='${fullName}' END ${isDown} Set Variable If '${isDown}'=='${true}' false true #上架拍品