正在显示
50 个修改的文件
包含
2173 行增加
和
0 行删除
不能预览此文件类型
api/app_api/company/partners_api.yml
0 → 100644
1 | +name: 企业合伙人列表 | ||
2 | +base_url: ${ENV(base_url)} | ||
3 | +variables: | ||
4 | + currtime: ${make_time()} | ||
5 | + uuid: ${make_uuid()} | ||
6 | + var_access_token: $accessToken | ||
7 | + sign: ${make_sign($currtime, $uuid, $var_access_token)} | ||
8 | + startTime: ${get_January_timestamp()} | ||
9 | + endTime: ${get_Decembe_timestamp()} | ||
10 | + msg: 成功 | ||
11 | +request: | ||
12 | + headers: | ||
13 | + Content-Type: application/json;charset=utf-8 | ||
14 | + User-Agent: okhttp/3.12.3 | ||
15 | + X-MMM-AccessToken: $var_access_token | ||
16 | + X-MMM-AppName: com.mmm.ability | ||
17 | + X-MMM-AppProject: ability | ||
18 | + X-MMM-DeviceType: '1' | ||
19 | + X-MMM-Sign: $sign | ||
20 | + X-MMM-Timestamp: $currtime | ||
21 | + X-MMM-Uuid: $uuid | ||
22 | + X-MMM-Version: 0.4.0 | ||
23 | + json: | ||
24 | + startTime: 0 | ||
25 | + endTime: 0 | ||
26 | + joinWays: | ||
27 | + - type: $type1 | ||
28 | + name: $name1 | ||
29 | + - type: $type2 | ||
30 | + name: $name2 | ||
31 | + - type: $type3 | ||
32 | + name: $name3 | ||
33 | + - type: $type4 | ||
34 | + name: $name4 | ||
35 | + sortBy: 0 | ||
36 | + keyword: '' | ||
37 | + districts: | ||
38 | + pageSize: 20 | ||
39 | + pageIndex: 0 | ||
40 | + method: POST | ||
41 | + url: v2/company/partners | ||
42 | +validate: | ||
43 | + | ||
44 | + - eq: | ||
45 | + - content.msg | ||
46 | + - $msg |
api/app_api/company/statistics_api.yml
0 → 100644
1 | +name: 企业统计 | ||
2 | +base_url: ${ENV(base_url)} | ||
3 | +variables: | ||
4 | + currtime: ${make_time()} | ||
5 | + uuid: ${make_uuid()} | ||
6 | + var_access_token: $accessToken | ||
7 | + sign: ${make_sign($currtime, $uuid, $var_access_token)} | ||
8 | + startTime: ${get_January_timestamp()} | ||
9 | + endTime: ${get_Decembe_timestamp()} | ||
10 | + msg: 成功 | ||
11 | +request: | ||
12 | + headers: | ||
13 | + Content-Type: application/json;charset=utf-8 | ||
14 | + User-Agent: okhttp/3.12.3 | ||
15 | + X-MMM-AccessToken: $var_access_token | ||
16 | + X-MMM-AppName: com.mmm.ability | ||
17 | + X-MMM-AppProject: ability | ||
18 | + X-MMM-DeviceType: '1' | ||
19 | + X-MMM-Sign: $sign | ||
20 | + X-MMM-Timestamp: $currtime | ||
21 | + X-MMM-Uuid: $uuid | ||
22 | + X-MMM-Version: 0.4.0 | ||
23 | + json: | ||
24 | + method: POST | ||
25 | + url: v1/company/statistics | ||
26 | +validate: | ||
27 | + | ||
28 | + - eq: | ||
29 | + - content.msg | ||
30 | + - $msg |
api/app_api/dividend/orders_api.yml
0 → 100644
1 | +name: 分红订单 | ||
2 | +base_url: ${ENV(base_url)} | ||
3 | +variables: | ||
4 | + currtime: ${make_time()} | ||
5 | + uuid: ${make_uuid()} | ||
6 | + var_access_token: $accessToken | ||
7 | + sign: ${make_sign($currtime, $uuid, $var_access_token)} | ||
8 | + startTime: 0 | ||
9 | + endTime: ${get_nowTimestamp_1()} | ||
10 | + partnerId: ${ENV(partnerId_app)} | ||
11 | + ###明细类型 | ||
12 | + detailAction: ${convert_to_int($detailAction)} | ||
13 | + msg: 成功 | ||
14 | +request: | ||
15 | + headers: | ||
16 | + Content-Type: application/json;charset=utf-8 | ||
17 | + User-Agent: okhttp/3.12.3 | ||
18 | + X-MMM-AccessToken: $var_access_token | ||
19 | + X-MMM-AppName: com.mmm.ability | ||
20 | + X-MMM-AppProject: ability | ||
21 | + X-MMM-DeviceType: '1' | ||
22 | + X-MMM-Sign: $sign | ||
23 | + X-MMM-Timestamp: $currtime | ||
24 | + X-MMM-Uuid: $uuid | ||
25 | + X-MMM-Version: 0.4.0 | ||
26 | + json: | ||
27 | + startTime: $startTime | ||
28 | + endTime: $endTime | ||
29 | + detailAction: $detailAction | ||
30 | + joinWays: $joinWays | ||
31 | + pageIndex: 0 | ||
32 | + pageSize: 100 | ||
33 | + partnerId: ${convert_to_int($partnerId)} | ||
34 | + method: POST | ||
35 | + url: v1/dividend/orders | ||
36 | +validate: | ||
37 | + - eq: | ||
38 | + - content.msg | ||
39 | + - $msg |
api/app_api/login/auth_accessToken_api.yml
0 → 100644
1 | +name: 获取授权令牌accessToken | ||
2 | +base_url: ${ENV(base_url)} | ||
3 | +variables: | ||
4 | + currtime: ${make_time()} | ||
5 | + uuid: ${make_uuid()} | ||
6 | + access_token: '' | ||
7 | + sign: ${make_sign($currtime, $uuid, $access_token)} | ||
8 | + clientId: pdf233Znkjo | ||
9 | + clientSecret: oHexnmeomYdo19NCmdwne83dfj | ||
10 | +request: | ||
11 | + headers: | ||
12 | + Content-Type: application/json;charset=utf-8 | ||
13 | + User-Agent: okhttp/3.12.3 | ||
14 | + X-MMM-AccessToken: $access_token | ||
15 | + X-MMM-AppName: com.mmm.ability | ||
16 | + X-MMM-AppProject: ability | ||
17 | + X-MMM-DeviceType: '1' | ||
18 | + X-MMM-Sign: $sign | ||
19 | + X-MMM-Timestamp: $currtime | ||
20 | + X-MMM-Uuid: $uuid | ||
21 | + X-MMM-Version: 0.4.0 | ||
22 | + json: | ||
23 | + clientSecret: $clientSecret | ||
24 | + authCode: $authCode | ||
25 | + clientId: $clientId | ||
26 | + method: POST | ||
27 | + url: v1/auth/accessToken |
api/app_api/login/auth_companys_api.yml
0 → 100644
1 | +name: 获取统一用户中心公司 | ||
2 | +base_url: ${ENV(base_url)} | ||
3 | +variables: | ||
4 | + currtime: ${make_time()} | ||
5 | + uuid: ${make_uuid()} | ||
6 | + access_token: '' | ||
7 | + sign: ${make_sign($currtime, $uuid, $access_token)} | ||
8 | + clientId: pdf233Znkjo | ||
9 | +request: | ||
10 | + headers: | ||
11 | + Content-Type: application/json;charset=utf-8 | ||
12 | + User-Agent: okhttp/3.12.3 | ||
13 | + X-MMM-AccessToken: $access_token | ||
14 | + X-MMM-AppName: com.mmm.ability | ||
15 | + X-MMM-AppProject: ability | ||
16 | + X-MMM-DeviceType: '1' | ||
17 | + X-MMM-Sign: $sign | ||
18 | + X-MMM-Timestamp: $currtime | ||
19 | + X-MMM-Uuid: $uuid | ||
20 | + X-MMM-Version: 0.4.0 | ||
21 | + json: | ||
22 | + credentials: $credentials | ||
23 | + clientId: $clientId | ||
24 | + method: POST | ||
25 | + url: v1/auth/companys |
api/app_api/login/auth_login_api.yml
0 → 100644
1 | +name: 账号登录 | ||
2 | +base_url: ${ENV(base_url)} | ||
3 | +variables: | ||
4 | + currtime: ${make_time()} | ||
5 | + uuid: ${make_uuid()} | ||
6 | + access_token: '' | ||
7 | + cid: ${ENV(companyId_app)} | ||
8 | + sign: ${make_sign($currtime, $uuid, $access_token)} | ||
9 | + clientId: pdf233Znkjo | ||
10 | +request: | ||
11 | + headers: | ||
12 | + Content-Type: application/json;charset=utf-8 | ||
13 | + User-Agent: okhttp/3.12.3 | ||
14 | + X-MMM-AccessToken: $access_token | ||
15 | + X-MMM-AppName: com.mmm.ability | ||
16 | + X-MMM-AppProject: ability | ||
17 | + X-MMM-DeviceType: '1' | ||
18 | + X-MMM-Sign: $sign | ||
19 | + X-MMM-Timestamp: $currtime | ||
20 | + X-MMM-Uuid: $uuid | ||
21 | + X-MMM-Version: 0.4.0 | ||
22 | + json: | ||
23 | + idType: $idType | ||
24 | + cid: ${convert_to_int($cid)} | ||
25 | + credentials: $credentials | ||
26 | + clientId: $clientId | ||
27 | + method: POST | ||
28 | + url: v2/auth/login |
1 | +name: 实际订单列表excel导入 | ||
2 | +base_url: ${ENV(base_manager_url)} | ||
3 | +variables: | ||
4 | + | ||
5 | +teardown_hooks: | ||
6 | + - ${sleep(2)} | ||
7 | +request: | ||
8 | + headers: | ||
9 | + Content-Type: application/json;charset=utf-8 | ||
10 | + User-Agent: okhttp/3.12.3 | ||
11 | + Authorization: Bearer ${get_m_accesstoken()} | ||
12 | + upload: | ||
13 | + where: | ||
14 | + file: | ||
15 | + method: POST | ||
16 | + url: /v1/order/actual/import/excel | ||
17 | +validate: | ||
18 | + - eq: | ||
19 | + - content.msg | ||
20 | + - ok |
1 | +name: 实际订单列表excel导入 | ||
2 | +base_url: ${ENV(base_manager_url)} | ||
3 | +variables: | ||
4 | + type: 'PARTNER_ORDER_FILE' | ||
5 | +teardown_hooks: | ||
6 | + - ${sleep(2)} | ||
7 | +request: | ||
8 | + headers: | ||
9 | + User-Agent: okhttp/3.12.3 | ||
10 | + Authorization: Bearer ${get_m_accesstoken()} | ||
11 | + upload: | ||
12 | + file: ${get_file()} | ||
13 | + type: $type | ||
14 | + method: POST | ||
15 | + url: /v1/order/fileImport | ||
16 | +validate: | ||
17 | + - eq: | ||
18 | + - content.msg | ||
19 | + - ok |
1 | +name: 登录公司 | ||
2 | +base_url: ${ENV(base_business_url)} | ||
3 | +verify: False | ||
4 | +teardown_hooks: | ||
5 | + - ${teardown_hook_get_access_token($response)} | ||
6 | +request: | ||
7 | + headers: | ||
8 | + Content-Type: application/json; charset=UTF-8 | ||
9 | + Authorization: Bearer ${get_Authorization()} | ||
10 | + Origin: https://enterprise-platform-dev.fjmaimaimai.com | ||
11 | + Referer: https://enterprise-platform-dev.fjmaimaimai.com/ | ||
12 | + 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 | ||
13 | + X-Requested-With: XMLHttpRequest | ||
14 | + json: | ||
15 | + companyId: $companyId | ||
16 | + method: POST | ||
17 | + url: auth/anonymousLogin | ||
18 | +validate: | ||
19 | +- eq: | ||
20 | + - content.code | ||
21 | + - 0 | ||
22 | +- eq: | ||
23 | + - content.msg | ||
24 | + - ok |
1 | +name: 登录列表 | ||
2 | +base_url: ${ENV(base_business_url)} | ||
3 | +verify: False | ||
4 | +teardown_hooks: | ||
5 | + - ${teardown_hook_get_login_code($response)} | ||
6 | +request: | ||
7 | + headers: | ||
8 | + Content-Type: application/json; charset=UTF-8 | ||
9 | + Authorization: Bearer ${get_access_token()} | ||
10 | + Origin: https://enterprise-platform-dev.fjmaimaimai.com | ||
11 | + Referer: https://enterprise-platform-dev.fjmaimaimai.com/ | ||
12 | + 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 | ||
13 | + X-Requested-With: XMLHttpRequest | ||
14 | + json: | ||
15 | + method: POST | ||
16 | + url: auth/getSingleLoginMenus | ||
17 | +validate: | ||
18 | +- eq: | ||
19 | + - content.code | ||
20 | + - 0 | ||
21 | +- eq: | ||
22 | + - content.msg | ||
23 | + - ok |
api/m_api/login_api/auth/login_api.yml
0 → 100644
1 | +name: 登录价值系统 | ||
2 | +base_url: ${ENV(base_worth_url)} | ||
3 | +verify: False | ||
4 | +variables: | ||
5 | + msg: ok | ||
6 | +teardown_hooks: | ||
7 | + - ${teardown_hook_get_task_Authorization($response)} | ||
8 | + | ||
9 | +request: | ||
10 | + headers: | ||
11 | +# Authorization: Bearer ${get_access_token()} | ||
12 | + Content-Type: application/json; charset=UTF-8 | ||
13 | + Origin: https://enterprise-platform-dev.fjmaimaimai.com | ||
14 | + Referer: https://enterprise-platform-dev.fjmaimaimai.com/ | ||
15 | + 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 | ||
16 | + X-Requested-With: XMLHttpRequest | ||
17 | + json: | ||
18 | + code: ${get_login_code()} | ||
19 | + method: POST | ||
20 | + url: auth/login | ||
21 | +validate: | ||
22 | +- eq: | ||
23 | + - content.msg | ||
24 | + - $msg |
api/m_api/login_api/auth/pwdLogin_api.yml
0 → 100644
1 | +name: 企业平台账号登录 | ||
2 | +base_url: ${ENV(base_business_url)} | ||
3 | +verify: False | ||
4 | +variables: | ||
5 | +# username: ${ENV(wpftwphone)} | ||
6 | + password: 7c4a8d09ca3762af61e59520943dc26494f8941b | ||
7 | +teardown_hooks: | ||
8 | + - ${teardown_hook_get_Authorization($response)} | ||
9 | + | ||
10 | +request: | ||
11 | + headers: | ||
12 | + Content-Type: application/json; charset=UTF-8 | ||
13 | + Origin: https://enterprise-platform-dev.fjmaimaimai.com | ||
14 | + Referer: https://enterprise-platform-dev.fjmaimaimai.com/ | ||
15 | + 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 | ||
16 | + X-Requested-With: XMLHttpRequest | ||
17 | + json: | ||
18 | + password: $password | ||
19 | + username: $username | ||
20 | + method: POST | ||
21 | + url: auth/pwdLogin | ||
22 | +validate: | ||
23 | +- eq: | ||
24 | + - content.msg | ||
25 | + - ok |
1 | +name: 用户的公司列表 | ||
2 | +base_url: ${ENV(base_business_url)} | ||
3 | +verify: False | ||
4 | + | ||
5 | +request: | ||
6 | + headers: | ||
7 | + Content-Type: application/json; charset=UTF-8 | ||
8 | + Authorization: Bearer ${get_Authorization()} | ||
9 | + Origin: https://enterprise-platform-dev.fjmaimaimai.com | ||
10 | + Referer: https://enterprise-platform-dev.fjmaimaimai.com/ | ||
11 | + 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 | ||
12 | + X-Requested-With: XMLHttpRequest | ||
13 | + json: | ||
14 | + method: POST | ||
15 | + url: companies/userCompamies | ||
16 | +validate: | ||
17 | +- eq: | ||
18 | + - content.code | ||
19 | + - 0 | ||
20 | +- eq: | ||
21 | + - content.msg | ||
22 | + - ok | ||
23 | + |
config/id.csv
0 → 100644
config/订单数据模板.xlsx
0 → 100644
不能预览此文件类型
helpfunc/__pycache__/cal_func.cpython-38.pyc
0 → 100644
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
helpfunc/statistics_func.py
0 → 100644
1 | +# -*- coding:utf-8 -*- | ||
2 | +#@Time : 2021/2/5 10:32 | ||
3 | +#@File : statistics_func.py | ||
4 | +#@Auth : bianxinhua | ||
5 | +from datetime import date, timedelta | ||
6 | +import datetime | ||
7 | + | ||
8 | +###获取季度 | ||
9 | +def quarters1() : | ||
10 | + today = datetime.date.today() | ||
11 | + quarter = (today.month-1) // 3 | ||
12 | + return quarter | ||
13 | + | ||
14 | +def get_quarters(key,*args_v): | ||
15 | + quarters = args_v[0][quarters1() - 1][key] | ||
16 | + return quarters | ||
17 | + | ||
18 | +def get_statistics(*args_v): | ||
19 | + value = [] | ||
20 | + statistics = [] | ||
21 | + for i in range(len(args_v)-1): | ||
22 | + value.append(args_v[i]) | ||
23 | + for v in value: | ||
24 | + statistics.append(args_v[-1][v]) | ||
25 | + return sum(statistics) | ||
26 | +#统计应收/已收/未收 | ||
27 | + | ||
28 | +def statistics_func(keys,*args_v): | ||
29 | + # print("====================args_v===============================") | ||
30 | + # print(args_v) | ||
31 | + value = [] | ||
32 | + num = 0 | ||
33 | + for i in range(len(args_v)): | ||
34 | + if args_v[i] == []: | ||
35 | + value.append(0) | ||
36 | + else: | ||
37 | + for j in range(len(args_v[i])): | ||
38 | + value.append((args_v[i][j][keys])) | ||
39 | + for v in value: | ||
40 | + if type(v) == str: | ||
41 | + v = float(v) | ||
42 | + num = num + v | ||
43 | + # print("===========================================================") | ||
44 | + # print('num=',num) | ||
45 | + return num | ||
46 | + | ||
47 | +#统计订单金额 | ||
48 | +def statistics_actual_func(keys,*args_v): | ||
49 | + # print("====================args_v===============================") | ||
50 | + # print(args_v) | ||
51 | + value = [] | ||
52 | + for i in range(len(args_v)): | ||
53 | + for j in range(len(args_v[i])): | ||
54 | + if args_v[i][j]['partnerCategory'] == keys: | ||
55 | + value.append(args_v[i][j]['orderPrice']) | ||
56 | + # print("===========================================================") | ||
57 | + # print('value=',value) | ||
58 | + return sum(value) | ||
59 | + | ||
60 | +#统计个数 | ||
61 | +def statistics_num_func(keys,*args_v): | ||
62 | + value = [] | ||
63 | + num = 0 | ||
64 | + for i in range(len(args_v)): | ||
65 | + for j in range(len(args_v[i])): | ||
66 | + value.append(args_v[i][j][keys]) | ||
67 | + for v in range(len(value)): | ||
68 | + if float(value[v]) > 0 : | ||
69 | + num = num +1 | ||
70 | + # print(num) | ||
71 | + return num | ||
72 | + |
sendmsg_app_test.py
0 → 100644
1 | +# -*- coding:utf-8 -*- | ||
2 | +# @Time :2019/12/4 9:37 | ||
3 | +# @Author :dengyuting | ||
4 | +# @File :sendmsg.py | ||
5 | +import os | ||
6 | +import json | ||
7 | + | ||
8 | +import requests | ||
9 | + | ||
10 | +JENKINS_URL = str(os.getenv("JENKINS_URL")) | ||
11 | +BUILD_NUMBER = str(os.getenv("BUILD_NUMBER")) | ||
12 | +JOB_NAME = str(os.getenv("JOB_NAME")) | ||
13 | +CAUSE = str(os.getenv("CAUSE")) | ||
14 | +BUILD_URL = str(os.getenv("BUILD_URL")) | ||
15 | +JOB_URL = str(os.getenv("JOB_URL")) | ||
16 | + | ||
17 | +path = os.path.dirname(__file__) | ||
18 | +summary_file = os.path.join(path, 'logs','testsuites','partner_app_testsuite.summary.json') | ||
19 | + | ||
20 | +def getresult(): | ||
21 | + try: | ||
22 | + with open(summary_file, 'r', encoding='UTF-8') as f: | ||
23 | + f = f.read() | ||
24 | + jsonfile = json.loads(f) | ||
25 | + if jsonfile["success"] == True: | ||
26 | + result = "SUCCESS" | ||
27 | + else: | ||
28 | + result = "FAIL" | ||
29 | + total = jsonfile["stat"]["testcases"]["total"] | ||
30 | + success = jsonfile["stat"]["testcases"]["success"] | ||
31 | + fail = jsonfile["stat"]["testcases"]["fail"] | ||
32 | + duration = round(jsonfile["time"]["duration"]) | ||
33 | + # teststeps_total = jsonfile["stat"]["teststeps"]["total"] | ||
34 | + # teststeps_successes = jsonfile["stat"]["teststeps"]["successes"] | ||
35 | + # teststeps_failures = jsonfile["stat"]["teststeps"]["failures"] | ||
36 | + # teststeps_errors = jsonfile["stat"]["teststeps"]["errors"] | ||
37 | + # teststeps_skipped = jsonfile["stat"]["teststeps"]["skipped"] | ||
38 | + return result, total, success, fail, duration | ||
39 | + except Exception as err: | ||
40 | + print("this is err:{}" .format(err)) | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | +def sendinfo(): | ||
45 | + r =getresult() | ||
46 | + data = {} | ||
47 | + data['msgtype'] = 'text' | ||
48 | + data['text'] = {} | ||
49 | + data['text']['content'] = '天联共创项目【mmm_partner_api_test】:' \ | ||
50 | + '\n测试结果:'+r[0]+ \ | ||
51 | + '\n执行时间:' +str(r[4])+ \ | ||
52 | + 's\n共执行测试用例:' +str(r[1]) +'\nSUCCESS:' +str(r[2])+ '\nFAIL:' +str(r[3])+ \ | ||
53 | + '\n测试报告地址:http://jenkins.fjmaimaimai.com/view/test/job/mmm_partner_api_test/HTML_20Report/' | ||
54 | + # data['text']['mentioned_mobile_list'] = ["13559112969","@all"] | ||
55 | + # data['text']['content'] = '【opp_api】测试执行结果:' + r[0] + \ | ||
56 | + # '\n 执行时间:' + str(r[4]) + \ | ||
57 | + # 's\n TOTAL:' + str(r[1]) + '\n SUCCESS:' + str(r[2]) + '\n FAIL:' + str(r[3]) | ||
58 | + | ||
59 | + url = 'https://oapi.dingtalk.com/robot/send?access_token=157a80f4a09380f1338a182de1e120b42ba2d07cd6b729b288543e4fd3f6d160' | ||
60 | + headers = {'Content-Type': 'application/json'} | ||
61 | + | ||
62 | + requests.post(url, json=data, headers=headers) | ||
63 | + | ||
64 | +if __name__ == '__main__': | ||
65 | + sendinfo() | ||
66 | + | ||
67 | + |
1 | +config: | ||
2 | + name: APP游客登录 | ||
3 | + base_url: ${ENV(base_url)} | ||
4 | + variables: | ||
5 | + phone: ${ENV(visitorphone)} | ||
6 | + id: ${ENV(id)} | ||
7 | + msg: '成功' | ||
8 | +# | ||
9 | +teststeps: | ||
10 | + | ||
11 | +- name: APP单个合伙人登录 | ||
12 | + api: api/app_api/login/auth_centerCompanys_api.yml | ||
13 | + validate: | ||
14 | + - eq: | ||
15 | + - content.data.center.partner.companys.0.id | ||
16 | + - ${convert_to_int($id)} | ||
17 | + - length_equals: | ||
18 | + - content.data.center.manager.companys | ||
19 | + - 0 | ||
20 | + | ||
21 | + |
1 | +config: | ||
2 | + name: APP高管登录 | ||
3 | + base_url: ${ENV(base_url)} | ||
4 | + variables: | ||
5 | + phone: ${ENV(managerphone)} | ||
6 | + id: ${ENV(companyId_app)} | ||
7 | + msg: '成功' | ||
8 | +# | ||
9 | +teststeps: | ||
10 | + | ||
11 | +- name: APP高管登录 | ||
12 | + api: api/app_api/login/auth_centerCompanys_api.yml | ||
13 | + validate: | ||
14 | + - length_equals: | ||
15 | + - content.data.center.partner.companys | ||
16 | + - 0 | ||
17 | + - eq: | ||
18 | + - content.data.center.manager.companys.0.id | ||
19 | + - ${convert_to_int($id)} |
1 | +config: | ||
2 | + name: APP合伙人登录,提示"当前账号已被禁用" | ||
3 | + base_url: ${ENV(base_url)} | ||
4 | + variables: | ||
5 | + phone: ${ENV(visitorphone)} | ||
6 | + id: ${ENV(id)} | ||
7 | + msg: '当前账号已被禁用' | ||
8 | +# | ||
9 | +teststeps: | ||
10 | + | ||
11 | +- name: APP合伙人登录 | ||
12 | + api: api/app_api/login/auth_centerCompanys_api.yml | ||
13 | + extract: | ||
14 | + credentials: content.data.center.credentials | ||
15 | + validate: | ||
16 | + - eq: | ||
17 | + - content.data.center.partner.companys.0.id | ||
18 | + - ${convert_to_int($id)} | ||
19 | + - length_equals: | ||
20 | + - content.data.center.manager.companys | ||
21 | + - 0 | ||
22 | + - eq: | ||
23 | + - content.msg | ||
24 | + - 成功 | ||
25 | + | ||
26 | +- name: APP高管账号登录,提示"当前账号已被禁用" | ||
27 | + variables: | ||
28 | + ####身份类型 1:合伙人 2:高管 | ||
29 | + idType: ${convert_to_int(2)} | ||
30 | + api: api/app_api/login/auth_login_api.yml | ||
31 | + extract: | ||
32 | + authCode: content.data.authCode | ||
33 | + validate: | ||
34 | + - eq: | ||
35 | + - content.msg | ||
36 | + - $msg |
1 | +config: | ||
2 | + name: APP多公司高管登录 | ||
3 | + base_url: ${ENV(base_url)} | ||
4 | + variables: | ||
5 | + phone: ${ENV(adminphone_app)} | ||
6 | + id: ${ENV(companyId_app)} | ||
7 | + msg: '成功' | ||
8 | +# | ||
9 | +teststeps: | ||
10 | + | ||
11 | +- name: APP多公司高管登录 | ||
12 | + api: api/app_api/login/auth_centerCompanys_api.yml | ||
13 | + validate: | ||
14 | + - length_equals: | ||
15 | + - content.data.center.partner.companys | ||
16 | + - 3 | ||
17 | + - length_equals: | ||
18 | + - content.data.center.manager | ||
19 | + - 3 |
testcases/app/common/app_login_testcases.yml
0 → 100644
1 | +config: | ||
2 | + name: APP登录用例 | ||
3 | + base_url: ${ENV(base_url)} | ||
4 | + variables: | ||
5 | + phone: ${ENV(adminphone_app)} | ||
6 | + msg: '成功' | ||
7 | + output: | ||
8 | + - accessToken | ||
9 | +teststeps: | ||
10 | + | ||
11 | +- name: $phone 登录系统 | ||
12 | + api: api/app_api/login/auth_centerCompanys_api.yml | ||
13 | + extract: | ||
14 | + credentials: content.data.center.credentials | ||
15 | + validate: | ||
16 | + - eq: | ||
17 | + - content.msg | ||
18 | + - 成功 | ||
19 | + | ||
20 | +- name: $phone 账号登录 | ||
21 | + api: api/app_api/login/auth_login_api.yml | ||
22 | + extract: | ||
23 | + authCode: content.data.authCode | ||
24 | + validate: | ||
25 | + - eq: | ||
26 | + - content.msg | ||
27 | + - 成功 | ||
28 | +# | ||
29 | +- name: $phone 获取授权令牌accessToken | ||
30 | + api: api/app_api/login/auth_accessToken_api.yml | ||
31 | + extract: | ||
32 | + accessToken: content.data.accessToken | ||
33 | + validate: | ||
34 | + - eq: | ||
35 | + - content.msg | ||
36 | + - 成功 |
1 | +config: | ||
2 | + name: COMP001-企业统计值正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + | ||
5 | + | ||
6 | +teststeps: | ||
7 | + | ||
8 | +- name: $phone 登录天联共创app端系统 | ||
9 | + ####身份类型 1:合伙人 2:高管 | ||
10 | + variables: | ||
11 | + idType: ${convert_to_int(2)} | ||
12 | + testcase: testcases/app/common/app_login_testcases.yml | ||
13 | + output: | ||
14 | + - accessToken | ||
15 | + | ||
16 | +- name: 查看企业统计 | ||
17 | + api: api/app_api/company/statistics_api.yml | ||
18 | + | ||
19 | + extract: | ||
20 | + quarters: content.data.statistics | ||
21 | + totalCount: content.data.statistics.totalCount | ||
22 | + output: | ||
23 | + - totalCount | ||
24 | + - quarters | ||
25 | + validate: | ||
26 | + ####合伙人支出 | ||
27 | + - eq: | ||
28 | + - ${get_statistics(careerDividend,businessDividend,developDividend,appDividend,$quarters)} | ||
29 | + - 2136 | ||
30 | + ####订单金额 | ||
31 | + - eq: | ||
32 | + - ${get_statistics(careerOrdersMoney,businessOrdersMoney,developOrdersMoney,appOrdersMoney,$quarters)} | ||
33 | + - 25500 | ||
34 | + | ||
35 | +- name: 查看企业合伙人列表 | ||
36 | + variables: | ||
37 | + type1: 1 | ||
38 | + name1: '事业合伙' | ||
39 | + type2: 2 | ||
40 | + name2: '业务合伙' | ||
41 | + type3: 3 | ||
42 | + name3: '研发合伙' | ||
43 | + type4: 4 | ||
44 | + name4: '业务-产品应用合伙' | ||
45 | + api: api/app_api/company/partners_api.yml | ||
46 | + validate: | ||
47 | +# ###合伙人数 | ||
48 | + - length_equals: | ||
49 | + - content.data.partners | ||
50 | + - $totalCount |
1 | +config: | ||
2 | + name: COMP001-按照类型过滤,查看合伙人列表,数据正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + | ||
5 | + | ||
6 | +teststeps: | ||
7 | + | ||
8 | +- name: $phone 登录天联共创app端系统 | ||
9 | + ####身份类型 1:合伙人 2:高管 | ||
10 | + variables: | ||
11 | + idType: ${convert_to_int(2)} | ||
12 | + testcase: testcases/app/common/app_login_testcases.yml | ||
13 | + output: | ||
14 | + - accessToken | ||
15 | + | ||
16 | +- name: 查看企业统计 | ||
17 | + api: api/app_api/company/statistics_api.yml | ||
18 | + extract: | ||
19 | + ###事业合伙人数 | ||
20 | + careerCount: content.data.statistics.careerCount | ||
21 | + output: | ||
22 | + - careerCount | ||
23 | + | ||
24 | +- name: 查看企业合伙人列表 | ||
25 | + variables: | ||
26 | + type1: 1 | ||
27 | + name1: '事业合伙' | ||
28 | + type2: 21 | ||
29 | + name2: '业务合伙1' | ||
30 | + type3: 31 | ||
31 | + name3: '研发合伙1' | ||
32 | + type4: 41 | ||
33 | + name4: '业务-产品应用合伙1' | ||
34 | + api: api/app_api/company/partners_api.yml | ||
35 | + validate: | ||
36 | +# ###合伙人数 | ||
37 | + - length_equals: | ||
38 | + - content.data.partners | ||
39 | + - $careerCount |
1 | +config: | ||
2 | + name: DIVI001-事业-初始状态-统计值正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | +# variables: | ||
5 | +# partnerCategoryId: 1 | ||
6 | +# orderType: 1 | ||
7 | + | ||
8 | + | ||
9 | +teststeps: | ||
10 | +- name: 登录天联共创管理后台系统-分红列表-数据源来自于实发订单(业务合伙) | ||
11 | + testcase: testcases/dividends/DIV001_app_dividendslist_testcases.yml | ||
12 | + | ||
13 | +- name: 登录天联共创管理后台系统-分红管理-初始状态-各个值计算正确 | ||
14 | + testcase: testcases/dividends/DIV003_1_app_dividends_cal_testcases.yml | ||
15 | +# | ||
16 | +- name: 查看实际订单列表 | ||
17 | + api: api/m_api/actual/m_order_actual_list_api.yml | ||
18 | + extract: | ||
19 | + #事业合伙 | ||
20 | + career_actual_list: content.data.gridResult.lists | ||
21 | + career_partnerCategory: content.data.gridResult.lists.0.partnerCategory | ||
22 | + output: | ||
23 | + - career_actual_list | ||
24 | + - career_partnerCategory | ||
25 | +# | ||
26 | +- name: 查看事业分红列表 | ||
27 | + variables: | ||
28 | + partnerCategoryId: 1 | ||
29 | + orderType: 1 | ||
30 | + createTime: [] | ||
31 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
32 | + extract: | ||
33 | + #事业合伙 | ||
34 | + career_lists: content.data.gridResult.lists | ||
35 | + career_totalRow: content.data.gridResult.totalRow | ||
36 | + output: | ||
37 | + - career_lists | ||
38 | + - career_totalRow | ||
39 | +# | ||
40 | +- name: 查看业务分红列表 | ||
41 | + variables: | ||
42 | + partnerCategoryId: 2 | ||
43 | + orderType: null | ||
44 | + createTime: [] | ||
45 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
46 | + extract: | ||
47 | + #业务合伙 | ||
48 | + business_lists: content.data.gridResult.lists | ||
49 | + output: | ||
50 | + - business_lists | ||
51 | +# | ||
52 | +- name: 查看研发分红列表 | ||
53 | + variables: | ||
54 | + partnerCategoryId: 3 | ||
55 | + orderType: null | ||
56 | + createTime: [] | ||
57 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
58 | + extract: | ||
59 | + #研发合伙 | ||
60 | + develop_lists: content.data.gridResult.lists | ||
61 | + output: | ||
62 | + - develop_lists | ||
63 | +# | ||
64 | +- name: 查看业务-产品应用分红列表 | ||
65 | + variables: | ||
66 | + partnerCategoryId: 4 | ||
67 | + orderType: null | ||
68 | + createTime: [] | ||
69 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
70 | + extract: | ||
71 | + #业务-产品应用合伙 | ||
72 | + applicationOrders_lists: content.data.gridResult.lists | ||
73 | + output: | ||
74 | + - applicationOrders_lists | ||
75 | + | ||
76 | +- name: 登录天联共创app端系统 | ||
77 | + ####身份类型 1:合伙人 2:高管 | ||
78 | + variables: | ||
79 | + idType: ${convert_to_int(1)} | ||
80 | + testcase: testcases/app/common/app_login_testcases.yml | ||
81 | + output: | ||
82 | + - accessToken | ||
83 | +# | ||
84 | +- name: 查看分红统计 | ||
85 | + api: api/app_api/dividend/statistics_api.yml | ||
86 | + extract: | ||
87 | + quarters: content.data.statistics.quarters | ||
88 | + output: | ||
89 | + - quarters | ||
90 | + validate: | ||
91 | + #####累计所有年份应收分红 | ||
92 | + - eq: | ||
93 | + - content.data.statistics.receivable | ||
94 | + - ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
95 | + ####累计所有年份已收分红 | ||
96 | + - eq: | ||
97 | + - content.data.statistics.received | ||
98 | + - ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
99 | + ####累计所有年份未收分红 | ||
100 | + - eq: | ||
101 | + - content.data.statistics.outstanding | ||
102 | + - ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
103 | + ####季度已收分红 | ||
104 | + - eq: | ||
105 | + - ${get_quarters(received,$quarters)} | ||
106 | + - ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
107 | + ####季度应收分红 | ||
108 | + - eq: | ||
109 | + - ${get_quarters(receivable,$quarters)} | ||
110 | + - ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
111 | + ####季度未收分红 | ||
112 | + - eq: | ||
113 | + - ${get_quarters(outstanding,$quarters)} | ||
114 | + - ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
115 | + | ||
116 | +- name: 查看订单统计 | ||
117 | + api: api/app_api/order/statistics_api.yml | ||
118 | + validate: | ||
119 | +# ###今日新增实发订单 | ||
120 | + - eq: | ||
121 | + - content.data.career.todayRealQuantity | ||
122 | + - $career_totalRow | ||
123 | +# ####今日新增实发订单金额 | ||
124 | + - eq: | ||
125 | + - content.data.career.todayRealMoney | ||
126 | + - ${statistics_actual_func($career_partnerCategory,$career_actual_list)} | ||
127 | +# ###累计实发订单 | ||
128 | + - eq: | ||
129 | + - content.data.career.cumulativeQuantity | ||
130 | + - $career_totalRow | ||
131 | + ###累计实发订单金额 | ||
132 | + - eq: | ||
133 | + - content.data.career.cumulativeMoney | ||
134 | + - ${statistics_actual_func($career_partnerCategory,$career_actual_list)} |
1 | +config: | ||
2 | + name: DIVI002-事业-调整数量-更改支付状态-统计值正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + | ||
5 | + | ||
6 | +teststeps: | ||
7 | +- name: 登录天联共创管理后台系统-分红管理-调整数量由100改为50-各个值计算正确 | ||
8 | + testcase: testcases/dividends/DIV004_1_app_dividends_editnum_testcases.yml | ||
9 | + | ||
10 | +- name: 登录天联共创管理后台系统-分红管理-产品1支付分红成功,数据正确 | ||
11 | + testcase: testcases/dividends/DIV007_app_dividends_payDividends_testcases.yml | ||
12 | + | ||
13 | +- name: 登录天联共创管理后台系统--分红管理-产品1支付分红成功后,调整数量由100改为50,数据正确 | ||
14 | + testcase: testcases/dividends/DIV008_app_dividends_payDividends_editnum_testcases.yml | ||
15 | + | ||
16 | +- name: 登录天联共创管理后台系统--分红管理-批量支付分红成功,数据正确 | ||
17 | + testcase: testcases/dividends/DIV010_app_dividends_payDividends_batch_testcases.yml | ||
18 | + | ||
19 | +- name: 查看实际订单列表 | ||
20 | + api: api/m_api/actual/m_order_actual_list_api.yml | ||
21 | + extract: | ||
22 | + #事业合伙 | ||
23 | + career_actual_list: content.data.gridResult.lists | ||
24 | + career_partnerCategory: content.data.gridResult.lists.0.partnerCategory | ||
25 | + output: | ||
26 | + - career_actual_list | ||
27 | + - career_partnerCategory | ||
28 | + | ||
29 | +- name: 查看事业分红列表 | ||
30 | + variables: | ||
31 | + partnerCategoryId: 1 | ||
32 | + orderType: 1 | ||
33 | + createTime: [] | ||
34 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
35 | + extract: | ||
36 | + #事业合伙 | ||
37 | + career_lists: content.data.gridResult.lists | ||
38 | + career_totalRow: content.data.gridResult.totalRow | ||
39 | + output: | ||
40 | + - career_lists | ||
41 | + - career_totalRow | ||
42 | + | ||
43 | +- name: 查看业务分红列表 | ||
44 | + variables: | ||
45 | + partnerCategoryId: 2 | ||
46 | + orderType: null | ||
47 | + createTime: [] | ||
48 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
49 | + extract: | ||
50 | + #业务合伙 | ||
51 | + business_lists: content.data.gridResult.lists | ||
52 | + output: | ||
53 | + - business_lists | ||
54 | +# | ||
55 | +- name: 查看研发分红列表 | ||
56 | + variables: | ||
57 | + partnerCategoryId: 3 | ||
58 | + orderType: null | ||
59 | + createTime: [] | ||
60 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
61 | + extract: | ||
62 | + #研发合伙 | ||
63 | + develop_lists: content.data.gridResult.lists | ||
64 | + output: | ||
65 | + - develop_lists | ||
66 | +# | ||
67 | +- name: 查看业务-产品应用分红列表 | ||
68 | + variables: | ||
69 | + partnerCategoryId: 4 | ||
70 | + orderType: null | ||
71 | + createTime: [] | ||
72 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
73 | + extract: | ||
74 | + #业务-产品应用合伙 | ||
75 | + applicationOrders_lists: content.data.gridResult.lists | ||
76 | + output: | ||
77 | + - applicationOrders_lists | ||
78 | + | ||
79 | +- name: 登录天联共创app端系统 | ||
80 | + ####身份类型 1:合伙人 2:高管 | ||
81 | + variables: | ||
82 | + idType: ${convert_to_int(1)} | ||
83 | + testcase: testcases/app/common/app_login_testcases.yml | ||
84 | + output: | ||
85 | + - accessToken | ||
86 | + | ||
87 | +- name: 查看分红统计 | ||
88 | + api: api/app_api/dividend/statistics_api.yml | ||
89 | + extract: | ||
90 | + quarters: content.data.statistics.quarters | ||
91 | + output: | ||
92 | + - quarters | ||
93 | + validate: | ||
94 | + #####累计所有年份应收分红 | ||
95 | + - eq: | ||
96 | + - content.data.statistics.receivable | ||
97 | + - ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
98 | +### ####累计所有年份已收分红 | ||
99 | + - eq: | ||
100 | + - content.data.statistics.received | ||
101 | + - ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
102 | +# ####累计所有年份未收分红 | ||
103 | + - eq: | ||
104 | + - content.data.statistics.outstanding | ||
105 | + - ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
106 | +## ####季度已收分红 | ||
107 | + - eq: | ||
108 | + - ${get_quarters(received,$quarters)} | ||
109 | + - ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
110 | +# ####季度应收分红 | ||
111 | + - eq: | ||
112 | + - ${get_quarters(receivable,$quarters)} | ||
113 | + - ${statistics_func(dividendsReceivable,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
114 | +# ####季度未收分红 | ||
115 | + - eq: | ||
116 | + - ${get_quarters(outstanding,$quarters)} | ||
117 | + - ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
118 | +# | ||
119 | +- name: 查看订单统计 | ||
120 | + api: api/app_api/order/statistics_api.yml | ||
121 | + validate: | ||
122 | +# ###今日新增实发订单 | ||
123 | + - eq: | ||
124 | + - content.data.career.todayRealQuantity | ||
125 | + - $career_totalRow | ||
126 | +# ####今日新增实发订单金额 | ||
127 | + - eq: | ||
128 | + - content.data.career.todayRealMoney | ||
129 | + - ${statistics_actual_func($career_partnerCategory,$career_actual_list)} | ||
130 | +# ###累计实发订单 | ||
131 | + - eq: | ||
132 | + - content.data.career.cumulativeQuantity | ||
133 | + - $career_totalRow | ||
134 | + ###累计实发订单金额 | ||
135 | + - eq: | ||
136 | + - content.data.career.cumulativeMoney | ||
137 | + - ${statistics_actual_func($career_partnerCategory,$career_actual_list)} |
1 | +config: | ||
2 | + name: DIVI003-事业分红订单-查询事业合伙-统计值正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + | ||
5 | + | ||
6 | +teststeps: | ||
7 | +- name: 登录天联共创管理后台系统 | ||
8 | + variables: | ||
9 | + phone: ${ENV(adminphone_app)} | ||
10 | + testcase: testcases/common/m_app_login_testcases.yml | ||
11 | + | ||
12 | +- name: 查看事业分红列表 | ||
13 | + variables: | ||
14 | + partnerCategoryId: 1 | ||
15 | + orderType: 1 | ||
16 | + createTime: [] | ||
17 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
18 | + extract: | ||
19 | + #事业合伙 | ||
20 | + career_lists: content.data.gridResult.lists | ||
21 | + career_totalRow: content.data.gridResult.totalRow | ||
22 | + output: | ||
23 | + - career_lists | ||
24 | + - career_totalRow | ||
25 | + | ||
26 | +- name: 查看业务分红列表 | ||
27 | + variables: | ||
28 | + partnerCategoryId: 2 | ||
29 | + orderType: null | ||
30 | + createTime: [] | ||
31 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
32 | + extract: | ||
33 | + #业务合伙 | ||
34 | + business_lists: content.data.gridResult.lists | ||
35 | + output: | ||
36 | + - business_lists | ||
37 | +# | ||
38 | +- name: 查看研发分红列表 | ||
39 | + variables: | ||
40 | + partnerCategoryId: 3 | ||
41 | + orderType: null | ||
42 | + createTime: [] | ||
43 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
44 | + extract: | ||
45 | + #研发合伙 | ||
46 | + develop_lists: content.data.gridResult.lists | ||
47 | + output: | ||
48 | + - develop_lists | ||
49 | +# | ||
50 | +- name: 查看业务-产品应用分红列表 | ||
51 | + variables: | ||
52 | + partnerCategoryId: 4 | ||
53 | + orderType: null | ||
54 | + createTime: [] | ||
55 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
56 | + extract: | ||
57 | + #业务-产品应用合伙 | ||
58 | + applicationOrders_lists: content.data.gridResult.lists | ||
59 | + output: | ||
60 | + - applicationOrders_lists | ||
61 | + | ||
62 | +- name: 登录天联共创app端系统 | ||
63 | + ####身份类型 1:合伙人 2:高管 | ||
64 | + variables: | ||
65 | + idType: ${convert_to_int(1)} | ||
66 | + testcase: testcases/app/common/app_login_testcases.yml | ||
67 | + output: | ||
68 | + - accessToken | ||
69 | + | ||
70 | +- name: 查看分红订单-已收明细 | ||
71 | + variables: | ||
72 | + joinWays: | ||
73 | + - type: ${convert_to_int(1)} | ||
74 | + name: ${convert_to_string(事业合伙)} | ||
75 | + detailAction: ${convert_to_int(0)} | ||
76 | + api: api/app_api/dividend/orders_api.yml | ||
77 | + validate: | ||
78 | + ####实发订单总数 | ||
79 | + - eq: | ||
80 | + - content.data.total | ||
81 | + - ${statistics_num_func(receiveDividends,$career_lists)} | ||
82 | + | ||
83 | +- name: 查看分红订单-未收明细 | ||
84 | + variables: | ||
85 | + joinWays: | ||
86 | + - type: ${convert_to_int(1)} | ||
87 | + name: ${convert_to_string(事业合伙)} | ||
88 | + detailAction: ${convert_to_int(1)} | ||
89 | + api: api/app_api/dividend/orders_api.yml | ||
90 | + validate: | ||
91 | +# ####实发订单总数 | ||
92 | + - eq: | ||
93 | + - content.data.total | ||
94 | + - ${statistics_num_func(uncollectedDividends,$career_lists)} |
1 | +config: | ||
2 | + name: DIVI004-事业分红订单-查询非事业合伙无数据时-列表返回正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + | ||
5 | + | ||
6 | +teststeps: | ||
7 | +- name: $phone 登录天联共创app端系统 | ||
8 | + ####身份类型 1:合伙人 2:高管 | ||
9 | + variables: | ||
10 | + idType: ${convert_to_int(1)} | ||
11 | + testcase: testcases/app/common/app_login_testcases.yml | ||
12 | + output: | ||
13 | + - accessToken | ||
14 | + | ||
15 | +- name: 查看分红订单-已收明细 | ||
16 | + variables: | ||
17 | + joinWays: | ||
18 | + - type: ${convert_to_int(4)} | ||
19 | + name: ${convert_to_string(业务合伙)} | ||
20 | + detailAction: ${convert_to_int(0)} | ||
21 | + api: api/app_api/dividend/orders_api.yml | ||
22 | + validate: | ||
23 | + ####实发订单总数 | ||
24 | + - length_equals: | ||
25 | + - content.data.list | ||
26 | + - 0 | ||
27 | + | ||
28 | + - eq: | ||
29 | + - content.data.total | ||
30 | + - 0 | ||
31 | + | ||
32 | +- name: 查看分红订单-未收明细 | ||
33 | + variables: | ||
34 | + joinWays: | ||
35 | + - type: ${convert_to_int(4)} | ||
36 | + name: ${convert_to_string(业务合伙)} | ||
37 | + detailAction: ${convert_to_int(1)} | ||
38 | + api: api/app_api/dividend/orders_api.yml | ||
39 | + | ||
40 | + validate: | ||
41 | + ####实发订单总数 | ||
42 | + - length_equals : | ||
43 | + - content.data.list | ||
44 | + - 0 | ||
45 | + | ||
46 | + - eq: | ||
47 | + - content.data.total | ||
48 | + - 0 |
1 | +config: | ||
2 | + name: DIVI005-累计至今-明细-统计值正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + | ||
5 | +teststeps: | ||
6 | + | ||
7 | +- name: 登录天联共创管理后台系统 | ||
8 | + variables: | ||
9 | + phone: ${ENV(adminphone_app)} | ||
10 | + testcase: testcases/common/m_app_login_testcases.yml | ||
11 | + | ||
12 | +- name: 登录天联共创管理后台系统-查看事业分红列表 | ||
13 | + variables: | ||
14 | + partnerCategoryId: 1 | ||
15 | + orderType: 1 | ||
16 | + createTime: [] | ||
17 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
18 | + extract: | ||
19 | + #事业合伙 | ||
20 | + career_lists: content.data.gridResult.lists | ||
21 | + career_totalRow: content.data.gridResult.totalRow | ||
22 | + output: | ||
23 | + - career_lists | ||
24 | + - career_totalRow | ||
25 | + | ||
26 | +- name: 登录天联共创管理后台系统-查看业务分红列表 | ||
27 | + variables: | ||
28 | + partnerCategoryId: 2 | ||
29 | + orderType: null | ||
30 | + createTime: [] | ||
31 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
32 | + extract: | ||
33 | + #业务合伙 | ||
34 | + business_lists: content.data.gridResult.lists | ||
35 | + output: | ||
36 | + - business_lists | ||
37 | +# | ||
38 | +- name: 登录天联共创管理后台系统-查看研发分红列表 | ||
39 | + variables: | ||
40 | + partnerCategoryId: 3 | ||
41 | + orderType: null | ||
42 | + createTime: [] | ||
43 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
44 | + extract: | ||
45 | + #研发合伙 | ||
46 | + develop_lists: content.data.gridResult.lists | ||
47 | + output: | ||
48 | + - develop_lists | ||
49 | +# | ||
50 | +- name: 登录天联共创管理后台系统-查看业务-产品应用分红列表 | ||
51 | + variables: | ||
52 | + partnerCategoryId: 4 | ||
53 | + orderType: null | ||
54 | + createTime: [] | ||
55 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
56 | + extract: | ||
57 | + #业务-产品应用合伙 | ||
58 | + applicationOrders_lists: content.data.gridResult.lists | ||
59 | + output: | ||
60 | + - applicationOrders_lists | ||
61 | + | ||
62 | + | ||
63 | +- name: 登录天联共创app端系统 | ||
64 | + ####身份类型 1:合伙人 2:高管 | ||
65 | + variables: | ||
66 | + idType: ${convert_to_int(1)} | ||
67 | + testcase: testcases/app/common/app_login_testcases.yml | ||
68 | + output: | ||
69 | + - accessToken | ||
70 | +# | ||
71 | +- name: 查看分红统计与订单分红详情统计一致 | ||
72 | + api: api/app_api/dividend/statistics_api.yml | ||
73 | + extract: | ||
74 | + received: content.data.statistics.received | ||
75 | + outstanding: content.data.statistics.outstanding | ||
76 | + receivable: content.data.statistics.receivable | ||
77 | + validate: | ||
78 | + ####已收分红总额 | ||
79 | + - eq: | ||
80 | + - $received | ||
81 | + - ${statistics_func(receiveDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
82 | + | ||
83 | + ####未收分红总额 | ||
84 | + - eq: | ||
85 | + - $outstanding | ||
86 | + - ${statistics_func(uncollectedDividends,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
87 | +# | ||
88 | +# ####分红支出 | ||
89 | + - eq: | ||
90 | + - ${statistics_func(dividendSpending,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
91 | + - ${statistics_func(dividendSpending,$career_lists,$business_lists,$develop_lists,$applicationOrders_lists)} | ||
92 | + | ||
93 | +# | ||
94 | +# ####应收分红总额 | ||
95 | + - eq: | ||
96 | + - $receivable | ||
97 | + - ${str_to_int($received,$outstanding,-75)} |
1 | +config: | ||
2 | + name: DIVI001-事业-初始状态-统计值正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | +# variables: | ||
5 | +# partnerCategoryId: 1 | ||
6 | +# orderType: 1 | ||
7 | + | ||
8 | + | ||
9 | +teststeps: | ||
10 | +- name: 登录天联共创管理后台系统-订单列表-数据源来自于实发订单 | ||
11 | + testcase: testcases/common/COM001-1_app_actual_add_testcases.yml | ||
12 | + output: | ||
13 | + - actual_saleDate | ||
14 | + | ||
15 | +- name: 登录天联共创app端系统 | ||
16 | + ####身份类型 1:合伙人 2:高管 | ||
17 | + variables: | ||
18 | + idType: ${convert_to_int(1)} | ||
19 | + testcase: testcases/app/common/app_login_testcases.yml | ||
20 | + output: | ||
21 | + - accessToken | ||
22 | +## | ||
23 | +- name: 查看订单列表 | ||
24 | + variables: | ||
25 | + career_order_totalRow: ${get_saleDate_bigger_today($actual_saleDate)} | ||
26 | + api: api/app_api/order/list_api.yml | ||
27 | + extract: | ||
28 | + career_total: content.data.total | ||
29 | + validate: | ||
30 | +# ###今日新增实发订单 | ||
31 | + - eq: | ||
32 | + - content.data.total | ||
33 | + - ${str_to_int($career_total,$career_order_totalRow)} | ||
34 | + | ||
35 | +# ###累计实发订单 | ||
36 | + - eq: | ||
37 | + - content.data.total | ||
38 | + - ${str_to_int($career_total,$career_order_totalRow)} |
1 | +config: | ||
2 | + name: COM001-新增明日实际订单 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + partnerID: ${ENV(partnerId_app)} | ||
6 | + commissionProportion: 0 | ||
7 | + orderNum1: 100 | ||
8 | + univalence: 15 | ||
9 | + partnerRatio: 10 | ||
10 | + orderNum2: 200 | ||
11 | + partnerCategory: ${get_partnerCategory(1)} | ||
12 | + partnerCategoryId: 1 | ||
13 | + output: | ||
14 | + - actual_saleDate | ||
15 | + - actual_id | ||
16 | + - product_id_1 | ||
17 | + - product_id_2 | ||
18 | + | ||
19 | + | ||
20 | +teststeps: | ||
21 | +- name: 登录系统 | ||
22 | + variables: | ||
23 | + phone: ${ENV(adminphone_app)} | ||
24 | + testcase: testcases/common/m_app_login_testcases.yml | ||
25 | + | ||
26 | +- name: 新增明日实发订单 | ||
27 | + variables: | ||
28 | + saleDate: ${tomorrow_time_str()} | ||
29 | + api: api/m_api/actual/m_add_app_order_actual_api.yml | ||
30 | + extract: | ||
31 | + - orderid: content.data.id | ||
32 | + validate: | ||
33 | + - eq: | ||
34 | + - content.msg | ||
35 | + - ok | ||
36 | + | ||
37 | +- name: 查看实际订单列表 | ||
38 | + api: api/m_api/actual/m_order_actual_list_api.yml | ||
39 | + extract: | ||
40 | + - actual_id: content.data.gridResult.lists.0.id | ||
41 | + - actual_saleDate: content.data.gridResult.lists.0 | ||
42 | + output: | ||
43 | + - actual_saleDate | ||
44 | + validate: | ||
45 | + - eq: | ||
46 | + - content.data.gridResult.lists.0.id | ||
47 | + - ${convert_to_string($orderid)} | ||
48 | + - eq: | ||
49 | + - content.msg | ||
50 | + - ok |
1 | +config: | ||
2 | + name: COM001-新增实际订单 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + partnerID: ${ENV(partnerId_app)} | ||
6 | + commissionProportion: 5 | ||
7 | + orderNum1: 100 | ||
8 | + univalence: 15 | ||
9 | + partnerRatio: 10 | ||
10 | + orderNum2: 200 | ||
11 | +# partnerRatio2: 20 | ||
12 | + output: | ||
13 | + - actual_id | ||
14 | + - product_id_1 | ||
15 | + - product_id_2 | ||
16 | + | ||
17 | + | ||
18 | +teststeps: | ||
19 | +- name: $phone 登录系统 | ||
20 | + variables: | ||
21 | + phone: ${ENV(adminphone_app)} | ||
22 | + testcase: testcases/common/m_app_login_testcases.yml | ||
23 | + | ||
24 | +- name: 新增实发订单 | ||
25 | + api: api/m_api/actual/m_add_app_order_actual_api.yml | ||
26 | + extract: | ||
27 | + - orderid: content.data.id | ||
28 | + validate: | ||
29 | + - eq: | ||
30 | + - content.msg | ||
31 | + - ok | ||
32 | + | ||
33 | +- name: 查看实际订单列表 | ||
34 | + api: api/m_api/actual/m_order_actual_list_api.yml | ||
35 | + extract: | ||
36 | + - actual_id: content.data.gridResult.lists.0.id | ||
37 | + validate: | ||
38 | + - eq: | ||
39 | + - content.data.gridResult.lists.0.id | ||
40 | + - ${convert_to_string($orderid)} | ||
41 | + - eq: | ||
42 | + - content.msg | ||
43 | + - ok | ||
44 | + | ||
45 | +- name: 查看实际订单详情 | ||
46 | + variables: | ||
47 | + id: ${convert_to_string($actual_id)} | ||
48 | + api: api/m_api/actual/m_order_actual_detail_api.yml | ||
49 | + extract: | ||
50 | + - product_id_1: content.data.product.0.id | ||
51 | + - product_id_2: content.data.product.1.id | ||
52 | + validate: | ||
53 | + - eq: | ||
54 | + - content.data.orderNumCount | ||
55 | + - ${add($orderNum1,$orderNum2)} | ||
56 | + - eq: | ||
57 | + - content.data.orderAmountAdjustmentCount | ||
58 | + - ${cal_orderPrice($univalence, $orderNum1, $orderNum2)} | ||
59 | + - eq: | ||
60 | + - content.data.product.0.orderPrice | ||
61 | + - ${cal_orderPrice($univalence, $orderNum1)} | ||
62 | + - eq: | ||
63 | + - content.data.product.1.orderPrice | ||
64 | + - ${cal_orderPrice($univalence, $orderNum2)} |
1 | +config: | ||
2 | + name: COM004-查看分红列表 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + partnerCategoryId: 1 | ||
6 | + orderType: 1 | ||
7 | + | ||
8 | +teststeps: | ||
9 | +- name: $phone 登录系统 | ||
10 | + variables: | ||
11 | + phone: ${ENV(adminphone)} | ||
12 | + testcase: testcases/common/m_login_testcases.yml | ||
13 | + | ||
14 | +- name: 查看分红列表 | ||
15 | + api: api/m_api/dividends/m_dividends_list_api.yml |
testcases/common/m_app_login_testcases.yml
0 → 100644
1 | +config: | ||
2 | + name: 管理后台登陆 | ||
3 | +# base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + phone: ${ENV(adminphone_app)} | ||
6 | + | ||
7 | +teststeps: | ||
8 | +- name: $phone 登录企业平台 | ||
9 | + api: api/m_api/m_login_api/m_pwdLogin_api.yml | ||
10 | + extract: | ||
11 | + pwdLogintoken: content.data.access.token | ||
12 | + validate: | ||
13 | + - eq: | ||
14 | + - content.msg | ||
15 | + - ok | ||
16 | + | ||
17 | +- name: 选择公司登录 | ||
18 | + variables: | ||
19 | + companyId: ${ENV(companyId_app)} | ||
20 | + api: api/m_api/m_login_api/m_anonymousLogin_api.yml | ||
21 | + extract: | ||
22 | + anonymousLogintoken: content.data.access.token | ||
23 | + validate: | ||
24 | + - eq: | ||
25 | + - content.msg | ||
26 | + - ok | ||
27 | +# | ||
28 | +- name: 单点登录,获取secret用于登录子系统 | ||
29 | + api: api/m_api/m_login_api/m_getSingleLoginMenus_api.yml | ||
30 | + extract: | ||
31 | + url: content.data.list.1.url | ||
32 | + validate: | ||
33 | + - eq: | ||
34 | + - content.msg | ||
35 | + - ok | ||
36 | + | ||
37 | +- name: 使用secret登录合伙人系统 | ||
38 | + api: api/m_api/m_login_api/m_login_api.yml | ||
39 | + teardown_hooks: | ||
40 | + - ${teardown_hook_get_m_accesstoken($response)} | ||
41 | + validate: | ||
42 | + - eq: | ||
43 | + - content.msg | ||
44 | + - ok |
testcases/common/start_app_testcases.yml
0 → 100644
1 | +config: | ||
2 | + name: DIV001-分红列表-数据源来自于实发订单 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + orderType: null | ||
6 | + partnerCategoryId: 2 | ||
7 | + searchText: '' | ||
8 | + createTime: [] | ||
9 | + | ||
10 | +teststeps: | ||
11 | +- name: 登录系统 | ||
12 | + variables: | ||
13 | + phone: ${ENV(adminphone_app)} | ||
14 | + testcase: testcases/common/m_app_login_testcases.yml | ||
15 | + | ||
16 | +- name: 查看业务分红列表 | ||
17 | + | ||
18 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
19 | + extract: | ||
20 | + - num1: content.data.gridResult.totalRow | ||
21 | + | ||
22 | +- name: 新增实发订单(业务订单) | ||
23 | + variables: | ||
24 | + partnerCategory: ${get_partnerCategory(2)} | ||
25 | + partnerCategoryId: 2 | ||
26 | + saleDate: ${today_time_str()} | ||
27 | + api: api/m_api/actual/m_add_app_order_actual_api.yml | ||
28 | + validate: | ||
29 | + - eq: | ||
30 | + - content.msg | ||
31 | + - ok | ||
32 | +# | ||
33 | +- name: 查看业务分红列表 | ||
34 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
35 | + validate: | ||
36 | + - eq: | ||
37 | + - content.msg | ||
38 | + - ok | ||
39 | + - eq: | ||
40 | + - content.data.gridResult.totalRow | ||
41 | + - ${add($num1,1)} |
1 | +config: | ||
2 | + name: DIV003_1-分红管理-初始状态-各个值计算正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + partnerID: ${ENV(partnerId_app)} | ||
6 | + commissionProportion: 5 | ||
7 | + orderNum1: 100 | ||
8 | + univalence: 15 | ||
9 | + partnerRatio: 10 | ||
10 | + orderNum2: 200 | ||
11 | + partnerCategory: ${get_partnerCategory(1)} | ||
12 | + partnerCategoryId: 1 | ||
13 | + saleDate: ${today_time_str()} | ||
14 | +# partnerRatio2: 20 | ||
15 | + | ||
16 | +teststeps: | ||
17 | +- name: 新增实际订单 | ||
18 | + | ||
19 | + testcase: testcases/common/COM001_app_actual_add_testcases.yml | ||
20 | + output: | ||
21 | + - actual_id | ||
22 | + | ||
23 | +- name: 查看该订单的分红详情 | ||
24 | + variables: | ||
25 | + id: ${convert_to_string($actual_id)} | ||
26 | + api: api/m_api/dividends/m_dividends_detail_api.yml | ||
27 | + validate: | ||
28 | + - eq: | ||
29 | + - content.data.order.orderId | ||
30 | + - $actual_id | ||
31 | + #####合伙人应收分红总额 | ||
32 | + - eq: | ||
33 | + - content.data.order.partnerDividends | ||
34 | + - ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)} | ||
35 | + #####合伙人已收分红总额 | ||
36 | + - eq: | ||
37 | + - content.data.order.receivedDividends | ||
38 | + - ${convert_to_string(0)} | ||
39 | + #####合伙人未收分红总额 | ||
40 | + - eq: | ||
41 | + - content.data.order.notReceivedDividend | ||
42 | + - ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)} | ||
43 | + #####合伙人分红支出总额 | ||
44 | + - eq: | ||
45 | + - content.data.order.dividendSpending | ||
46 | + - ${convert_to_string(0)} | ||
47 | + #####订单类型 | ||
48 | + - eq: | ||
49 | + - content.data.order.orderType | ||
50 | + - 1 | ||
51 | + #####产品1总金额 | ||
52 | + - eq: | ||
53 | + - content.data.product.detail.0.commodityPrice | ||
54 | + - 1500 | ||
55 | + #####产品1总数量 | ||
56 | + - eq: | ||
57 | + - content.data.product.detail.0.orderNum | ||
58 | + - $orderNum1 | ||
59 | + #####产品1应收分红 | ||
60 | + - eq: | ||
61 | + - content.data.product.detail.0.partnerDividends | ||
62 | + - ${cal_Ratio($partnerRatio, $univalence, $orderNum1)} | ||
63 | + #####产品1分红状态 | ||
64 | + - eq: | ||
65 | + - content.data.product.detail.0.paymentStatus | ||
66 | + - 1 | ||
67 | + #####产品2总金额 | ||
68 | + - eq: | ||
69 | + - content.data.product.detail.1.commodityPrice | ||
70 | + - 3000 | ||
71 | + #####产品2总数量 | ||
72 | + - eq: | ||
73 | + - content.data.product.detail.1.orderNum | ||
74 | + - $orderNum2 | ||
75 | + #####产品2应收分红 | ||
76 | + - eq: | ||
77 | + - content.data.product.detail.1.partnerDividends | ||
78 | + - ${cal_Ratio($partnerRatio, $univalence, $orderNum2)} | ||
79 | + #####产品2分红状态 | ||
80 | + - eq: | ||
81 | + - content.data.product.detail.1.paymentStatus | ||
82 | + - 1 | ||
83 | + #####订单总数量 | ||
84 | + - eq: | ||
85 | + - content.data.product.orderNumCount | ||
86 | + - ${add($orderNum1,$orderNum2)} | ||
87 | + #####总金额 | ||
88 | + - eq: | ||
89 | + - content.data.product.orderAmountAdjustmentCount | ||
90 | + - ${cal_orderPrice($univalence, $orderNum1, $orderNum2)} | ||
91 | + ####合伙人应收分红合计 | ||
92 | + - eq: | ||
93 | + - content.data.product.partnerDividendsCount | ||
94 | + - ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)} |
1 | +config: | ||
2 | + name: DIV004_1-分红管理-调整数量由100改为50-各个值计算正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + goodNumber: 50 | ||
6 | + partnerCategory: ${get_partnerCategory(1)} | ||
7 | + partnerCategoryId: 1 | ||
8 | + saleDate: ${today_time_str()} | ||
9 | + orderType: 1 | ||
10 | + createTime: [] | ||
11 | + | ||
12 | + | ||
13 | +teststeps: | ||
14 | +- name: 新增实际订单 | ||
15 | + testcase: testcases/common/COM001_app_actual_add_testcases.yml | ||
16 | + output: | ||
17 | + - actual_id | ||
18 | + - product_id_1 | ||
19 | + - product_id_2 | ||
20 | + | ||
21 | +- name: 编辑分红-数量由100调整为50 | ||
22 | + variables: | ||
23 | + orderId: ${convert_to_string($actual_id)} | ||
24 | + state: 1 | ||
25 | + partnerBonusPercent: 10 | ||
26 | + reason: '修改原因${get_stringcode(5)}' | ||
27 | + productId: ${convert_to_string($product_id_1)} | ||
28 | + api: api/m_api/dividends/m_dividends_modify_api.yml | ||
29 | + validate: | ||
30 | + - eq: | ||
31 | + - content.msg | ||
32 | + - ok | ||
33 | + | ||
34 | +- name: 查看分红列表 | ||
35 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
36 | + validate: | ||
37 | + #####等待支付状态=1 | ||
38 | + - eq: | ||
39 | + - content.data.gridResult.lists.0.stateOfPayment | ||
40 | + - 1 | ||
41 | + ######应收分红 | ||
42 | + - eq: | ||
43 | + - content.data.gridResult.lists.0.dividendsReceivable | ||
44 | + - ${convert_to_string(375)} | ||
45 | + #####已收分红 | ||
46 | + - eq: | ||
47 | + - content.data.gridResult.lists.0.receiveDividends | ||
48 | + - ${convert_to_string(0)} | ||
49 | + #####未收分红 | ||
50 | + - eq: | ||
51 | + - content.data.gridResult.lists.0.uncollectedDividends | ||
52 | + - ${convert_to_string(375)} | ||
53 | + #####分红支出 | ||
54 | + - eq: | ||
55 | + - content.data.gridResult.lists.0.dividendSpending | ||
56 | + - ${convert_to_string(0)} | ||
57 | + | ||
58 | + | ||
59 | +- name: 查看该订单的分红详情 | ||
60 | + variables: | ||
61 | + id: ${convert_to_string($actual_id)} | ||
62 | + api: api/m_api/dividends/m_dividends_detail_api.yml | ||
63 | + validate: | ||
64 | + - eq: | ||
65 | + - content.data.order.orderId | ||
66 | + - $actual_id | ||
67 | + #####合伙人未收分红总额 | ||
68 | + - eq: | ||
69 | + - content.data.order.notReceivedDividend | ||
70 | + - ${convert_to_string(375)} | ||
71 | + #####合伙人已收分红总额 | ||
72 | + - eq: | ||
73 | + - content.data.order.receivedDividends | ||
74 | + - ${convert_to_string(0)} | ||
75 | + #####合伙人应收分红总额 | ||
76 | + - eq: | ||
77 | + - content.data.order.partnerDividends | ||
78 | + - ${convert_to_string(375)} | ||
79 | + #####合伙人分红支出总额 | ||
80 | + - eq: | ||
81 | + - content.data.order.dividendSpending | ||
82 | + - ${convert_to_string(0)} | ||
83 | + #####初始总数量 | ||
84 | + - eq: | ||
85 | + - content.data.product.orderNumCount | ||
86 | + - 250 | ||
87 | + #####初始总金额 | ||
88 | + - eq: | ||
89 | + - content.data.product.orderAmountAdjustmentCount | ||
90 | + - 3750 | ||
91 | + #####合伙人应收分红总额调整 | ||
92 | + - eq: | ||
93 | + - content.data.product.partnerDividendsCount | ||
94 | + - ${convert_to_string(375)} | ||
95 | + #####产品1是否正确 | ||
96 | + - eq: | ||
97 | + - content.data.product.detail.0.productId | ||
98 | + - ${convert_to_int($product_id_1)} | ||
99 | + #####产品1总金额 | ||
100 | + - eq: | ||
101 | + - content.data.product.detail.0.commodityPrice | ||
102 | + - 750 | ||
103 | + #####产品1应收分红 | ||
104 | + - eq: | ||
105 | + - content.data.product.detail.0.partnerDividends | ||
106 | + - ${convert_to_string(75)} | ||
107 | + #####产品1数量调整 | ||
108 | + - eq: | ||
109 | + - content.data.product.detail.0.orderNum | ||
110 | + - $goodNumber | ||
111 | + #####产品1分红状态 | ||
112 | + - eq: | ||
113 | + - content.data.product.detail.0.paymentStatus | ||
114 | + - 1 | ||
115 | + #####产品2总金额 | ||
116 | + - eq: | ||
117 | + - content.data.product.detail.1.commodityPrice | ||
118 | + - 3000 | ||
119 | + #####产品2应收分红 | ||
120 | + - eq: | ||
121 | + - content.data.product.detail.1.partnerDividends | ||
122 | + - ${convert_to_string(300)} | ||
123 | + #####产品2分红状态 | ||
124 | + - eq: | ||
125 | + - content.data.product.detail.1.paymentStatus | ||
126 | + - 1 | ||
127 | + | ||
128 | +- name: 查看实际订单列表 | ||
129 | + api: api/m_api/actual/m_order_actual_list_api.yml | ||
130 | + validate: | ||
131 | + - eq: | ||
132 | + - content.data.gridResult.lists.0.id | ||
133 | + - $actual_id | ||
134 | + - eq: | ||
135 | + - content.data.gridResult.lists.0.orderNum | ||
136 | + - 300 | ||
137 | + - eq: | ||
138 | + - content.data.gridResult.lists.0.quantityControl | ||
139 | + - ${convert_to_string(250)} | ||
140 | + - eq: | ||
141 | + - content.data.gridResult.lists.0.orderPrice | ||
142 | + - 4500 | ||
143 | + - eq: | ||
144 | + - content.data.gridResult.lists.0.priceControl | ||
145 | + - ${convert_to_string(3750)} | ||
146 | + | ||
147 | +- name: 查看实际订单详情 | ||
148 | + variables: | ||
149 | + id: ${convert_to_string($actual_id)} | ||
150 | + api: api/m_api/actual/m_order_actual_detail_api.yml | ||
151 | + validate: | ||
152 | + - eq: | ||
153 | + - content.data.orderNumCount | ||
154 | + - 300 | ||
155 | + - eq: | ||
156 | + - content.data.orderAmountAdjustmentCount | ||
157 | + - 4500 | ||
158 | + - eq: | ||
159 | + - content.data.orderNumCountControl | ||
160 | + - ${convert_to_string(250)} | ||
161 | + - eq: | ||
162 | + - content.data.orderAmountAdjustmentCountControl | ||
163 | + - ${convert_to_string(3750)} | ||
164 | + - eq: | ||
165 | + - content.data.product.0.orderPrice | ||
166 | + - 1500 | ||
167 | + - eq: | ||
168 | + - content.data.product.0.quantityControl | ||
169 | + - ${convert_to_string($goodNumber)} | ||
170 | + - eq: | ||
171 | + - content.data.product.0.priceControl | ||
172 | + - ${convert_to_string(750)} | ||
173 | + - eq: | ||
174 | + - content.data.product.1.orderPrice | ||
175 | + - 3000 |
1 | +config: | ||
2 | + name: DIV007-分红管理-产品1支付分红成功,数据正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + partnerID: ${ENV(partnerId_app)} | ||
6 | + partnerCategory: ${get_partnerCategory(1)} | ||
7 | + partnerCategoryId: 1 | ||
8 | + saleDate: ${today_time_str()} | ||
9 | + orderType: 1 | ||
10 | + createTime: [] | ||
11 | + | ||
12 | + | ||
13 | +teststeps: | ||
14 | +- name: 新增实际订单 | ||
15 | + testcase: testcases/common/COM001_app_actual_add_testcases.yml | ||
16 | + output: | ||
17 | + - actual_id | ||
18 | + - product_id_1 | ||
19 | + - product_id_2 | ||
20 | + | ||
21 | +- name: 支付分红 | ||
22 | + variables: | ||
23 | + orderId: ${convert_to_string($actual_id)} | ||
24 | + productId: ${convert_to_string($product_id_1)} | ||
25 | + api: api/m_api/dividends/m_dividends_payDividends_api.yml | ||
26 | + validate: | ||
27 | + - eq: | ||
28 | + - content.msg | ||
29 | + - ok | ||
30 | + | ||
31 | +- name: 查看分红列表 | ||
32 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
33 | + validate: | ||
34 | + #####已支付状态=2 | ||
35 | + - eq: | ||
36 | + - content.data.gridResult.lists.0.stateOfPayment | ||
37 | + - 2 | ||
38 | + ######应收分红 | ||
39 | + - eq: | ||
40 | + - content.data.gridResult.lists.0.dividendsReceivable | ||
41 | + - ${convert_to_string(450)} | ||
42 | + #####已收分红 | ||
43 | + - eq: | ||
44 | + - content.data.gridResult.lists.0.receiveDividends | ||
45 | + - ${convert_to_string(150)} | ||
46 | + #####未收分红 | ||
47 | + - eq: | ||
48 | + - content.data.gridResult.lists.0.uncollectedDividends | ||
49 | + - ${convert_to_string(300)} | ||
50 | + #####分红支出 | ||
51 | + - eq: | ||
52 | + - content.data.gridResult.lists.0.dividendSpending | ||
53 | + - ${convert_to_string(0)} | ||
54 | + | ||
55 | + | ||
56 | +- name: 查看该订单的分红详情 | ||
57 | + variables: | ||
58 | + id: ${convert_to_string($actual_id)} | ||
59 | + api: api/m_api/dividends/m_dividends_detail_api.yml | ||
60 | + validate: | ||
61 | + - eq: | ||
62 | + - content.data.order.orderId | ||
63 | + - $actual_id | ||
64 | + #####合伙人应收分红总额 | ||
65 | + - eq: | ||
66 | + - content.data.order.partnerDividends | ||
67 | + - ${convert_to_string(450)} | ||
68 | + #####合伙人未收分红总额 | ||
69 | + - eq: | ||
70 | + - content.data.order.notReceivedDividend | ||
71 | + - ${convert_to_string(300)} | ||
72 | + #####合伙人已收分红总额 | ||
73 | + - eq: | ||
74 | + - content.data.order.receivedDividends | ||
75 | + - ${convert_to_string(150)} | ||
76 | + #####合伙人分红支出总额 | ||
77 | + - eq: | ||
78 | + - content.data.order.dividendSpending | ||
79 | + - ${convert_to_string(0)} | ||
80 | + #####产品1是否正确 | ||
81 | + - eq: | ||
82 | + - content.data.product.detail.0.productId | ||
83 | + - ${convert_to_int($product_id_1)} | ||
84 | + #####产品1总金额 | ||
85 | + - eq: | ||
86 | + - content.data.product.detail.0.commodityPrice | ||
87 | + - 1500 | ||
88 | + #####产品1应收分红 | ||
89 | + - eq: | ||
90 | + - content.data.product.detail.0.partnerDividends | ||
91 | + - ${convert_to_string(150)} | ||
92 | + #####产品1数量 | ||
93 | + - eq: | ||
94 | + - content.data.product.detail.0.orderNum | ||
95 | + - 100 | ||
96 | + #####产品1分红状态 | ||
97 | + - eq: | ||
98 | + - content.data.product.detail.0.paymentStatus | ||
99 | + - 2 | ||
100 | + #####产品2总金额 | ||
101 | + - eq: | ||
102 | + - content.data.product.detail.1.commodityPrice | ||
103 | + - 3000 | ||
104 | + #####产品2应收分红 | ||
105 | + - eq: | ||
106 | + - content.data.product.detail.1.partnerDividends | ||
107 | + - ${convert_to_string(300)} | ||
108 | + #####产品2分红状态 | ||
109 | + - eq: | ||
110 | + - content.data.product.detail.1.paymentStatus | ||
111 | + - 1 | ||
112 | + | ||
113 | +- name: 查看实际订单列表 | ||
114 | + api: api/m_api/actual/m_order_actual_list_api.yml | ||
115 | + validate: | ||
116 | + - eq: | ||
117 | + - content.data.gridResult.lists.0.id | ||
118 | + - $actual_id | ||
119 | + - eq: | ||
120 | + - content.data.gridResult.lists.0.orderNum | ||
121 | + - 300 | ||
122 | + - eq: | ||
123 | + - content.data.gridResult.lists.0.orderPrice | ||
124 | + - 4500 | ||
125 | + | ||
126 | +- name: 查看实际订单详情 | ||
127 | + variables: | ||
128 | + id: ${convert_to_string($actual_id)} | ||
129 | + api: api/m_api/actual/m_order_actual_detail_api.yml | ||
130 | + validate: | ||
131 | + - eq: | ||
132 | + - content.data.orderNumCount | ||
133 | + - 300 | ||
134 | + - eq: | ||
135 | + - content.data.orderAmountAdjustmentCount | ||
136 | + - 4500 | ||
137 | + - eq: | ||
138 | + - content.data.product.0.orderPrice | ||
139 | + - 1500 | ||
140 | + - eq: | ||
141 | + - content.data.product.1.orderPrice | ||
142 | + - 3000 |
1 | +config: | ||
2 | + name: DIV008-分红管理-产品1支付分红成功后,调整数量由100改为50,数据正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + goodNumber: 50 | ||
6 | + partnerCategory: ${get_partnerCategory(1)} | ||
7 | + partnerCategoryId: 1 | ||
8 | + saleDate: ${today_time_str()} | ||
9 | + orderType: 1 | ||
10 | + createTime: [] | ||
11 | + | ||
12 | + | ||
13 | +teststeps: | ||
14 | +- name: 新增实际订单 | ||
15 | + testcase: testcases/common/COM001_app_actual_add_testcases.yml | ||
16 | + output: | ||
17 | + - actual_id | ||
18 | + - product_id_1 | ||
19 | + - product_id_2 | ||
20 | + | ||
21 | +- name: 支付分红 | ||
22 | + variables: | ||
23 | + orderId: ${convert_to_string($actual_id)} | ||
24 | + productId: ${convert_to_string($product_id_1)} | ||
25 | + api: api/m_api/dividends/m_dividends_payDividends_api.yml | ||
26 | + validate: | ||
27 | + - eq: | ||
28 | + - content.msg | ||
29 | + - ok | ||
30 | + | ||
31 | +- name: 编辑分红-数量由100调整为50 | ||
32 | + variables: | ||
33 | + orderId: ${convert_to_string($actual_id)} | ||
34 | + state: 1 | ||
35 | + partnerBonusPercent: 10 | ||
36 | + reason: '修改原因${get_stringcode(5)}' | ||
37 | + productId: ${convert_to_string($product_id_1)} | ||
38 | + api: api/m_api/dividends/m_dividends_modify_api.yml | ||
39 | + validate: | ||
40 | + - eq: | ||
41 | + - content.msg | ||
42 | + - ok | ||
43 | + | ||
44 | +- name: 查看分红列表 | ||
45 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
46 | + validate: | ||
47 | + #####已支付状态=1 | ||
48 | + - eq: | ||
49 | + - content.data.gridResult.lists.0.stateOfPayment | ||
50 | + - 2 | ||
51 | + ######应收分红 | ||
52 | + - eq: | ||
53 | + - content.data.gridResult.lists.0.dividendsReceivable | ||
54 | + - ${convert_to_string(375)} | ||
55 | + #####已收分红 | ||
56 | + - eq: | ||
57 | + - content.data.gridResult.lists.0.receiveDividends | ||
58 | + - ${convert_to_string(150)} | ||
59 | + #####未收分红 | ||
60 | + - eq: | ||
61 | + - content.data.gridResult.lists.0.uncollectedDividends | ||
62 | + - ${convert_to_string(300)} | ||
63 | + #####分红支出 | ||
64 | + - eq: | ||
65 | + - content.data.gridResult.lists.0.dividendSpending | ||
66 | + - ${convert_to_string(75)} | ||
67 | + | ||
68 | + | ||
69 | +- name: 查看该订单的分红详情 | ||
70 | + variables: | ||
71 | + id: ${convert_to_string($actual_id)} | ||
72 | + api: api/m_api/dividends/m_dividends_detail_api.yml | ||
73 | + validate: | ||
74 | + - eq: | ||
75 | + - content.data.order.orderId | ||
76 | + - $actual_id | ||
77 | + #####合伙人应收分红总额 | ||
78 | + - eq: | ||
79 | + - content.data.order.partnerDividends | ||
80 | + - ${convert_to_string(375)} | ||
81 | + #####合伙人未收分红总额 | ||
82 | + - eq: | ||
83 | + - content.data.order.notReceivedDividend | ||
84 | + - ${convert_to_string(300)} | ||
85 | + #####合伙人已收分红总额 | ||
86 | + - eq: | ||
87 | + - content.data.order.receivedDividends | ||
88 | + - ${convert_to_string(150)} | ||
89 | + #####合伙人分红支出总额 | ||
90 | + - eq: | ||
91 | + - content.data.order.dividendSpending | ||
92 | + - ${convert_to_string(75)} | ||
93 | + #####产品1是否正确 | ||
94 | + - eq: | ||
95 | + - content.data.product.detail.0.productId | ||
96 | + - ${convert_to_int($product_id_1)} | ||
97 | + #####产品1总金额 | ||
98 | + - eq: | ||
99 | + - content.data.product.detail.0.commodityPrice | ||
100 | + - 750 | ||
101 | + #####产品1应收分红 | ||
102 | + - eq: | ||
103 | + - content.data.product.detail.0.partnerDividends | ||
104 | + - ${convert_to_string(75)} | ||
105 | + #####产品1数量 | ||
106 | + - eq: | ||
107 | + - content.data.product.detail.0.orderNum | ||
108 | + - 50 | ||
109 | + #####产品1分红状态 | ||
110 | + - eq: | ||
111 | + - content.data.product.detail.0.paymentStatus | ||
112 | + - 2 | ||
113 | + #####产品2总金额 | ||
114 | + - eq: | ||
115 | + - content.data.product.detail.1.commodityPrice | ||
116 | + - 3000 | ||
117 | + #####产品2应收分红 | ||
118 | + - eq: | ||
119 | + - content.data.product.detail.1.partnerDividends | ||
120 | + - ${convert_to_string(300)} | ||
121 | + #####产品2分红状态 | ||
122 | + - eq: | ||
123 | + - content.data.product.detail.1.paymentStatus | ||
124 | + - 1 | ||
125 | + | ||
126 | +- name: 查看实际订单列表 | ||
127 | + api: api/m_api/actual/m_order_actual_list_api.yml | ||
128 | + validate: | ||
129 | + - eq: | ||
130 | + - content.data.gridResult.lists.0.id | ||
131 | + - $actual_id | ||
132 | + - eq: | ||
133 | + - content.data.gridResult.lists.0.orderNum | ||
134 | + - 300 | ||
135 | + - eq: | ||
136 | + - content.data.gridResult.lists.0.orderPrice | ||
137 | + - 4500 | ||
138 | + | ||
139 | +- name: 查看实际订单详情 | ||
140 | + variables: | ||
141 | + id: ${convert_to_string($actual_id)} | ||
142 | + api: api/m_api/actual/m_order_actual_detail_api.yml | ||
143 | + validate: | ||
144 | + - eq: | ||
145 | + - content.data.orderNumCount | ||
146 | + - 300 | ||
147 | + - eq: | ||
148 | + - content.data.orderAmountAdjustmentCount | ||
149 | + - 4500 | ||
150 | + - eq: | ||
151 | + - content.data.product.0.orderPrice | ||
152 | + - 1500 | ||
153 | + - eq: | ||
154 | + - content.data.product.1.orderPrice | ||
155 | + - 3000 |
1 | +config: | ||
2 | + name: DIV010-分红管理-批量支付分红成功,数据正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + partnerID: ${ENV(partnerId_app)} | ||
6 | + commissionProportion: 5 | ||
7 | + orderNum1: 100 | ||
8 | + univalence: 15 | ||
9 | + partnerRatio: 10 | ||
10 | + orderNum2: 200 | ||
11 | + partnerCategory: ${get_partnerCategory(1)} | ||
12 | + partnerCategoryId: 1 | ||
13 | + orderType: 1 | ||
14 | + saleDate: ${today_time_str()} | ||
15 | + createTime: [] | ||
16 | +# partnerRatio2: 20 | ||
17 | +# output: | ||
18 | +# - actual_id | ||
19 | +# - product_id_1 | ||
20 | +# - product_id_2 | ||
21 | + | ||
22 | + | ||
23 | +teststeps: | ||
24 | +- name: $phone 登录系统 | ||
25 | + variables: | ||
26 | + phone: ${ENV(adminphone_app)} | ||
27 | + | ||
28 | + testcase: testcases/common/m_app_login_testcases.yml | ||
29 | + | ||
30 | +- name: 新增实发订单 | ||
31 | + times: 3 | ||
32 | + api: api/m_api/actual/m_add_app_order_actual_api.yml | ||
33 | + teardown_hooks: | ||
34 | + - ${teardown_hook_get_orderid($response)} | ||
35 | + validate: | ||
36 | + - eq: | ||
37 | + - content.msg | ||
38 | + - ok | ||
39 | + | ||
40 | +- name: 查看分红列表 | ||
41 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
42 | + validate: | ||
43 | + #####已支付状态=2 | ||
44 | + - eq: | ||
45 | + - content.data.gridResult.lists.0.stateOfPayment | ||
46 | + - 1 | ||
47 | + | ||
48 | + | ||
49 | +- name: 批量支付分红 | ||
50 | + api: api/m_api/dividends/m_dividends_payDividends_batch_api.yml | ||
51 | + validate: | ||
52 | + - eq: | ||
53 | + - content.msg | ||
54 | + - ok | ||
55 | + | ||
56 | +- name: 查看分红列表 | ||
57 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
58 | + validate: | ||
59 | + #####已支付状态=2 | ||
60 | + - eq: | ||
61 | + - content.data.gridResult.lists.0.stateOfPayment | ||
62 | + - 2 | ||
63 | + - eq: | ||
64 | + - content.data.gridResult.lists.1.stateOfPayment | ||
65 | + - 2 | ||
66 | + - eq: | ||
67 | + - content.data.gridResult.lists.2.stateOfPayment | ||
68 | + - 2 |
testsuites/partner_app_testsuite.yml
0 → 100644
1 | +config: | ||
2 | + name: 合伙人测试集 | ||
3 | +testcases: | ||
4 | + | ||
5 | +- name: start....初始化数据库和文件 | ||
6 | + testcase: testcases/common/start_app_testcases.yml | ||
7 | + | ||
8 | +##############################APP端合伙人开始################################ | ||
9 | +- name: DIVI001-事业-初始状态-统计值正确 | ||
10 | + testcase: testcases/app/dividends/DIVI001_career_dividendslist_testcases.yml | ||
11 | + | ||
12 | +- name: DIVI002-事业-调整数量-更改支付状态-统计值正确 | ||
13 | + testcase: testcases/app/dividends/DIVI002_career_dividendslist_testcases.yml | ||
14 | + | ||
15 | +- name: DIVI003-事业分红订单-查询事业合伙-统计值正确 | ||
16 | + testcase: testcases/app/dividends/DIVI003_career_dividends_orderslist_testcases.yml | ||
17 | + | ||
18 | +- name: DIVI004-事业分红订单-查询非事业合伙无数据时-列表返回正确 | ||
19 | + testcase: testcases/app/dividends/DIVI004_career_dividends_orderslist_search_null_testcases.yml | ||
20 | + | ||
21 | +- name: DIVI005-累计至今-明细-统计值正确 | ||
22 | + testcase: testcases/app/dividends/DIVI005_dividends_Details_testcases.yml | ||
23 | + | ||
24 | +- name: DIVI006-累计实发订单列表不包含明日 | ||
25 | + testcase: testcases/app/dividends/DIVI006_tomorrow_career_dividendslist_testcases.yml | ||
26 | +###################################APP端合伙人权限################################ | ||
27 | +- name: COMM1-单个合伙人登录 | ||
28 | + testcase: testcases/app/common/COMM1_app_partner_login_testcases.yml | ||
29 | + | ||
30 | +- name: COMM2-单个高管登录 | ||
31 | + testcase: testcases/app/common/COMM2_app_manager_login_testcases.yml | ||
32 | + | ||
33 | +- name: COMM3-合伙人登录,提示"当前账号已被禁用" | ||
34 | + testcase: testcases/app/common/COMM3_app_partner_login_fail_testcases.yml | ||
35 | + | ||
36 | +- name: COMM4-APP多公司高管登录 | ||
37 | + testcase: testcases/app/common/COMM4_app_more_company_manager_login_testcases.yml | ||
38 | +###################################APP端合伙人结束################################ | ||
39 | +###################################APP端高管开始################################ | ||
40 | +- name: COMP001-企业统计值正确 | ||
41 | + testcase: testcases/app/company/COMP001_company_statistics_testcases.yml | ||
42 | + | ||
43 | +- name: COMP002-按照类型过滤,查看合伙人列表,数据正确 | ||
44 | + testcase: testcases/app/company/COMP002_company_partners_testcases.yml | ||
45 | +###############################APP端高管结束################################ | ||
46 | + |
-
请 注册 或 登录 后发表评论