作者 bianxinhua

“合并app端代码

正在显示 50 个修改的文件 包含 2173 行增加0 行删除
name: 企业合伙人列表
base_url: ${ENV(base_url)}
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
var_access_token: $accessToken
sign: ${make_sign($currtime, $uuid, $var_access_token)}
startTime: ${get_January_timestamp()}
endTime: ${get_Decembe_timestamp()}
msg: 成功
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $var_access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '1'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 0.4.0
json:
startTime: 0
endTime: 0
joinWays:
- type: $type1
name: $name1
- type: $type2
name: $name2
- type: $type3
name: $name3
- type: $type4
name: $name4
sortBy: 0
keyword: ''
districts:
pageSize: 20
pageIndex: 0
method: POST
url: v2/company/partners
validate:
- eq:
- content.msg
- $msg
\ No newline at end of file
... ...
name: 企业统计
base_url: ${ENV(base_url)}
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
var_access_token: $accessToken
sign: ${make_sign($currtime, $uuid, $var_access_token)}
startTime: ${get_January_timestamp()}
endTime: ${get_Decembe_timestamp()}
msg: 成功
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $var_access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '1'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 0.4.0
json:
method: POST
url: v1/company/statistics
validate:
- eq:
- content.msg
- $msg
\ No newline at end of file
... ...
name: 分红订单
base_url: ${ENV(base_url)}
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
var_access_token: $accessToken
sign: ${make_sign($currtime, $uuid, $var_access_token)}
startTime: 0
endTime: ${get_nowTimestamp_1()}
partnerId: ${ENV(partnerId_app)}
###明细类型
detailAction: ${convert_to_int($detailAction)}
msg: 成功
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $var_access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '1'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 0.4.0
json:
startTime: $startTime
endTime: $endTime
detailAction: $detailAction
joinWays: $joinWays
pageIndex: 0
pageSize: 100
partnerId: ${convert_to_int($partnerId)}
method: POST
url: v1/dividend/orders
validate:
- eq:
- content.msg
- $msg
\ No newline at end of file
... ...
name: 获取授权令牌accessToken
base_url: ${ENV(base_url)}
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
access_token: ''
sign: ${make_sign($currtime, $uuid, $access_token)}
clientId: pdf233Znkjo
clientSecret: oHexnmeomYdo19NCmdwne83dfj
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '1'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 0.4.0
json:
clientSecret: $clientSecret
authCode: $authCode
clientId: $clientId
method: POST
url: v1/auth/accessToken
\ No newline at end of file
... ...
name: 获取统一用户中心公司
base_url: ${ENV(base_url)}
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
access_token: ''
sign: ${make_sign($currtime, $uuid, $access_token)}
clientId: pdf233Znkjo
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '1'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 0.4.0
json:
credentials: $credentials
clientId: $clientId
method: POST
url: v1/auth/companys
\ No newline at end of file
... ...
name: 账号登录
base_url: ${ENV(base_url)}
variables:
currtime: ${make_time()}
uuid: ${make_uuid()}
access_token: ''
cid: ${ENV(companyId_app)}
sign: ${make_sign($currtime, $uuid, $access_token)}
clientId: pdf233Znkjo
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
X-MMM-AccessToken: $access_token
X-MMM-AppName: com.mmm.ability
X-MMM-AppProject: ability
X-MMM-DeviceType: '1'
X-MMM-Sign: $sign
X-MMM-Timestamp: $currtime
X-MMM-Uuid: $uuid
X-MMM-Version: 0.4.0
json:
idType: $idType
cid: ${convert_to_int($cid)}
credentials: $credentials
clientId: $clientId
method: POST
url: v2/auth/login
\ No newline at end of file
... ...
name: 实际订单列表excel导入
base_url: ${ENV(base_manager_url)}
variables:
teardown_hooks:
- ${sleep(2)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
upload:
where:
file:
method: POST
url: /v1/order/actual/import/excel
validate:
- eq:
- content.msg
- ok
... ...
name: 实际订单列表excel导入
base_url: ${ENV(base_manager_url)}
variables:
type: 'PARTNER_ORDER_FILE'
teardown_hooks:
- ${sleep(2)}
request:
headers:
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
upload:
file: ${get_file()}
type: $type
method: POST
url: /v1/order/fileImport
validate:
- eq:
- content.msg
- ok
... ...
name: 登录公司
base_url: ${ENV(base_business_url)}
verify: False
teardown_hooks:
- ${teardown_hook_get_access_token($response)}
request:
headers:
Content-Type: application/json; charset=UTF-8
Authorization: Bearer ${get_Authorization()}
Origin: https://enterprise-platform-dev.fjmaimaimai.com
Referer: https://enterprise-platform-dev.fjmaimaimai.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
X-Requested-With: XMLHttpRequest
json:
companyId: $companyId
method: POST
url: auth/anonymousLogin
validate:
- eq:
- content.code
- 0
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
name: 登录列表
base_url: ${ENV(base_business_url)}
verify: False
teardown_hooks:
- ${teardown_hook_get_login_code($response)}
request:
headers:
Content-Type: application/json; charset=UTF-8
Authorization: Bearer ${get_access_token()}
Origin: https://enterprise-platform-dev.fjmaimaimai.com
Referer: https://enterprise-platform-dev.fjmaimaimai.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
X-Requested-With: XMLHttpRequest
json:
method: POST
url: auth/getSingleLoginMenus
validate:
- eq:
- content.code
- 0
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
name: 登录价值系统
base_url: ${ENV(base_worth_url)}
verify: False
variables:
msg: ok
teardown_hooks:
- ${teardown_hook_get_task_Authorization($response)}
request:
headers:
# Authorization: Bearer ${get_access_token()}
Content-Type: application/json; charset=UTF-8
Origin: https://enterprise-platform-dev.fjmaimaimai.com
Referer: https://enterprise-platform-dev.fjmaimaimai.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
X-Requested-With: XMLHttpRequest
json:
code: ${get_login_code()}
method: POST
url: auth/login
validate:
- eq:
- content.msg
- $msg
... ...
name: 企业平台账号登录
base_url: ${ENV(base_business_url)}
verify: False
variables:
# username: ${ENV(wpftwphone)}
password: 7c4a8d09ca3762af61e59520943dc26494f8941b
teardown_hooks:
- ${teardown_hook_get_Authorization($response)}
request:
headers:
Content-Type: application/json; charset=UTF-8
Origin: https://enterprise-platform-dev.fjmaimaimai.com
Referer: https://enterprise-platform-dev.fjmaimaimai.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
X-Requested-With: XMLHttpRequest
json:
password: $password
username: $username
method: POST
url: auth/pwdLogin
validate:
- eq:
- content.msg
- ok
... ...
name: 用户的公司列表
base_url: ${ENV(base_business_url)}
verify: False
request:
headers:
Content-Type: application/json; charset=UTF-8
Authorization: Bearer ${get_Authorization()}
Origin: https://enterprise-platform-dev.fjmaimaimai.com
Referer: https://enterprise-platform-dev.fjmaimaimai.com/
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
X-Requested-With: XMLHttpRequest
json:
method: POST
url: companies/userCompamies
validate:
- eq:
- content.code
- 0
- eq:
- content.msg
- ok
... ...
1867
1866
... ...
不能预览此文件类型
# -*- coding:utf-8 -*-
#@Time : 2021/2/5 10:32
#@File : statistics_func.py
#@Auth : bianxinhua
from datetime import date, timedelta
import datetime
###获取季度
def quarters1() :
today = datetime.date.today()
quarter = (today.month-1) // 3
return quarter
def get_quarters(key,*args_v):
quarters = args_v[0][quarters1() - 1][key]
return quarters
def get_statistics(*args_v):
value = []
statistics = []
for i in range(len(args_v)-1):
value.append(args_v[i])
for v in value:
statistics.append(args_v[-1][v])
return sum(statistics)
#统计应收/已收/未收
def statistics_func(keys,*args_v):
# print("====================args_v===============================")
# print(args_v)
value = []
num = 0
for i in range(len(args_v)):
if args_v[i] == []:
value.append(0)
else:
for j in range(len(args_v[i])):
value.append((args_v[i][j][keys]))
for v in value:
if type(v) == str:
v = float(v)
num = num + v
# print("===========================================================")
# print('num=',num)
return num
#统计订单金额
def statistics_actual_func(keys,*args_v):
# print("====================args_v===============================")
# print(args_v)
value = []
for i in range(len(args_v)):
for j in range(len(args_v[i])):
if args_v[i][j]['partnerCategory'] == keys:
value.append(args_v[i][j]['orderPrice'])
# print("===========================================================")
# print('value=',value)
return sum(value)
#统计个数
def statistics_num_func(keys,*args_v):
value = []
num = 0
for i in range(len(args_v)):
for j in range(len(args_v[i])):
value.append(args_v[i][j][keys])
for v in range(len(value)):
if float(value[v]) > 0 :
num = num +1
# print(num)
return num
... ...
{
"testcase":[
"testcases/app/dividends/DIVI001_career_dividendslist_testcases.yml"
]
}
\ No newline at end of file
... ...
# -*- coding:utf-8 -*-
# @Time :2019/12/4 9:37
# @Author :dengyuting
# @File :sendmsg.py
import os
import json
import requests
JENKINS_URL = str(os.getenv("JENKINS_URL"))
BUILD_NUMBER = str(os.getenv("BUILD_NUMBER"))
JOB_NAME = str(os.getenv("JOB_NAME"))
CAUSE = str(os.getenv("CAUSE"))
BUILD_URL = str(os.getenv("BUILD_URL"))
JOB_URL = str(os.getenv("JOB_URL"))
path = os.path.dirname(__file__)
summary_file = os.path.join(path, 'logs','testsuites','partner_app_testsuite.summary.json')
def getresult():
try:
with open(summary_file, 'r', encoding='UTF-8') as f:
f = f.read()
jsonfile = json.loads(f)
if jsonfile["success"] == True:
result = "SUCCESS"
else:
result = "FAIL"
total = jsonfile["stat"]["testcases"]["total"]
success = jsonfile["stat"]["testcases"]["success"]
fail = jsonfile["stat"]["testcases"]["fail"]
duration = round(jsonfile["time"]["duration"])
# teststeps_total = jsonfile["stat"]["teststeps"]["total"]
# teststeps_successes = jsonfile["stat"]["teststeps"]["successes"]
# teststeps_failures = jsonfile["stat"]["teststeps"]["failures"]
# teststeps_errors = jsonfile["stat"]["teststeps"]["errors"]
# teststeps_skipped = jsonfile["stat"]["teststeps"]["skipped"]
return result, total, success, fail, duration
except Exception as err:
print("this is err:{}" .format(err))
def sendinfo():
r =getresult()
data = {}
data['msgtype'] = 'text'
data['text'] = {}
data['text']['content'] = '天联共创项目【mmm_partner_api_test】:' \
'\n测试结果:'+r[0]+ \
'\n执行时间:' +str(r[4])+ \
's\n共执行测试用例:' +str(r[1]) +'\nSUCCESS:' +str(r[2])+ '\nFAIL:' +str(r[3])+ \
'\n测试报告地址:http://jenkins.fjmaimaimai.com/view/test/job/mmm_partner_api_test/HTML_20Report/'
# data['text']['mentioned_mobile_list'] = ["13559112969","@all"]
# data['text']['content'] = '【opp_api】测试执行结果:' + r[0] + \
# '\n 执行时间:' + str(r[4]) + \
# 's\n TOTAL:' + str(r[1]) + '\n SUCCESS:' + str(r[2]) + '\n FAIL:' + str(r[3])
url = 'https://oapi.dingtalk.com/robot/send?access_token=157a80f4a09380f1338a182de1e120b42ba2d07cd6b729b288543e4fd3f6d160'
headers = {'Content-Type': 'application/json'}
requests.post(url, json=data, headers=headers)
if __name__ == '__main__':
sendinfo()
... ...
config:
name: APP游客登录
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(visitorphone)}
id: ${ENV(id)}
msg: '成功'
#
teststeps:
- name: APP单个合伙人登录
api: api/app_api/login/auth_centerCompanys_api.yml
validate:
- eq:
- content.data.center.partner.companys.0.id
- ${convert_to_int($id)}
- length_equals:
- content.data.center.manager.companys
- 0
... ...
config:
name: APP高管登录
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(managerphone)}
id: ${ENV(companyId_app)}
msg: '成功'
#
teststeps:
- name: APP高管登录
api: api/app_api/login/auth_centerCompanys_api.yml
validate:
- length_equals:
- content.data.center.partner.companys
- 0
- eq:
- content.data.center.manager.companys.0.id
- ${convert_to_int($id)}
... ...
config:
name: APP合伙人登录,提示"当前账号已被禁用"
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(visitorphone)}
id: ${ENV(id)}
msg: '当前账号已被禁用'
#
teststeps:
- name: APP合伙人登录
api: api/app_api/login/auth_centerCompanys_api.yml
extract:
credentials: content.data.center.credentials
validate:
- eq:
- content.data.center.partner.companys.0.id
- ${convert_to_int($id)}
- length_equals:
- content.data.center.manager.companys
- 0
- eq:
- content.msg
- 成功
- name: APP高管账号登录,提示"当前账号已被禁用"
variables:
####身份类型 1:合伙人 2:高管
idType: ${convert_to_int(2)}
api: api/app_api/login/auth_login_api.yml
extract:
authCode: content.data.authCode
validate:
- eq:
- content.msg
- $msg
... ...
config:
name: APP多公司高管登录
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(adminphone_app)}
id: ${ENV(companyId_app)}
msg: '成功'
#
teststeps:
- name: APP多公司高管登录
api: api/app_api/login/auth_centerCompanys_api.yml
validate:
- length_equals:
- content.data.center.partner.companys
- 3
- length_equals:
- content.data.center.manager
- 3
... ...
config:
name: APP登录用例
base_url: ${ENV(base_url)}
variables:
phone: ${ENV(adminphone_app)}
msg: '成功'
output:
- accessToken
teststeps:
- name: $phone 登录系统
api: api/app_api/login/auth_centerCompanys_api.yml
extract:
credentials: content.data.center.credentials
validate:
- eq:
- content.msg
- 成功
- name: $phone 账号登录
api: api/app_api/login/auth_login_api.yml
extract:
authCode: content.data.authCode
validate:
- eq:
- content.msg
- 成功
#
- name: $phone 获取授权令牌accessToken
api: api/app_api/login/auth_accessToken_api.yml
extract:
accessToken: content.data.accessToken
validate:
- eq:
- content.msg
- 成功
... ...
config:
name: COMP001-企业统计值正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录天联共创app端系统
####身份类型 1:合伙人 2:高管
variables:
idType: ${convert_to_int(2)}
testcase: testcases/app/common/app_login_testcases.yml
output:
- accessToken
- name: 查看企业统计
api: api/app_api/company/statistics_api.yml
extract:
quarters: content.data.statistics
totalCount: content.data.statistics.totalCount
output:
- totalCount
- quarters
validate:
####合伙人支出
- eq:
- ${get_statistics(careerDividend,businessDividend,developDividend,appDividend,$quarters)}
- 2136
####订单金额
- eq:
- ${get_statistics(careerOrdersMoney,businessOrdersMoney,developOrdersMoney,appOrdersMoney,$quarters)}
- 25500
- name: 查看企业合伙人列表
variables:
type1: 1
name1: '事业合伙'
type2: 2
name2: '业务合伙'
type3: 3
name3: '研发合伙'
type4: 4
name4: '业务-产品应用合伙'
api: api/app_api/company/partners_api.yml
validate:
# ###合伙人数
- length_equals:
- content.data.partners
- $totalCount
\ No newline at end of file
... ...
config:
name: COMP001-按照类型过滤,查看合伙人列表,数据正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录天联共创app端系统
####身份类型 1:合伙人 2:高管
variables:
idType: ${convert_to_int(2)}
testcase: testcases/app/common/app_login_testcases.yml
output:
- accessToken
- name: 查看企业统计
api: api/app_api/company/statistics_api.yml
extract:
###事业合伙人数
careerCount: content.data.statistics.careerCount
output:
- careerCount
- name: 查看企业合伙人列表
variables:
type1: 1
name1: '事业合伙'
type2: 21
name2: '业务合伙1'
type3: 31
name3: '研发合伙1'
type4: 41
name4: '业务-产品应用合伙1'
api: api/app_api/company/partners_api.yml
validate:
# ###合伙人数
- length_equals:
- content.data.partners
- $careerCount
... ...
config:
name: DIVI001-事业-初始状态-统计值正确
base_url: ${ENV(base_manager_url)}
# variables:
# partnerCategoryId: 1
# orderType: 1
teststeps:
- name: 登录天联共创管理后台系统-分红列表-数据源来自于实发订单(业务合伙)
testcase: testcases/dividends/DIV001_app_dividendslist_testcases.yml
- name: 登录天联共创管理后台系统-分红管理-初始状态-各个值计算正确
testcase: testcases/dividends/DIV003_1_app_dividends_cal_testcases.yml
#
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
extract:
#事业合伙
career_actual_list: content.data.gridResult.lists
career_partnerCategory: content.data.gridResult.lists.0.partnerCategory
output:
- career_actual_list
- career_partnerCategory
#
- name: 查看事业分红列表
variables:
partnerCategoryId: 1
orderType: 1
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#事业合伙
career_lists: content.data.gridResult.lists
career_totalRow: content.data.gridResult.totalRow
output:
- career_lists
- career_totalRow
#
- name: 查看业务分红列表
variables:
partnerCategoryId: 2
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#业务合伙
business_lists: content.data.gridResult.lists
output:
- business_lists
#
- name: 查看研发分红列表
variables:
partnerCategoryId: 3
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#研发合伙
develop_lists: content.data.gridResult.lists
output:
- develop_lists
#
- name: 查看业务-产品应用分红列表
variables:
partnerCategoryId: 4
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#业务-产品应用合伙
applicationOrders_lists: content.data.gridResult.lists
output:
- applicationOrders_lists
- name: 登录天联共创app端系统
####身份类型 1:合伙人 2:高管
variables:
idType: ${convert_to_int(1)}
testcase: testcases/app/common/app_login_testcases.yml
output:
- accessToken
#
- name: 查看分红统计
api: api/app_api/dividend/statistics_api.yml
extract:
quarters: content.data.statistics.quarters
output:
- quarters
validate:
#####累计所有年份应收分红
- eq:
- content.data.statistics.receivable
- ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
####累计所有年份已收分红
- eq:
- content.data.statistics.received
- ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
####累计所有年份未收分红
- eq:
- content.data.statistics.outstanding
- ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
####季度已收分红
- eq:
- ${get_quarters(received,$quarters)}
- ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
####季度应收分红
- eq:
- ${get_quarters(receivable,$quarters)}
- ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
####季度未收分红
- eq:
- ${get_quarters(outstanding,$quarters)}
- ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
- name: 查看订单统计
api: api/app_api/order/statistics_api.yml
validate:
# ###今日新增实发订单
- eq:
- content.data.career.todayRealQuantity
- $career_totalRow
# ####今日新增实发订单金额
- eq:
- content.data.career.todayRealMoney
- ${statistics_actual_func($career_partnerCategory,$career_actual_list)}
# ###累计实发订单
- eq:
- content.data.career.cumulativeQuantity
- $career_totalRow
###累计实发订单金额
- eq:
- content.data.career.cumulativeMoney
- ${statistics_actual_func($career_partnerCategory,$career_actual_list)}
... ...
config:
name: DIVI002-事业-调整数量-更改支付状态-统计值正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: 登录天联共创管理后台系统-分红管理-调整数量由100改为50-各个值计算正确
testcase: testcases/dividends/DIV004_1_app_dividends_editnum_testcases.yml
- name: 登录天联共创管理后台系统-分红管理-产品1支付分红成功,数据正确
testcase: testcases/dividends/DIV007_app_dividends_payDividends_testcases.yml
- name: 登录天联共创管理后台系统--分红管理-产品1支付分红成功后,调整数量由100改为50,数据正确
testcase: testcases/dividends/DIV008_app_dividends_payDividends_editnum_testcases.yml
- name: 登录天联共创管理后台系统--分红管理-批量支付分红成功,数据正确
testcase: testcases/dividends/DIV010_app_dividends_payDividends_batch_testcases.yml
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
extract:
#事业合伙
career_actual_list: content.data.gridResult.lists
career_partnerCategory: content.data.gridResult.lists.0.partnerCategory
output:
- career_actual_list
- career_partnerCategory
- name: 查看事业分红列表
variables:
partnerCategoryId: 1
orderType: 1
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#事业合伙
career_lists: content.data.gridResult.lists
career_totalRow: content.data.gridResult.totalRow
output:
- career_lists
- career_totalRow
- name: 查看业务分红列表
variables:
partnerCategoryId: 2
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#业务合伙
business_lists: content.data.gridResult.lists
output:
- business_lists
#
- name: 查看研发分红列表
variables:
partnerCategoryId: 3
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#研发合伙
develop_lists: content.data.gridResult.lists
output:
- develop_lists
#
- name: 查看业务-产品应用分红列表
variables:
partnerCategoryId: 4
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#业务-产品应用合伙
applicationOrders_lists: content.data.gridResult.lists
output:
- applicationOrders_lists
- name: 登录天联共创app端系统
####身份类型 1:合伙人 2:高管
variables:
idType: ${convert_to_int(1)}
testcase: testcases/app/common/app_login_testcases.yml
output:
- accessToken
- name: 查看分红统计
api: api/app_api/dividend/statistics_api.yml
extract:
quarters: content.data.statistics.quarters
output:
- quarters
validate:
#####累计所有年份应收分红
- eq:
- content.data.statistics.receivable
- ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
### ####累计所有年份已收分红
- eq:
- content.data.statistics.received
- ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
# ####累计所有年份未收分红
- eq:
- content.data.statistics.outstanding
- ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
## ####季度已收分红
- eq:
- ${get_quarters(received,$quarters)}
- ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
# ####季度应收分红
- eq:
- ${get_quarters(receivable,$quarters)}
- ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
# ####季度未收分红
- eq:
- ${get_quarters(outstanding,$quarters)}
- ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
#
- name: 查看订单统计
api: api/app_api/order/statistics_api.yml
validate:
# ###今日新增实发订单
- eq:
- content.data.career.todayRealQuantity
- $career_totalRow
# ####今日新增实发订单金额
- eq:
- content.data.career.todayRealMoney
- ${statistics_actual_func($career_partnerCategory,$career_actual_list)}
# ###累计实发订单
- eq:
- content.data.career.cumulativeQuantity
- $career_totalRow
###累计实发订单金额
- eq:
- content.data.career.cumulativeMoney
- ${statistics_actual_func($career_partnerCategory,$career_actual_list)}
... ...
config:
name: DIVI003-事业分红订单-查询事业合伙-统计值正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: 登录天联共创管理后台系统
variables:
phone: ${ENV(adminphone_app)}
testcase: testcases/common/m_app_login_testcases.yml
- name: 查看事业分红列表
variables:
partnerCategoryId: 1
orderType: 1
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#事业合伙
career_lists: content.data.gridResult.lists
career_totalRow: content.data.gridResult.totalRow
output:
- career_lists
- career_totalRow
- name: 查看业务分红列表
variables:
partnerCategoryId: 2
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#业务合伙
business_lists: content.data.gridResult.lists
output:
- business_lists
#
- name: 查看研发分红列表
variables:
partnerCategoryId: 3
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#研发合伙
develop_lists: content.data.gridResult.lists
output:
- develop_lists
#
- name: 查看业务-产品应用分红列表
variables:
partnerCategoryId: 4
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#业务-产品应用合伙
applicationOrders_lists: content.data.gridResult.lists
output:
- applicationOrders_lists
- name: 登录天联共创app端系统
####身份类型 1:合伙人 2:高管
variables:
idType: ${convert_to_int(1)}
testcase: testcases/app/common/app_login_testcases.yml
output:
- accessToken
- name: 查看分红订单-已收明细
variables:
joinWays:
- type: ${convert_to_int(1)}
name: ${convert_to_string(事业合伙)}
detailAction: ${convert_to_int(0)}
api: api/app_api/dividend/orders_api.yml
validate:
####实发订单总数
- eq:
- content.data.total
- ${statistics_num_func(receiveDividends,$career_lists)}
- name: 查看分红订单-未收明细
variables:
joinWays:
- type: ${convert_to_int(1)}
name: ${convert_to_string(事业合伙)}
detailAction: ${convert_to_int(1)}
api: api/app_api/dividend/orders_api.yml
validate:
# ####实发订单总数
- eq:
- content.data.total
- ${statistics_num_func(uncollectedDividends,$career_lists)}
\ No newline at end of file
... ...
config:
name: DIVI004-事业分红订单-查询非事业合伙无数据时-列表返回正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: $phone 登录天联共创app端系统
####身份类型 1:合伙人 2:高管
variables:
idType: ${convert_to_int(1)}
testcase: testcases/app/common/app_login_testcases.yml
output:
- accessToken
- name: 查看分红订单-已收明细
variables:
joinWays:
- type: ${convert_to_int(4)}
name: ${convert_to_string(业务合伙)}
detailAction: ${convert_to_int(0)}
api: api/app_api/dividend/orders_api.yml
validate:
####实发订单总数
- length_equals:
- content.data.list
- 0
- eq:
- content.data.total
- 0
- name: 查看分红订单-未收明细
variables:
joinWays:
- type: ${convert_to_int(4)}
name: ${convert_to_string(业务合伙)}
detailAction: ${convert_to_int(1)}
api: api/app_api/dividend/orders_api.yml
validate:
####实发订单总数
- length_equals :
- content.data.list
- 0
- eq:
- content.data.total
- 0
\ No newline at end of file
... ...
config:
name: DIVI005-累计至今-明细-统计值正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: 登录天联共创管理后台系统
variables:
phone: ${ENV(adminphone_app)}
testcase: testcases/common/m_app_login_testcases.yml
- name: 登录天联共创管理后台系统-查看事业分红列表
variables:
partnerCategoryId: 1
orderType: 1
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#事业合伙
career_lists: content.data.gridResult.lists
career_totalRow: content.data.gridResult.totalRow
output:
- career_lists
- career_totalRow
- name: 登录天联共创管理后台系统-查看业务分红列表
variables:
partnerCategoryId: 2
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#业务合伙
business_lists: content.data.gridResult.lists
output:
- business_lists
#
- name: 登录天联共创管理后台系统-查看研发分红列表
variables:
partnerCategoryId: 3
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#研发合伙
develop_lists: content.data.gridResult.lists
output:
- develop_lists
#
- name: 登录天联共创管理后台系统-查看业务-产品应用分红列表
variables:
partnerCategoryId: 4
orderType: null
createTime: []
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
#业务-产品应用合伙
applicationOrders_lists: content.data.gridResult.lists
output:
- applicationOrders_lists
- name: 登录天联共创app端系统
####身份类型 1:合伙人 2:高管
variables:
idType: ${convert_to_int(1)}
testcase: testcases/app/common/app_login_testcases.yml
output:
- accessToken
#
- name: 查看分红统计与订单分红详情统计一致
api: api/app_api/dividend/statistics_api.yml
extract:
received: content.data.statistics.received
outstanding: content.data.statistics.outstanding
receivable: content.data.statistics.receivable
validate:
####已收分红总额
- eq:
- $received
- ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
####未收分红总额
- eq:
- $outstanding
- ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
#
# ####分红支出
- eq:
- ${statistics_func(dividendSpending,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
- ${statistics_func(dividendSpending,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)}
#
# ####应收分红总额
- eq:
- $receivable
- ${str_to_int($received,$outstanding,-75)}
\ No newline at end of file
... ...
config:
name: DIVI001-事业-初始状态-统计值正确
base_url: ${ENV(base_manager_url)}
# variables:
# partnerCategoryId: 1
# orderType: 1
teststeps:
- name: 登录天联共创管理后台系统-订单列表-数据源来自于实发订单
testcase: testcases/common/COM001-1_app_actual_add_testcases.yml
output:
- actual_saleDate
- name: 登录天联共创app端系统
####身份类型 1:合伙人 2:高管
variables:
idType: ${convert_to_int(1)}
testcase: testcases/app/common/app_login_testcases.yml
output:
- accessToken
##
- name: 查看订单列表
variables:
career_order_totalRow: ${get_saleDate_bigger_today($actual_saleDate)}
api: api/app_api/order/list_api.yml
extract:
career_total: content.data.total
validate:
# ###今日新增实发订单
- eq:
- content.data.total
- ${str_to_int($career_total,$career_order_totalRow)}
# ###累计实发订单
- eq:
- content.data.total
- ${str_to_int($career_total,$career_order_totalRow)}
\ No newline at end of file
... ...
config:
name: COM001-新增明日实际订单
base_url: ${ENV(base_manager_url)}
variables:
partnerID: ${ENV(partnerId_app)}
commissionProportion: 0
orderNum1: 100
univalence: 15
partnerRatio: 10
orderNum2: 200
partnerCategory: ${get_partnerCategory(1)}
partnerCategoryId: 1
output:
- actual_saleDate
- actual_id
- product_id_1
- product_id_2
teststeps:
- name: 登录系统
variables:
phone: ${ENV(adminphone_app)}
testcase: testcases/common/m_app_login_testcases.yml
- name: 新增明日实发订单
variables:
saleDate: ${tomorrow_time_str()}
api: api/m_api/actual/m_add_app_order_actual_api.yml
extract:
- orderid: content.data.id
validate:
- eq:
- content.msg
- ok
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
extract:
- actual_id: content.data.gridResult.lists.0.id
- actual_saleDate: content.data.gridResult.lists.0
output:
- actual_saleDate
validate:
- eq:
- content.data.gridResult.lists.0.id
- ${convert_to_string($orderid)}
- eq:
- content.msg
- ok
... ...
config:
name: COM001-新增实际订单
base_url: ${ENV(base_manager_url)}
variables:
partnerID: ${ENV(partnerId_app)}
commissionProportion: 5
orderNum1: 100
univalence: 15
partnerRatio: 10
orderNum2: 200
# partnerRatio2: 20
output:
- actual_id
- product_id_1
- product_id_2
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone_app)}
testcase: testcases/common/m_app_login_testcases.yml
- name: 新增实发订单
api: api/m_api/actual/m_add_app_order_actual_api.yml
extract:
- orderid: content.data.id
validate:
- eq:
- content.msg
- ok
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
extract:
- actual_id: content.data.gridResult.lists.0.id
validate:
- eq:
- content.data.gridResult.lists.0.id
- ${convert_to_string($orderid)}
- eq:
- content.msg
- ok
- name: 查看实际订单详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/actual/m_order_actual_detail_api.yml
extract:
- product_id_1: content.data.product.0.id
- product_id_2: content.data.product.1.id
validate:
- eq:
- content.data.orderNumCount
- ${add($orderNum1,$orderNum2)}
- eq:
- content.data.orderAmountAdjustmentCount
- ${cal_orderPrice($univalence, $orderNum1, $orderNum2)}
- eq:
- content.data.product.0.orderPrice
- ${cal_orderPrice($univalence, $orderNum1)}
- eq:
- content.data.product.1.orderPrice
- ${cal_orderPrice($univalence, $orderNum2)}
\ No newline at end of file
... ...
config:
name: COM004-查看分红列表
base_url: ${ENV(base_manager_url)}
variables:
partnerCategoryId: 1
orderType: 1
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 查看分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
\ No newline at end of file
... ...
config:
name: 管理后台登陆
# base_url: ${ENV(base_manager_url)}
variables:
phone: ${ENV(adminphone_app)}
teststeps:
- name: $phone 登录企业平台
api: api/m_api/m_login_api/m_pwdLogin_api.yml
extract:
pwdLogintoken: content.data.access.token
validate:
- eq:
- content.msg
- ok
- name: 选择公司登录
variables:
companyId: ${ENV(companyId_app)}
api: api/m_api/m_login_api/m_anonymousLogin_api.yml
extract:
anonymousLogintoken: content.data.access.token
validate:
- eq:
- content.msg
- ok
#
- name: 单点登录,获取secret用于登录子系统
api: api/m_api/m_login_api/m_getSingleLoginMenus_api.yml
extract:
url: content.data.list.1.url
validate:
- eq:
- content.msg
- ok
- name: 使用secret登录合伙人系统
api: api/m_api/m_login_api/m_login_api.yml
teardown_hooks:
- ${teardown_hook_get_m_accesstoken($response)}
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
config:
name: start_testcases
#清理数据
setup_hooks:
- ${setup_hook_clean_db(366)}
- ${setup_hook_clean_orderid()}
teardown_hooks:
- ${sleep(2)}
teststeps:
- name: start_testcases
api: api/app_api/login/gettimestamp_api.yml
\ No newline at end of file
... ...
config:
name: DIV001-分红列表-数据源来自于实发订单
base_url: ${ENV(base_manager_url)}
variables:
orderType: null
partnerCategoryId: 2
searchText: ''
createTime: []
teststeps:
- name: 登录系统
variables:
phone: ${ENV(adminphone_app)}
testcase: testcases/common/m_app_login_testcases.yml
- name: 查看业务分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
extract:
- num1: content.data.gridResult.totalRow
- name: 新增实发订单(业务订单)
variables:
partnerCategory: ${get_partnerCategory(2)}
partnerCategoryId: 2
saleDate: ${today_time_str()}
api: api/m_api/actual/m_add_app_order_actual_api.yml
validate:
- eq:
- content.msg
- ok
#
- name: 查看业务分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
- eq:
- content.msg
- ok
- eq:
- content.data.gridResult.totalRow
- ${add($num1,1)}
\ No newline at end of file
... ...
config:
name: DIV003_1-分红管理-初始状态-各个值计算正确
base_url: ${ENV(base_manager_url)}
variables:
partnerID: ${ENV(partnerId_app)}
commissionProportion: 5
orderNum1: 100
univalence: 15
partnerRatio: 10
orderNum2: 200
partnerCategory: ${get_partnerCategory(1)}
partnerCategoryId: 1
saleDate: ${today_time_str()}
# partnerRatio2: 20
teststeps:
- name: 新增实际订单
testcase: testcases/common/COM001_app_actual_add_testcases.yml
output:
- actual_id
- name: 查看该订单的分红详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/dividends/m_dividends_detail_api.yml
validate:
- eq:
- content.data.order.orderId
- $actual_id
#####合伙人应收分红总额
- eq:
- content.data.order.partnerDividends
- ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
#####合伙人已收分红总额
- eq:
- content.data.order.receivedDividends
- ${convert_to_string(0)}
#####合伙人未收分红总额
- eq:
- content.data.order.notReceivedDividend
- ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
#####合伙人分红支出总额
- eq:
- content.data.order.dividendSpending
- ${convert_to_string(0)}
#####订单类型
- eq:
- content.data.order.orderType
- 1
#####产品1总金额
- eq:
- content.data.product.detail.0.commodityPrice
- 1500
#####产品1总数量
- eq:
- content.data.product.detail.0.orderNum
- $orderNum1
#####产品1应收分红
- eq:
- content.data.product.detail.0.partnerDividends
- ${cal_Ratio($partnerRatio, $univalence, $orderNum1)}
#####产品1分红状态
- eq:
- content.data.product.detail.0.paymentStatus
- 1
#####产品2总金额
- eq:
- content.data.product.detail.1.commodityPrice
- 3000
#####产品2总数量
- eq:
- content.data.product.detail.1.orderNum
- $orderNum2
#####产品2应收分红
- eq:
- content.data.product.detail.1.partnerDividends
- ${cal_Ratio($partnerRatio, $univalence, $orderNum2)}
#####产品2分红状态
- eq:
- content.data.product.detail.1.paymentStatus
- 1
#####订单总数量
- eq:
- content.data.product.orderNumCount
- ${add($orderNum1,$orderNum2)}
#####总金额
- eq:
- content.data.product.orderAmountAdjustmentCount
- ${cal_orderPrice($univalence, $orderNum1, $orderNum2)}
####合伙人应收分红合计
- eq:
- content.data.product.partnerDividendsCount
- ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
\ No newline at end of file
... ...
config:
name: DIV004_1-分红管理-调整数量由100改为50-各个值计算正确
base_url: ${ENV(base_manager_url)}
variables:
goodNumber: 50
partnerCategory: ${get_partnerCategory(1)}
partnerCategoryId: 1
saleDate: ${today_time_str()}
orderType: 1
createTime: []
teststeps:
- name: 新增实际订单
testcase: testcases/common/COM001_app_actual_add_testcases.yml
output:
- actual_id
- product_id_1
- product_id_2
- name: 编辑分红-数量由100调整为50
variables:
orderId: ${convert_to_string($actual_id)}
state: 1
partnerBonusPercent: 10
reason: '修改原因${get_stringcode(5)}'
productId: ${convert_to_string($product_id_1)}
api: api/m_api/dividends/m_dividends_modify_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
#####等待支付状态=1
- eq:
- content.data.gridResult.lists.0.stateOfPayment
- 1
######应收分红
- eq:
- content.data.gridResult.lists.0.dividendsReceivable
- ${convert_to_string(375)}
#####已收分红
- eq:
- content.data.gridResult.lists.0.receiveDividends
- ${convert_to_string(0)}
#####未收分红
- eq:
- content.data.gridResult.lists.0.uncollectedDividends
- ${convert_to_string(375)}
#####分红支出
- eq:
- content.data.gridResult.lists.0.dividendSpending
- ${convert_to_string(0)}
- name: 查看该订单的分红详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/dividends/m_dividends_detail_api.yml
validate:
- eq:
- content.data.order.orderId
- $actual_id
#####合伙人未收分红总额
- eq:
- content.data.order.notReceivedDividend
- ${convert_to_string(375)}
#####合伙人已收分红总额
- eq:
- content.data.order.receivedDividends
- ${convert_to_string(0)}
#####合伙人应收分红总额
- eq:
- content.data.order.partnerDividends
- ${convert_to_string(375)}
#####合伙人分红支出总额
- eq:
- content.data.order.dividendSpending
- ${convert_to_string(0)}
#####初始总数量
- eq:
- content.data.product.orderNumCount
- 250
#####初始总金额
- eq:
- content.data.product.orderAmountAdjustmentCount
- 3750
#####合伙人应收分红总额调整
- eq:
- content.data.product.partnerDividendsCount
- ${convert_to_string(375)}
#####产品1是否正确
- eq:
- content.data.product.detail.0.productId
- ${convert_to_int($product_id_1)}
#####产品1总金额
- eq:
- content.data.product.detail.0.commodityPrice
- 750
#####产品1应收分红
- eq:
- content.data.product.detail.0.partnerDividends
- ${convert_to_string(75)}
#####产品1数量调整
- eq:
- content.data.product.detail.0.orderNum
- $goodNumber
#####产品1分红状态
- eq:
- content.data.product.detail.0.paymentStatus
- 1
#####产品2总金额
- eq:
- content.data.product.detail.1.commodityPrice
- 3000
#####产品2应收分红
- eq:
- content.data.product.detail.1.partnerDividends
- ${convert_to_string(300)}
#####产品2分红状态
- eq:
- content.data.product.detail.1.paymentStatus
- 1
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
validate:
- eq:
- content.data.gridResult.lists.0.id
- $actual_id
- eq:
- content.data.gridResult.lists.0.orderNum
- 300
- eq:
- content.data.gridResult.lists.0.quantityControl
- ${convert_to_string(250)}
- eq:
- content.data.gridResult.lists.0.orderPrice
- 4500
- eq:
- content.data.gridResult.lists.0.priceControl
- ${convert_to_string(3750)}
- name: 查看实际订单详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/actual/m_order_actual_detail_api.yml
validate:
- eq:
- content.data.orderNumCount
- 300
- eq:
- content.data.orderAmountAdjustmentCount
- 4500
- eq:
- content.data.orderNumCountControl
- ${convert_to_string(250)}
- eq:
- content.data.orderAmountAdjustmentCountControl
- ${convert_to_string(3750)}
- eq:
- content.data.product.0.orderPrice
- 1500
- eq:
- content.data.product.0.quantityControl
- ${convert_to_string($goodNumber)}
- eq:
- content.data.product.0.priceControl
- ${convert_to_string(750)}
- eq:
- content.data.product.1.orderPrice
- 3000
\ No newline at end of file
... ...
config:
name: DIV007-分红管理-产品1支付分红成功,数据正确
base_url: ${ENV(base_manager_url)}
variables:
partnerID: ${ENV(partnerId_app)}
partnerCategory: ${get_partnerCategory(1)}
partnerCategoryId: 1
saleDate: ${today_time_str()}
orderType: 1
createTime: []
teststeps:
- name: 新增实际订单
testcase: testcases/common/COM001_app_actual_add_testcases.yml
output:
- actual_id
- product_id_1
- product_id_2
- name: 支付分红
variables:
orderId: ${convert_to_string($actual_id)}
productId: ${convert_to_string($product_id_1)}
api: api/m_api/dividends/m_dividends_payDividends_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
#####已支付状态=2
- eq:
- content.data.gridResult.lists.0.stateOfPayment
- 2
######应收分红
- eq:
- content.data.gridResult.lists.0.dividendsReceivable
- ${convert_to_string(450)}
#####已收分红
- eq:
- content.data.gridResult.lists.0.receiveDividends
- ${convert_to_string(150)}
#####未收分红
- eq:
- content.data.gridResult.lists.0.uncollectedDividends
- ${convert_to_string(300)}
#####分红支出
- eq:
- content.data.gridResult.lists.0.dividendSpending
- ${convert_to_string(0)}
- name: 查看该订单的分红详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/dividends/m_dividends_detail_api.yml
validate:
- eq:
- content.data.order.orderId
- $actual_id
#####合伙人应收分红总额
- eq:
- content.data.order.partnerDividends
- ${convert_to_string(450)}
#####合伙人未收分红总额
- eq:
- content.data.order.notReceivedDividend
- ${convert_to_string(300)}
#####合伙人已收分红总额
- eq:
- content.data.order.receivedDividends
- ${convert_to_string(150)}
#####合伙人分红支出总额
- eq:
- content.data.order.dividendSpending
- ${convert_to_string(0)}
#####产品1是否正确
- eq:
- content.data.product.detail.0.productId
- ${convert_to_int($product_id_1)}
#####产品1总金额
- eq:
- content.data.product.detail.0.commodityPrice
- 1500
#####产品1应收分红
- eq:
- content.data.product.detail.0.partnerDividends
- ${convert_to_string(150)}
#####产品1数量
- eq:
- content.data.product.detail.0.orderNum
- 100
#####产品1分红状态
- eq:
- content.data.product.detail.0.paymentStatus
- 2
#####产品2总金额
- eq:
- content.data.product.detail.1.commodityPrice
- 3000
#####产品2应收分红
- eq:
- content.data.product.detail.1.partnerDividends
- ${convert_to_string(300)}
#####产品2分红状态
- eq:
- content.data.product.detail.1.paymentStatus
- 1
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
validate:
- eq:
- content.data.gridResult.lists.0.id
- $actual_id
- eq:
- content.data.gridResult.lists.0.orderNum
- 300
- eq:
- content.data.gridResult.lists.0.orderPrice
- 4500
- name: 查看实际订单详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/actual/m_order_actual_detail_api.yml
validate:
- eq:
- content.data.orderNumCount
- 300
- eq:
- content.data.orderAmountAdjustmentCount
- 4500
- eq:
- content.data.product.0.orderPrice
- 1500
- eq:
- content.data.product.1.orderPrice
- 3000
\ No newline at end of file
... ...
config:
name: DIV008-分红管理-产品1支付分红成功后,调整数量由100改为50,数据正确
base_url: ${ENV(base_manager_url)}
variables:
goodNumber: 50
partnerCategory: ${get_partnerCategory(1)}
partnerCategoryId: 1
saleDate: ${today_time_str()}
orderType: 1
createTime: []
teststeps:
- name: 新增实际订单
testcase: testcases/common/COM001_app_actual_add_testcases.yml
output:
- actual_id
- product_id_1
- product_id_2
- name: 支付分红
variables:
orderId: ${convert_to_string($actual_id)}
productId: ${convert_to_string($product_id_1)}
api: api/m_api/dividends/m_dividends_payDividends_api.yml
validate:
- eq:
- content.msg
- ok
- name: 编辑分红-数量由100调整为50
variables:
orderId: ${convert_to_string($actual_id)}
state: 1
partnerBonusPercent: 10
reason: '修改原因${get_stringcode(5)}'
productId: ${convert_to_string($product_id_1)}
api: api/m_api/dividends/m_dividends_modify_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
#####已支付状态=1
- eq:
- content.data.gridResult.lists.0.stateOfPayment
- 2
######应收分红
- eq:
- content.data.gridResult.lists.0.dividendsReceivable
- ${convert_to_string(375)}
#####已收分红
- eq:
- content.data.gridResult.lists.0.receiveDividends
- ${convert_to_string(150)}
#####未收分红
- eq:
- content.data.gridResult.lists.0.uncollectedDividends
- ${convert_to_string(300)}
#####分红支出
- eq:
- content.data.gridResult.lists.0.dividendSpending
- ${convert_to_string(75)}
- name: 查看该订单的分红详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/dividends/m_dividends_detail_api.yml
validate:
- eq:
- content.data.order.orderId
- $actual_id
#####合伙人应收分红总额
- eq:
- content.data.order.partnerDividends
- ${convert_to_string(375)}
#####合伙人未收分红总额
- eq:
- content.data.order.notReceivedDividend
- ${convert_to_string(300)}
#####合伙人已收分红总额
- eq:
- content.data.order.receivedDividends
- ${convert_to_string(150)}
#####合伙人分红支出总额
- eq:
- content.data.order.dividendSpending
- ${convert_to_string(75)}
#####产品1是否正确
- eq:
- content.data.product.detail.0.productId
- ${convert_to_int($product_id_1)}
#####产品1总金额
- eq:
- content.data.product.detail.0.commodityPrice
- 750
#####产品1应收分红
- eq:
- content.data.product.detail.0.partnerDividends
- ${convert_to_string(75)}
#####产品1数量
- eq:
- content.data.product.detail.0.orderNum
- 50
#####产品1分红状态
- eq:
- content.data.product.detail.0.paymentStatus
- 2
#####产品2总金额
- eq:
- content.data.product.detail.1.commodityPrice
- 3000
#####产品2应收分红
- eq:
- content.data.product.detail.1.partnerDividends
- ${convert_to_string(300)}
#####产品2分红状态
- eq:
- content.data.product.detail.1.paymentStatus
- 1
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
validate:
- eq:
- content.data.gridResult.lists.0.id
- $actual_id
- eq:
- content.data.gridResult.lists.0.orderNum
- 300
- eq:
- content.data.gridResult.lists.0.orderPrice
- 4500
- name: 查看实际订单详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/actual/m_order_actual_detail_api.yml
validate:
- eq:
- content.data.orderNumCount
- 300
- eq:
- content.data.orderAmountAdjustmentCount
- 4500
- eq:
- content.data.product.0.orderPrice
- 1500
- eq:
- content.data.product.1.orderPrice
- 3000
\ No newline at end of file
... ...
config:
name: DIV010-分红管理-批量支付分红成功,数据正确
base_url: ${ENV(base_manager_url)}
variables:
partnerID: ${ENV(partnerId_app)}
commissionProportion: 5
orderNum1: 100
univalence: 15
partnerRatio: 10
orderNum2: 200
partnerCategory: ${get_partnerCategory(1)}
partnerCategoryId: 1
orderType: 1
saleDate: ${today_time_str()}
createTime: []
# partnerRatio2: 20
# output:
# - actual_id
# - product_id_1
# - product_id_2
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone_app)}
testcase: testcases/common/m_app_login_testcases.yml
- name: 新增实发订单
times: 3
api: api/m_api/actual/m_add_app_order_actual_api.yml
teardown_hooks:
- ${teardown_hook_get_orderid($response)}
validate:
- eq:
- content.msg
- ok
- name: 查看分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
#####已支付状态=2
- eq:
- content.data.gridResult.lists.0.stateOfPayment
- 1
- name: 批量支付分红
api: api/m_api/dividends/m_dividends_payDividends_batch_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
#####已支付状态=2
- eq:
- content.data.gridResult.lists.0.stateOfPayment
- 2
- eq:
- content.data.gridResult.lists.1.stateOfPayment
- 2
- eq:
- content.data.gridResult.lists.2.stateOfPayment
- 2
\ No newline at end of file
... ...
config:
name: 合伙人测试集
testcases:
- name: start....初始化数据库和文件
testcase: testcases/common/start_app_testcases.yml
##############################APP端合伙人开始################################
- name: DIVI001-事业-初始状态-统计值正确
testcase: testcases/app/dividends/DIVI001_career_dividendslist_testcases.yml
- name: DIVI002-事业-调整数量-更改支付状态-统计值正确
testcase: testcases/app/dividends/DIVI002_career_dividendslist_testcases.yml
- name: DIVI003-事业分红订单-查询事业合伙-统计值正确
testcase: testcases/app/dividends/DIVI003_career_dividends_orderslist_testcases.yml
- name: DIVI004-事业分红订单-查询非事业合伙无数据时-列表返回正确
testcase: testcases/app/dividends/DIVI004_career_dividends_orderslist_search_null_testcases.yml
- name: DIVI005-累计至今-明细-统计值正确
testcase: testcases/app/dividends/DIVI005_dividends_Details_testcases.yml
- name: DIVI006-累计实发订单列表不包含明日
testcase: testcases/app/dividends/DIVI006_tomorrow_career_dividendslist_testcases.yml
###################################APP端合伙人权限################################
- name: COMM1-单个合伙人登录
testcase: testcases/app/common/COMM1_app_partner_login_testcases.yml
- name: COMM2-单个高管登录
testcase: testcases/app/common/COMM2_app_manager_login_testcases.yml
- name: COMM3-合伙人登录,提示"当前账号已被禁用"
testcase: testcases/app/common/COMM3_app_partner_login_fail_testcases.yml
- name: COMM4-APP多公司高管登录
testcase: testcases/app/common/COMM4_app_more_company_manager_login_testcases.yml
###################################APP端合伙人结束################################
###################################APP端高管开始################################
- name: COMP001-企业统计值正确
testcase: testcases/app/company/COMP001_company_statistics_testcases.yml
- name: COMP002-按照类型过滤,查看合伙人列表,数据正确
testcase: testcases/app/company/COMP002_company_partners_testcases.yml
###############################APP端高管结束################################
... ...