diff --git a/0-Login/phone-test.txt b/0-Login/phone-test.txt
index 443de94..5e06aa7 100644
--- a/0-Login/phone-test.txt
+++ b/0-Login/phone-test.txt
@@ -1,2 +1,2 @@
手机号
-19128859944
\ No newline at end of file
+15014242835
\ No newline at end of file
diff --git a/1-Applet/2-Homepage/BlindDate/AdvancedsearchResource.robot b/1-Applet/2-Homepage/BlindDate/AdvancedsearchResource.robot
index 4c8f6fa..bd6ed4f 100644
--- a/1-Applet/2-Homepage/BlindDate/AdvancedsearchResource.robot
+++ b/1-Applet/2-Homepage/BlindDate/AdvancedsearchResource.robot
@@ -245,6 +245,6 @@ region固定省市-广州
${right_id} Set Variable ${check_1[0][0]}
${insert_2} Execute Sql String INSERT INTO `dating_agency_mall`.`da_right_term`(`id`, `is_delete`, `create_time`, `update_time`, `right_id`, `display_name`, `name`, `unit`, `value`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${right_id}, '规格', 1, 102, NULL)
${insert_3} Execute Sql String INSERT INTO `dating_agency_mall`.`da_right_term`(`id`, `is_delete`, `create_time`, `update_time`, `right_id`, `display_name`, `name`, `unit`, `value`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${right_id}, '权益上限额度', 2, 1, '140')
- ${insert_4} Execute Sql String INSERT INTO `dating_agency_mall`.`da_right_term`(`id`, `is_delete`, `create_time`, `update_time`, `right_id`, `display_name`, `name`, `unit`, `value`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${right_id}, '权益剩余额度', 3, 1, '130')
+ ${insert_4} Execute Sql String INSERT INTO `dating_agency_mall`.`da_right_term`(`id`, `is_delete`, `create_time`, `update_time`, `right_id`, `display_name`, `name`, `unit`, `value`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${right_id}, '权益剩余额度', 3, 1, '140')
Disconnect From Database
END
diff --git a/1-Applet/3-Customer/EquityResource.robot b/1-Applet/3-Customer/EquityResource.robot
index 43bbf04..ea8d587 100644
--- a/1-Applet/3-Customer/EquityResource.robot
+++ b/1-Applet/3-Customer/EquityResource.robot
@@ -105,7 +105,7 @@ Library DatabaseLibrary
${right_id} Set Variable ${check_1[0][0]}
${insert_2} Execute Sql String INSERT INTO `dating_agency_mall`.`da_right_term`(`id`, `is_delete`, `create_time`, `update_time`, `right_id`, `display_name`, `name`, `unit`, `value`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${right_id}, '规格', 1, 102, NULL)
${insert_3} Execute Sql String INSERT INTO `dating_agency_mall`.`da_right_term`(`id`, `is_delete`, `create_time`, `update_time`, `right_id`, `display_name`, `name`, `unit`, `value`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${right_id}, '权益上限额度', 2, 1, '140')
- ${insert_4} Execute Sql String INSERT INTO `dating_agency_mall`.`da_right_term`(`id`, `is_delete`, `create_time`, `update_time`, `right_id`, `display_name`, `name`, `unit`, `value`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${right_id}, '权益剩余额度', 3, 1, '130')
+ ${insert_4} Execute Sql String INSERT INTO `dating_agency_mall`.`da_right_term`(`id`, `is_delete`, `create_time`, `update_time`, `right_id`, `display_name`, `name`, `unit`, `value`) VALUES (NULL, 0, '${dataTime}', '${dataTime}', ${right_id}, '权益剩余额度', 3, 1, '140')
Disconnect From Database
END
diff --git a/2-Web/Mall/Activity.robot b/2-Web/Mall/Activity.robot
new file mode 100644
index 0000000..b69ba36
--- /dev/null
+++ b/2-Web/Mall/Activity.robot
@@ -0,0 +1,5 @@
+*** Settings ***
+Suite Setup
+Resource ActivityResource.robot
+
+*** Test Cases ***
diff --git a/2-Web/Mall/ActivityResource.robot b/2-Web/Mall/ActivityResource.robot
new file mode 100644
index 0000000..45822bc
--- /dev/null
+++ b/2-Web/Mall/ActivityResource.robot
@@ -0,0 +1,10 @@
+*** Settings ***
+Library urllib3
+Library String
+Library Collections
+Library RequestsLibrary
+Library DatabaseLibrary
+
+*** Keywords ***
+运营创建${dating}活动
+ #创建活动
diff --git a/2-Web/Mall/ProductResource.robot b/2-Web/Mall/ProductResource.robot
index 9099165..53a70ef 100644
--- a/2-Web/Mall/ProductResource.robot
+++ b/2-Web/Mall/ProductResource.robot
@@ -7,9 +7,9 @@ Library DatabaseLibrary
*** Keywords ***
平台商品数据创建
- ${subCategory_list} Create List 101 201 301 302 401 #产品名称
- ${mainCategory_list} Create List 1 2 3 3 4 #产品分类
- ${productTitle_list} Create List 学历认证 头像修改 解锁更多人数 高级搜索 线下约见面
+ ${subCategory_list} Create List 101 201 301 302 401 501 601 #产品名称
+ ${mainCategory_list} Create List 1 2 3 3 4 3 3 #产品分类
+ ${productTitle_list} Create List 学历认证 头像修改 解锁更多人数 高级搜索 线下约见面 聊天卡 会员
${data_list} Create List
FOR ${mainCategory} ${subCategory} ${productTitle} IN ZIP ${mainCategory_list} ${subCategory_list} ${productTitle_list}
${productSpecUnit_list} Create List 101 102 #产品规格:101 周期,102 天数
@@ -25,10 +25,13 @@ Library DatabaseLibrary
END
创建${dating}平台商品
+ #创建商品信息
FOR ${admin_header} IN @{Aheader_list}
Create Session dating ${${dating}.dating域名} ${admin_header}
${reps} POST On Session dating dating-agency-mall/user/create/product ${data.encode('utf-8')}
${productId} Get From Dictionary ${reps.json()} data #产品id
+ ${message} Get From Dictionary ${reps.json()} message
+ Should Be Equal As Strings ${message} successful
Set Global Variable ${productId}
END
@@ -41,33 +44,49 @@ Library DatabaseLibrary
END
查询${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 #获取商品列表数据
- ${product} Evaluate random.choice(${records}) random #随机获取商品信息
+ Set Global Variable ${records}
+ #${product} Evaluate random.choice(${records}) random #随机获取商品信息
+ 遍历商品列表
+ END
+
+遍历商品列表
+ ${productIdList} Create List
+ ${productTitleList} Create List
+ FOR ${product} IN @{records}
${status} Get From Dictionary ${product} status #商品状态
${productId} Get From Dictionary ${product} productId #商品id
${productTitle} Get From Dictionary ${product} productTitle #商品标题
${productSpecId} Get From Dictionary ${product} productSpecId #商品规格id
+ Append To List ${productIdList} ${productId}
+ Append To List ${productTitleList} ${productTitle}
Set Global Variable ${status}
Set Global Variable ${productId}
Set Global Variable ${productTitle}
+ Set Global Variable ${productIdList}
Set Global Variable ${productSpecId}
+ Set Global Variable ${productTitleList}
END
数据库查询商品表
- Connect To Database Using Custom Params pymysql database='dating_agency_mall',user='root',password='qniaothreetwoonego',host='8.135.8.221'
- ${check} Query SELECT product_title FROM `dating_agency_mall`.`da_product` WHERE `id` = '${productId}' AND `is_delete` = '0' #通过商品id查询商品名称
- ${title} Set Variable ${check[0][0]}
- Should Be Equal As Strings ${title} ${productTitle}
- Disconnect From Database
+ FOR ${productId} ${productTitle} IN ZIP ${productIdList} ${productTitleList}
+ Connect To Database Using Custom Params pymysql database='dating_agency_mall',user='root',password='qniaothreetwoonego',host='8.135.8.221'
+ ${check} Query SELECT product_title FROM `dating_agency_mall`.`da_product` WHERE `id` = '${productId}' AND `is_delete` = '0' #通过商品id查询商品名称
+ ${title} Set Variable ${check[0][0]}
+ Should Be Equal As Strings ${title} ${productTitle}
+ Disconnect From Database
+ END
操作${dating}平台商品上下架
#操作上架
- FOR ${admin_header} IN @{Aheader_list}
+ FOR ${admin_header} ${productId} IN ZIP ${Aheader_list} ${productIdList}
Create Session dating ${${dating}.dating域名} ${admin_header}
- ${data} Set Variable If ${status}==1 {"productId":"${productId}","status":2} {"productId":"${productId}","status":1}
+ ${data} Set Variable {"productId":"${productId}","status":1}
+ #${data} Set Variable If ${status}==2 {"productId":"${productId}","status":1} {"productId":"${productId}","status":1}
${reps} POST On Session dating dating-agency-mall/user/operate/product ${data.encode('utf-8')}
${message} Get From Dictionary ${reps.json()} message
Should Be Equal As Strings ${message} successful
diff --git a/__init__.robot b/__init__.robot
new file mode 100644
index 0000000..6329711
--- /dev/null
+++ b/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Suite Setup Import Variables ${EXECDIR}\\DA_data.yaml
diff --git a/output/log.html b/output/log.html
index 5a876cc..9ddd172 100644
--- a/output/log.html
+++ b/output/log.html
@@ -1806,28 +1806,25 @@ function stopPropagation(event) {
window.output = {};
-