|
|
|
@ -37,10 +37,12 @@ auction_detail |
|
|
|
#拍品详情 |
|
|
|
Create Session auction ${uecops} ${ztbsc_header} |
|
|
|
${reps} GET On Session auction auction-service/admin/get/auction/detail/${auctionEntrustId} |
|
|
|
${auctionId} Get From Dictionary ${reps.json()['data']} auctionId #拍品唯一标识 |
|
|
|
${displayName} Get From Dictionary ${reps.json()['data']} displayName #拍品名称 |
|
|
|
${auctionLotId} Get From Dictionary ${reps.json()['data']} auctionLotId |
|
|
|
${displayAddress} Get From Dictionary ${reps.json()['data']} displayAddress #拍品地 |
|
|
|
${displayDescribe} Get From Dictionary ${reps.json()['data']} displayDescribe #拍品描述 |
|
|
|
${auctionId} Set Variable If '${auctionId}'=='${None}' null ${auctionId} |
|
|
|
#修改拍品设置 |
|
|
|
#上传图片 |
|
|
|
Disable Warnings |
|
|
|
@ -61,7 +63,8 @@ auction_detail |
|
|
|
#sleep 0.5 |
|
|
|
#保存拍品设置 |
|
|
|
Create Session auction ${uecops} ${ztbsc_header} |
|
|
|
${auctionData} Set Variable { \ \ \ \ "auctionLotImageList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "url":"${pictures}", \ \ \ \ \ \ \ \ \ \ \ \ "type":1 \ \ \ \ \ \ \ \ }], \ \ \ \ "displayDescribe":"${displayDescribe}", \ \ \ \ "displayAddress":"${displayAddress}", \ \ \ \ "displayName":"${displayName}", \ \ \ \ "quantity":9, \ \ \ \ "id":"${auctionLotId}" } |
|
|
|
${quantity} Evaluate round(random.uniform(2,30),2) random #拍卖重量(吨) |
|
|
|
${auctionData} Set Variable { \ \ \ \ "auctionLotImageList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "url":"${pictures}", \ \ \ \ \ \ \ \ \ \ \ \ "type":1 \ \ \ \ \ \ \ \ }], \ \ \ \ "displayDescribe":"${displayDescribe}", \ \ \ \ "displayAddress":"${displayAddress}", \ \ \ \ "displayName":"${displayName}", \ \ \ \ "quantity":${quantity}, \ \ \ \ "id":"${auctionLotId}" } |
|
|
|
${reps} POST On Session auction auction-service/admin/modify/auction-lot ${auctionData.encode('utf-8')} |
|
|
|
Should Be Equal As Strings ${reps.json()['message']} successful |
|
|
|
#设置拍品规则 |
|
|
|
@ -71,9 +74,12 @@ auction_detail |
|
|
|
${Bidders} Get From Dictionary ${reps.json()['data']} records #竞拍人员列表 |
|
|
|
FOR ${items} IN @{Bidders} |
|
|
|
${id} Get From Dictionary ${items} id #竞拍人员id |
|
|
|
Append To List ${List} ${id} |
|
|
|
Append To List ${List} {"id":"${id}"} |
|
|
|
END |
|
|
|
${bidders_List} Evaluate random.choice(${List}) random |
|
|
|
${Num} Evaluate random.randint(1,6) random #获取随机数字 |
|
|
|
${bidders_List} Evaluate random.sample(${List},${Num}) random #获取多个竞拍人员id |
|
|
|
${BList} Convert To String ${bidders_List} |
|
|
|
${BiddersList} Replace String Using Regexp ${BList} ' \ |
|
|
|
#获取时间 |
|
|
|
${time} Get Current Date result_format=%Y-%m-%d %H:%M:00 #获取当前时间 |
|
|
|
${start_time} Add Time To Date ${time} 00:05:00 #获取未来两小时 |
|
|
|
@ -82,7 +88,10 @@ auction_detail |
|
|
|
${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":2150, \ \ \ \ \ \ \ \ "id":"${auctionLotId}" \ \ \ \ }, \ \ \ \ "auctionDto":{ \ \ \ \ \ \ \ \ "id":null, \ \ \ \ \ \ \ \ "auctionEntrustId":"${auctionEntrustId}", \ \ \ \ \ \ \ \ "bidOptions":"10,30,15,20", \ \ \ \ \ \ \ \ "bidScale":10, \ \ \ \ \ \ \ \ "endTime":"${end_time}", \ \ \ \ \ \ \ \ "startTime":"${start_time}" \ \ \ \ } } |
|
|
|
${bidScale} Evaluate random.randint(1,10) random #加价幅度 |
|
|
|
${startingPrice} Evaluate random.randint(1000,2000) random #起拍价(元/吨) |
|
|
|
${addDelayTime} Evaluate random.randint(1,5) random #延期时间(分钟) |
|
|
|
${Auction_rules} Set Variable { \ \ \ \ "auctionBidderDtoList":${BiddersList}, \ \ \ \ "auctionLotDto":{ \ \ \ \ \ \ \ \ "startingPrice":"${startingPrice}", \ \ \ \ \ \ \ \ "id":"${auctionLotId}" \ \ \ \ }, \ \ \ \ "auctionDto":{ \ \ \ \ \ \ \ \ "id":"${auctionId}", \ \ \ \ \ \ \ \ "auctionEntrustId":"${auctionEntrustId}", \ \ \ \ \ \ \ \ "bidOptions":"${bidScale},${bidScale},${bidScale},${bidScale}", \ \ \ \ \ \ \ \ "bidScale":"${bidScale}", \ \ \ \ \ \ \ \ "endTime":"${end_time}", \ \ \ \ \ \ \ \ "startTime":"${start_time}", \ \ \ \ \ \ \ \ "addDelayStatus":true, \ \ \ \ \ \ \ \ "addDelayTime":"${addDelayTime}" \ \ \ \ } } |
|
|
|
${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 |
|
|
|
#委托拍品列表 |
|
|
|
@ -97,3 +106,51 @@ auction_detail |
|
|
|
${PutonAuction} Set Variable { \ \ \ \ "id":"${auctionId}", \ \ \ \ "isDown":false } |
|
|
|
${reps} POST On Session auction auction-service/admin/operate/auction ${PutonAuction.encode('utf-8')} |
|
|
|
Should Be Equal As Strings ${reps.json()['message']} successful |
|
|
|
|
|
|
|
auction_detail1 |
|
|
|
#拍品详情 |
|
|
|
Create Session auction ${uecops} ${ztbsc_header} |
|
|
|
${reps} GET On Session auction auction-service/admin/get/auction/detail/${auctionEntrustId} |
|
|
|
${auctionId} Get From Dictionary ${reps.json()['data']} auctionId #拍品唯一标识 |
|
|
|
${displayName} Get From Dictionary ${reps.json()['data']} displayName #拍品名称 |
|
|
|
${auctionLotId} Get From Dictionary ${reps.json()['data']} auctionLotId |
|
|
|
${displayAddress} Get From Dictionary ${reps.json()['data']} displayAddress #拍品地 |
|
|
|
${displayDescribe} Get From Dictionary ${reps.json()['data']} displayDescribe #拍品描述 |
|
|
|
${auctionId} Set Variable If '${auctionId}'=='${None}' null ${auctionId} |
|
|
|
#修改拍品设置 |
|
|
|
#上传图片 |
|
|
|
Disable Warnings |
|
|
|
${image} Evaluate open('./标的1-6.jpg','rb') |
|
|
|
${filepath} Evaluate open('./标的1-6.jpg','rb') |
|
|
|
${file} Create Dictionary filepath=${filepath} image=${image} |
|
|
|
Create Session auction ${ztbops} |
|
|
|
${reps} POST On Session auction recycle-user-center/upload/image files=${file} |
|
|
|
${pictures} Get From Dictionary ${reps.json()} data |
|
|
|
#上传MP4文件 |
|
|
|
#${file} Evaluate open('./5e7f47fb6aea3.mp4','rb') |
|
|
|
#${file_data} Create Dictionary file=${file} |
|
|
|
#${type_data} Create Dictionary type='mp4' |
|
|
|
#Create Session auction ${ztbops} |
|
|
|
#${reps} POST On Session auction recycle-user-center/upload/file data=${type_data} files=${fileData} |
|
|
|
#${MP4Data} Get From Dictionary ${reps.json()} data |
|
|
|
#Set Global Variable ${MP4Data} |
|
|
|
#sleep 0.5 |
|
|
|
#保存拍品设置 |
|
|
|
Create Session auction ${uecops} ${ztbsc_header} |
|
|
|
${quantity} Evaluate round(random.uniform(2,30),2) random #拍卖重量(吨) |
|
|
|
${auctionData} Set Variable { \ \ \ \ "auctionLotImageList":[ \ \ \ \ \ \ \ \ { \ \ \ \ \ \ \ \ \ \ \ \ "url":"${pictures}", \ \ \ \ \ \ \ \ \ \ \ \ "type":1 \ \ \ \ \ \ \ \ }], \ \ \ \ "displayDescribe":"${displayDescribe}", \ \ \ \ "displayAddress":"${displayAddress}", \ \ \ \ "displayName":"${displayName}", \ \ \ \ "quantity":${quantity}, \ \ \ \ "id":"${auctionLotId}" } |
|
|
|
${reps} POST On Session auction auction-service/admin/modify/auction-lot ${auctionData.encode('utf-8')} |
|
|
|
Should Be Equal As Strings ${reps.json()['message']} successful |
|
|
|
#设置拍品规则 |
|
|
|
#随机获取竞拍人员 |
|
|
|
${reps} GET On Session auction auction-service/admin/page/auction-bidder params=pageNum=1&pageSize=30&keyword=&depositPaymentStatus=1 |
|
|
|
${List} Create List |
|
|
|
${Bidders} Get From Dictionary ${reps.json()['data']} records #竞拍人员列表 |
|
|
|
FOR ${items} IN @{Bidders} |
|
|
|
${id} Get From Dictionary ${items} id #竞拍人员id |
|
|
|
Append To List ${List} {"id":"${id}"} |
|
|
|
END |
|
|
|
${Num} Evaluate random.randint(1,6) random #获取随机数字 |
|
|
|
${bidders_List} Evaluate random.sample(${List},${Num}) random |
|
|
|
${BList} Convert To String ${bidders_List} |
|
|
|
${BList} Replace Variables ${BList} ' " |