9 changed files with 841 additions and 679 deletions
Unified View
Diff Options
-
50-Login/Login-interface.robot
-
20-Login/phone-test.txt
-
11-Applet/2-Homepage/Interaction/ILikeitResource.robot
-
21-Applet/2-Homepage/Interaction/__init__.robot
-
52-Web/Mall/Activity.robot
-
482-Web/Mall/ActivityResource.robot
-
10output/log.html
-
1437output/output.xml
-
10output/report.html
@ -1,2 +1,2 @@ |
|||||
手机号 |
手机号 |
||||
18548157976 |
|
||||
|
19128859944 |
||||
@ -0,0 +1,2 @@ |
|||||
|
*** Settings *** |
||||
|
Documentation 互动 |
||||
@ -1,5 +1,8 @@ |
|||||
*** Settings *** |
*** Settings *** |
||||
Suite Setup |
|
||||
|
Suite Setup Import Variables ${EXECDIR}\\DA_data.yaml |
||||
Resource ActivityResource.robot |
Resource ActivityResource.robot |
||||
|
|
||||
*** Test Cases *** |
*** Test Cases *** |
||||
|
创建会员活动 |
||||
|
Given 查询婚介平台商品定价列表 |
||||
|
#When 运营创建婚介活动 |
||||
@ -1,10 +1,58 @@ |
|||||
*** Settings *** |
*** Settings *** |
||||
Library urllib3 |
Library urllib3 |
||||
Library String |
Library String |
||||
|
Library demjson |
||||
Library Collections |
Library Collections |
||||
|
Library HttpLibrary |
||||
|
Library JSONLibrary |
||||
Library RequestsLibrary |
Library RequestsLibrary |
||||
Library DatabaseLibrary |
Library DatabaseLibrary |
||||
|
Library HttpLibrary.HTTP |
||||
|
|
||||
*** Keywords *** |
*** Keywords *** |
||||
|
查询${dating}平台商品定价列表 |
||||
|
#查询商品列表 |
||||
|
FOR ${admin_header} IN @{Aheader_list} |
||||
|
Create Session dating ${${dating}.dating域名} ${admin_header} |
||||
|
${reps} GET On Session dating dating-agency-mall/user/page/product/by/operator params=pageSize=10&pageNum=1 |
||||
|
${records} Get From Dictionary ${reps.json()['data']} records #获取商品列表数据 |
||||
|
Set Global Variable ${records} |
||||
|
END |
||||
|
#获取指定下标数据 |
||||
|
${activityProductList} Create List |
||||
|
${indexs} Create List 0 1 2 3 4 6 |
||||
|
FOR ${index} IN @{indexs} |
||||
|
${productData} Set Variable ${records[${index}]} |
||||
|
${subCategory} Get From Dictionary ${productData} subCategory |
||||
|
${Data} Add Object To Json ${productData} $.freebie true #将freebie:true塞到商品json中 |
||||
|
#${Data} Evaluate demjson.encode(${Data},encoding='utf-8').decode() demjson |
||||
|
Set Global Variable ${Data} |
||||
|
Run Keyword If ${subCategory}==601 更新数据 |
||||
|
... ELSE log ${Data} |
||||
|
Append To List ${activityProductList} ${Data} |
||||
|
log ${activityProductList} |
||||
|
Set Global Variable ${activityProductList} |
||||
|
END |
||||
|
#将'转换为" |
||||
|
${ActivityDataList} Create List |
||||
|
FOR ${data} IN @{activityProductList} |
||||
|
${data} Evaluate demjson.encode(${data},encoding='utf-8').decode() demjson |
||||
|
Append To List ${ActivityDataList} ${data} |
||||
|
log ${ActivityDataList} |
||||
|
END |
||||
|
${ActivityDataList} Evaluate str(${ActivityDataList}).replace("[","").replace("]","").split(",") |
||||
|
log ${ActivityDataList} |
||||
|
Set Global Variable ${ActivityDataList} |
||||
|
|
||||
|
更新数据 |
||||
|
${Data} Update Value To Json ${Data} $.freebie false |
||||
|
Set Global Variable ${Data} |
||||
|
|
||||
运营创建${dating}活动 |
运营创建${dating}活动 |
||||
#创建活动 |
#创建活动 |
||||
|
FOR ${admin_header} IN @{Aheader_list} |
||||
|
Create Session dating ${${dating}.dating域名} ${admin_header} |
||||
|
${data} Set Variable { \ \ \ \ "activityName":"测试活动", \ \ \ \ "startTime":"2024-04-11 00:00:00", \ \ \ \ "endTime":"2024-04-11 23:59:59", \ \ \ \ "remark":"创建测试活动2024-04-09", \ \ \ \ "activityProductList":${ActivityDataList} } |
||||
|
log ${data} |
||||
|
${reps} POST On Session dating dating-agency-mall/user/save/activity |
||||
|
END |
||||
10
output/log.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1437
output/output.xml
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save