正在显示
12 个修改的文件
包含
803 行增加
和
110 行删除
api/m_api/dividends/m_dividends_edit_api.yml
0 → 100644
1 | +name: 编辑事业分红 | ||
2 | +base_url: ${ENV(base_manager_url)} | ||
3 | +variables: | ||
4 | + id: 1072 | ||
5 | + quantityControl: '50' | ||
6 | + stateOfPayment: 1 | ||
7 | + remark: | ||
8 | + productId: 2132 | ||
9 | +teardown_hooks: | ||
10 | + - ${sleep(2)} | ||
11 | +request: | ||
12 | + headers: | ||
13 | + Content-Type: application/json;charset=utf-8 | ||
14 | + User-Agent: okhttp/3.12.3 | ||
15 | + Authorization: Bearer ${get_m_accesstoken()} | ||
16 | + json: | ||
17 | + id: $id | ||
18 | + dividendPayment: | ||
19 | + - productId: $productId | ||
20 | + quantityControl: $quantityControl | ||
21 | + remark: | ||
22 | + stateOfPayment: $stateOfPayment | ||
23 | + method: POST | ||
24 | + url: /v1/dividends/edit | ||
25 | +# extract: | ||
26 | +# - num: content.data.gridResult.totalRow | ||
27 | +validate: | ||
28 | + - eq: | ||
29 | + - content.msg | ||
30 | + - ok |
@@ -16,7 +16,7 @@ request: | @@ -16,7 +16,7 @@ request: | ||
16 | User-Agent: okhttp/3.12.3 | 16 | User-Agent: okhttp/3.12.3 |
17 | Authorization: Bearer ${get_m_accesstoken()} | 17 | Authorization: Bearer ${get_m_accesstoken()} |
18 | json: | 18 | json: |
19 | - orderId: '意向订单号${get_nowtime()}' | 19 | + orderId: $orderId |
20 | buyer: '客户名称${get_stringcode(5)}' | 20 | buyer: '客户名称${get_stringcode(5)}' |
21 | orderDist: '订单区域${get_stringcode(5)}' | 21 | orderDist: '订单区域${get_stringcode(5)}' |
22 | partnerID: $partnerID | 22 | partnerID: $partnerID |
sendmsg_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','opp_testsuites.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_opp_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=78c1856d146224126b471f17a6b060d118c3fcb1e60155ec7e9ec5c45fdc01f6' | ||
60 | + headers = {'Content-Type': 'application/json'} | ||
61 | + | ||
62 | + requests.post(url, json=data, headers=headers) | ||
63 | + | ||
64 | +if __name__ == '__main__': | ||
65 | + sendinfo() | ||
66 | + | ||
67 | + |
@@ -11,8 +11,10 @@ config: | @@ -11,8 +11,10 @@ config: | ||
11 | orderNum2: 200 | 11 | orderNum2: 200 |
12 | univalence2: 15 | 12 | univalence2: 15 |
13 | partnerRatio2: 20 | 13 | partnerRatio2: 20 |
14 | - export: | 14 | + output: |
15 | - actual_id | 15 | - actual_id |
16 | + - product_id_1 | ||
17 | + - product_id_2 | ||
16 | 18 | ||
17 | 19 | ||
18 | teststeps: | 20 | teststeps: |
@@ -35,4 +37,25 @@ teststeps: | @@ -35,4 +37,25 @@ teststeps: | ||
35 | validate: | 37 | validate: |
36 | - eq: | 38 | - eq: |
37 | - content.data.gridResult.lists.0.shipmentsId | 39 | - content.data.gridResult.lists.0.shipmentsId |
38 | - - $shipmentsId | ||
40 | + - $shipmentsId | ||
41 | + | ||
42 | +- name: 查看实际订单详情 | ||
43 | + variables: | ||
44 | + id: ${convert_to_string($actual_id)} | ||
45 | + api: api/m_api/actual/m_order_actual_detail_api.yml | ||
46 | + extract: | ||
47 | + - product_id_1: content.data.product.0.id | ||
48 | + - product_id_2: content.data.product.1.id | ||
49 | + validate: | ||
50 | + - eq: | ||
51 | + - content.data.orderNumCount | ||
52 | + - ${add($orderNum1,$orderNum2)} | ||
53 | + - eq: | ||
54 | + - content.data.orderAmountAdjustmentCount | ||
55 | + - 4500 | ||
56 | + - eq: | ||
57 | + - content.data.product.0.orderPrice | ||
58 | + - 1500 | ||
59 | + - eq: | ||
60 | + - content.data.product.1.orderPrice | ||
61 | + - 3000 |
1 | config: | 1 | config: |
2 | - name: DIV003-事业分红详情-各个值计算正确 | 2 | + name: DIV003-事业分红详情-初始状态-各个值计算正确 |
3 | base_url: ${ENV(base_manager_url)} | 3 | base_url: ${ENV(base_manager_url)} |
4 | 4 | ||
5 | teststeps: | 5 | teststeps: |
6 | - name: 新增实际订单 | 6 | - name: 新增实际订单 |
7 | testcase: testcases/common/COM001_actual_add_testcases.yml | 7 | testcase: testcases/common/COM001_actual_add_testcases.yml |
8 | - export: | 8 | + output: |
9 | - actual_id | 9 | - actual_id |
10 | 10 | ||
11 | - name: 查看该订单的事业分红详情 | 11 | - name: 查看该订单的事业分红详情 |
@@ -14,5 +14,57 @@ teststeps: | @@ -14,5 +14,57 @@ teststeps: | ||
14 | api: api/m_api/dividends/m_dividends_detail_api.yml | 14 | api: api/m_api/dividends/m_dividends_detail_api.yml |
15 | validate: | 15 | validate: |
16 | - eq: | 16 | - eq: |
17 | - - content.msg | ||
18 | - - ok | ||
17 | + - content.data.order.id | ||
18 | + - $actual_id | ||
19 | + #####总数量 | ||
20 | + - eq: | ||
21 | + - content.data.dividendCount.orderNum | ||
22 | + - 300 | ||
23 | + #####总金额 | ||
24 | + - eq: | ||
25 | + - content.data.dividendCount.orderAmountAdjustment | ||
26 | + - 4500 | ||
27 | + ####业务员抽成 | ||
28 | + - eq: | ||
29 | + - content.data.dividendCount.expectedCommission | ||
30 | + - 225 | ||
31 | + #####合伙人应收分红总额 | ||
32 | + - eq: | ||
33 | + - content.data.dividendCount.partnerDividends | ||
34 | + - 750 | ||
35 | + #####合伙人未收分红总额 | ||
36 | + - eq: | ||
37 | + - content.data.dividendCount.notReceivedDividend | ||
38 | + - 750 | ||
39 | + #####产品1总金额 | ||
40 | + - eq: | ||
41 | + - content.data.product.0.detail.orderPrice | ||
42 | + - 1500 | ||
43 | + #####产品1应收分红 | ||
44 | + - eq: | ||
45 | + - content.data.product.0.detail.partnerDividendsReceivable | ||
46 | + - 150 | ||
47 | + #####产品1未收分红 | ||
48 | + - eq: | ||
49 | + - content.data.product.0.notReceivedDividend | ||
50 | + - 150 | ||
51 | + #####产品1分红状态 | ||
52 | + - eq: | ||
53 | + - content.data.product.0.stateOfPayment | ||
54 | + - 1 | ||
55 | + #####产品2总金额 | ||
56 | + - eq: | ||
57 | + - content.data.product.1.detail.orderPrice | ||
58 | + - 3000 | ||
59 | + #####产品2应收分红 | ||
60 | + - eq: | ||
61 | + - content.data.product.1.detail.partnerDividendsReceivable | ||
62 | + - 600 | ||
63 | + #####产品2未收分红 | ||
64 | + - eq: | ||
65 | + - content.data.product.1.notReceivedDividend | ||
66 | + - 600 | ||
67 | + #####产品2分红状态 | ||
68 | + - eq: | ||
69 | + - content.data.product.1.stateOfPayment | ||
70 | + - 1 |
1 | +config: | ||
2 | + name: DIV004-事业分红-调整数量-各个值计算正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + quantityControl: '50' | ||
6 | + stateOfPayment: 1 | ||
7 | + remark: | ||
8 | + | ||
9 | + | ||
10 | +teststeps: | ||
11 | +- name: 新增实际订单 | ||
12 | + testcase: testcases/common/COM001_actual_add_testcases.yml | ||
13 | + output: | ||
14 | + - actual_id | ||
15 | + - product_id_1 | ||
16 | + - product_id_2 | ||
17 | + | ||
18 | +- name: 编辑事业分红-数量由100调整为50 | ||
19 | + variables: | ||
20 | + id: $actual_id | ||
21 | + productId: $product_id_1 | ||
22 | + api: api/m_api/dividends/m_dividends_edit_api.yml | ||
23 | + validate: | ||
24 | + - eq: | ||
25 | + - content.msg | ||
26 | + - ok | ||
27 | + | ||
28 | +- name: 查看事业分红列表 | ||
29 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
30 | + validate: | ||
31 | + #####已支付状态=1 | ||
32 | + - eq: | ||
33 | + - content.data.gridResult.lists.0.stateOfPayment | ||
34 | + - 1 | ||
35 | + ######应收分红 | ||
36 | + - eq: | ||
37 | + - content.data.gridResult.lists.0.dividendsReceivable | ||
38 | + - 675 | ||
39 | + #####已收分红 | ||
40 | + - eq: | ||
41 | + - content.data.gridResult.lists.0.receiveDividends | ||
42 | + - 0 | ||
43 | + #####未收分红 | ||
44 | + - eq: | ||
45 | + - content.data.gridResult.lists.0.uncollectedDividends | ||
46 | + - 675 | ||
47 | + | ||
48 | + | ||
49 | +- name: 查看该订单的事业分红详情 | ||
50 | + variables: | ||
51 | + id: ${convert_to_string($actual_id)} | ||
52 | + api: api/m_api/dividends/m_dividends_detail_api.yml | ||
53 | + validate: | ||
54 | + - eq: | ||
55 | + - content.data.order.id | ||
56 | + - $actual_id | ||
57 | + #####初始总数量 | ||
58 | + - eq: | ||
59 | + - content.data.dividendCount.orderNum | ||
60 | + - 300 | ||
61 | + #####初始总金额 | ||
62 | + - eq: | ||
63 | + - content.data.dividendCount.orderAmountAdjustment | ||
64 | + - 4500 | ||
65 | + #####调整后数量 | ||
66 | + - eq: | ||
67 | + - content.data.dividendCount.orderNumControl | ||
68 | + - ${convert_to_string(250)} | ||
69 | + #####调整后总金额 | ||
70 | + - eq: | ||
71 | + - content.data.dividendCount.orderAmountAdjustmentControl | ||
72 | + - ${convert_to_string(3750)} | ||
73 | + ####业务员抽成 | ||
74 | + - eq: | ||
75 | + - content.data.dividendCount.expectedCommission | ||
76 | + - 187.5 | ||
77 | + #####合伙人应收分红总额 | ||
78 | + - eq: | ||
79 | + - content.data.dividendCount.partnerDividends | ||
80 | + - 750 | ||
81 | + #####合伙人应收分红总额调整 | ||
82 | + - eq: | ||
83 | + - content.data.dividendCount.partnerDividendsControl | ||
84 | + - ${convert_to_string(675)} | ||
85 | + #####合伙人未收分红总额 | ||
86 | + - eq: | ||
87 | + - content.data.dividendCount.notReceivedDividend | ||
88 | + - 675 | ||
89 | + #####合伙人已收分红总额 | ||
90 | + - eq: | ||
91 | + - content.data.dividendCount.receivedDividends | ||
92 | + - 0 | ||
93 | + #####产品1是否正确 | ||
94 | + - eq: | ||
95 | + - content.data.product.0.id | ||
96 | + - $product_id_1 | ||
97 | + #####产品1总金额 | ||
98 | + - eq: | ||
99 | + - content.data.product.0.detail.orderPrice | ||
100 | + - 1500 | ||
101 | + #####产品1应收分红 | ||
102 | + - eq: | ||
103 | + - content.data.product.0.detail.partnerDividendsReceivable | ||
104 | + - 150 | ||
105 | + #####产品1数量调整 | ||
106 | + - eq: | ||
107 | + - content.data.product.0.quantityControl | ||
108 | + - $quantityControl | ||
109 | + #####产品1未收分红 | ||
110 | + - eq: | ||
111 | + - content.data.product.0.notReceivedDividend | ||
112 | + - 75 | ||
113 | + #####产品1已收分红 | ||
114 | + - eq: | ||
115 | + - content.data.product.0.receivedDividends | ||
116 | + - 0 | ||
117 | + #####产品1分红调整 | ||
118 | + - eq: | ||
119 | + - content.data.product.0.partnerDividendControl | ||
120 | + - ${convert_to_string(75)} | ||
121 | + #####产品1分红状态 | ||
122 | + - eq: | ||
123 | + - content.data.product.0.stateOfPayment | ||
124 | + - 1 | ||
125 | + #####产品2总金额 | ||
126 | + - eq: | ||
127 | + - content.data.product.1.detail.orderPrice | ||
128 | + - 3000 | ||
129 | + #####产品2应收分红 | ||
130 | + - eq: | ||
131 | + - content.data.product.1.detail.partnerDividendsReceivable | ||
132 | + - 600 | ||
133 | + #####产品2未收分红 | ||
134 | + - eq: | ||
135 | + - content.data.product.1.notReceivedDividend | ||
136 | + - 600 | ||
137 | + #####产品2分红状态 | ||
138 | + - eq: | ||
139 | + - content.data.product.1.stateOfPayment | ||
140 | + - 1 | ||
141 | + | ||
142 | +- name: 查看实际订单列表 | ||
143 | + api: api/m_api/actual/m_order_actual_partner_list_api.yml | ||
144 | + validate: | ||
145 | + - eq: | ||
146 | + - content.data.gridResult.lists.0.id | ||
147 | + - $actual_id | ||
148 | + - eq: | ||
149 | + - content.data.gridResult.lists.0.orderNum | ||
150 | + - 300 | ||
151 | + - eq: | ||
152 | + - content.data.gridResult.lists.0.quantityControl | ||
153 | + - ${convert_to_string(250)} | ||
154 | + - eq: | ||
155 | + - content.data.gridResult.lists.0.orderPrice | ||
156 | + - 4500 | ||
157 | + - eq: | ||
158 | + - content.data.gridResult.lists.0.priceControl | ||
159 | + - ${convert_to_string(3750)} | ||
160 | + | ||
161 | +- name: 查看实际订单详情 | ||
162 | + variables: | ||
163 | + id: ${convert_to_string($actual_id)} | ||
164 | + api: api/m_api/actual/m_order_actual_detail_api.yml | ||
165 | + validate: | ||
166 | + - eq: | ||
167 | + - content.data.orderNumCount | ||
168 | + - 300 | ||
169 | + - eq: | ||
170 | + - content.data.orderAmountAdjustmentCount | ||
171 | + - 4500 | ||
172 | + - eq: | ||
173 | + - content.data.orderNumCountControl | ||
174 | + - ${convert_to_string(250)} | ||
175 | + - eq: | ||
176 | + - content.data.orderAmountAdjustmentCountControl | ||
177 | + - ${convert_to_string(3750)} | ||
178 | + - eq: | ||
179 | + - content.data.product.0.orderPrice | ||
180 | + - 1500 | ||
181 | + - eq: | ||
182 | + - content.data.product.0.quantityControl | ||
183 | + - $quantityControl | ||
184 | + - eq: | ||
185 | + - content.data.product.0.priceControl | ||
186 | + - ${convert_to_string(750)} | ||
187 | + - eq: | ||
188 | + - content.data.product.1.orderPrice | ||
189 | + - 3000 |
1 | +config: | ||
2 | + name: DIV005-事业分红-调整数量-更改支付状态-各个值计算正确 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + quantityControl: '50' | ||
6 | + stateOfPayment: 2 | ||
7 | + remark: | ||
8 | + | ||
9 | + | ||
10 | +teststeps: | ||
11 | +- name: 新增实际订单 | ||
12 | + testcase: testcases/common/COM001_actual_add_testcases.yml | ||
13 | + output: | ||
14 | + - actual_id | ||
15 | + - product_id_1 | ||
16 | + - product_id_2 | ||
17 | + | ||
18 | +- name: 编辑事业分红-数量由100调整为50,支付状态改为已支付 | ||
19 | + variables: | ||
20 | + id: $actual_id | ||
21 | + productId: $product_id_1 | ||
22 | + api: api/m_api/dividends/m_dividends_edit_api.yml | ||
23 | + validate: | ||
24 | + - eq: | ||
25 | + - content.msg | ||
26 | + - ok | ||
27 | + | ||
28 | +- name: 查看事业分红列表 | ||
29 | + api: api/m_api/dividends/m_dividends_list_api.yml | ||
30 | + validate: | ||
31 | + - eq: | ||
32 | + - content.data.gridResult.lists.0.stateOfPayment | ||
33 | + - 2 | ||
34 | + - eq: | ||
35 | + - content.data.gridResult.lists.0.dividendsReceivable | ||
36 | + - 675 | ||
37 | + - eq: | ||
38 | + - content.data.gridResult.lists.0.receiveDividends | ||
39 | + - 75 | ||
40 | + - eq: | ||
41 | + - content.data.gridResult.lists.0.uncollectedDividends | ||
42 | + - 600 | ||
43 | + | ||
44 | + | ||
45 | +- name: 查看该订单的事业分红详情 | ||
46 | + variables: | ||
47 | + id: ${convert_to_string($actual_id)} | ||
48 | + api: api/m_api/dividends/m_dividends_detail_api.yml | ||
49 | + validate: | ||
50 | + - eq: | ||
51 | + - content.data.order.id | ||
52 | + - $actual_id | ||
53 | + #####初始总数量 | ||
54 | + - eq: | ||
55 | + - content.data.dividendCount.orderNum | ||
56 | + - 300 | ||
57 | + #####初始总金额 | ||
58 | + - eq: | ||
59 | + - content.data.dividendCount.orderAmountAdjustment | ||
60 | + - 4500 | ||
61 | + #####调整后数量 | ||
62 | + - eq: | ||
63 | + - content.data.dividendCount.orderNumControl | ||
64 | + - ${convert_to_string(250)} | ||
65 | + #####调整后总金额 | ||
66 | + - eq: | ||
67 | + - content.data.dividendCount.orderAmountAdjustmentControl | ||
68 | + - ${convert_to_string(3750)} | ||
69 | + ####业务员抽成 | ||
70 | + - eq: | ||
71 | + - content.data.dividendCount.expectedCommission | ||
72 | + - 187.5 | ||
73 | + #####合伙人应收分红总额 | ||
74 | + - eq: | ||
75 | + - content.data.dividendCount.partnerDividends | ||
76 | + - 750 | ||
77 | + #####合伙人应收分红总额调整 | ||
78 | + - eq: | ||
79 | + - content.data.dividendCount.partnerDividendsControl | ||
80 | + - ${convert_to_string(675)} | ||
81 | + #####合伙人未收分红总额 | ||
82 | + - eq: | ||
83 | + - content.data.dividendCount.notReceivedDividend | ||
84 | + - 600 | ||
85 | + #####合伙人已收分红总额 | ||
86 | + - eq: | ||
87 | + - content.data.dividendCount.receivedDividends | ||
88 | + - 75 | ||
89 | + #####产品1是否正确 | ||
90 | + - eq: | ||
91 | + - content.data.product.0.id | ||
92 | + - $product_id_1 | ||
93 | + #####产品1总金额 | ||
94 | + - eq: | ||
95 | + - content.data.product.0.detail.orderPrice | ||
96 | + - 1500 | ||
97 | + #####产品1应收分红 | ||
98 | + - eq: | ||
99 | + - content.data.product.0.detail.partnerDividendsReceivable | ||
100 | + - 150 | ||
101 | + #####产品1数量调整 | ||
102 | + - eq: | ||
103 | + - content.data.product.0.quantityControl | ||
104 | + - $quantityControl | ||
105 | + #####产品1未收分红 | ||
106 | + - eq: | ||
107 | + - content.data.product.0.notReceivedDividend | ||
108 | + - 0 | ||
109 | + #####产品1已收分红 | ||
110 | + - eq: | ||
111 | + - content.data.product.0.receivedDividends | ||
112 | + - 75 | ||
113 | + #####产品1分红调整 | ||
114 | + - eq: | ||
115 | + - content.data.product.0.partnerDividendControl | ||
116 | + - ${convert_to_string(75)} | ||
117 | + #####产品1分红状态 | ||
118 | + - eq: | ||
119 | + - content.data.product.0.stateOfPayment | ||
120 | + - 2 | ||
121 | + #####产品2总金额 | ||
122 | + - eq: | ||
123 | + - content.data.product.1.detail.orderPrice | ||
124 | + - 3000 | ||
125 | + #####产品2应收分红 | ||
126 | + - eq: | ||
127 | + - content.data.product.1.detail.partnerDividendsReceivable | ||
128 | + - 600 | ||
129 | + #####产品2未收分红 | ||
130 | + - eq: | ||
131 | + - content.data.product.1.notReceivedDividend | ||
132 | + - 600 | ||
133 | + #####产品2分红状态 | ||
134 | + - eq: | ||
135 | + - content.data.product.1.stateOfPayment | ||
136 | + - 1 | ||
137 | + | ||
138 | +- name: 查看实际订单列表 | ||
139 | + api: api/m_api/actual/m_order_actual_partner_list_api.yml | ||
140 | + validate: | ||
141 | + - eq: | ||
142 | + - content.data.gridResult.lists.0.id | ||
143 | + - $actual_id | ||
144 | + - eq: | ||
145 | + - content.data.gridResult.lists.0.orderNum | ||
146 | + - 300 | ||
147 | + - eq: | ||
148 | + - content.data.gridResult.lists.0.quantityControl | ||
149 | + - ${convert_to_string(250)} | ||
150 | + - eq: | ||
151 | + - content.data.gridResult.lists.0.orderPrice | ||
152 | + - 4500 | ||
153 | + - eq: | ||
154 | + - content.data.gridResult.lists.0.priceControl | ||
155 | + - ${convert_to_string(3750)} | ||
156 | + | ||
157 | +- name: 查看实际订单详情 | ||
158 | + variables: | ||
159 | + id: ${convert_to_string($actual_id)} | ||
160 | + api: api/m_api/actual/m_order_actual_detail_api.yml | ||
161 | + validate: | ||
162 | + - eq: | ||
163 | + - content.data.orderNumCount | ||
164 | + - 300 | ||
165 | + - eq: | ||
166 | + - content.data.orderAmountAdjustmentCount | ||
167 | + - 4500 | ||
168 | + - eq: | ||
169 | + - content.data.orderNumCountControl | ||
170 | + - ${convert_to_string(250)} | ||
171 | + - eq: | ||
172 | + - content.data.orderAmountAdjustmentCountControl | ||
173 | + - ${convert_to_string(3750)} | ||
174 | + - eq: | ||
175 | + - content.data.product.0.orderPrice | ||
176 | + - 1500 | ||
177 | + - eq: | ||
178 | + - content.data.product.0.quantityControl | ||
179 | + - $quantityControl | ||
180 | + - eq: | ||
181 | + - content.data.product.0.priceControl | ||
182 | + - ${convert_to_string(750)} | ||
183 | + - eq: | ||
184 | + - content.data.product.1.orderPrice | ||
185 | + - 3000 |
1 | +config: | ||
2 | + name: DIV006-事业分红-已支付订单数量减少 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + stateOfPayment: 2 | ||
6 | + remark: | ||
7 | + | ||
8 | + | ||
9 | +teststeps: | ||
10 | +- name: 新增实际订单 | ||
11 | + testcase: testcases/common/COM001_actual_add_testcases.yml | ||
12 | + output: | ||
13 | + - actual_id | ||
14 | + - product_id_1 | ||
15 | + - product_id_2 | ||
16 | + | ||
17 | +- name: 编辑事业分红-支付状态改为已支付 | ||
18 | + variables: | ||
19 | + id: $actual_id | ||
20 | + productId: $product_id_1 | ||
21 | + quantityControl: '' | ||
22 | + api: api/m_api/dividends/m_dividends_edit_api.yml | ||
23 | + validate: | ||
24 | + - eq: | ||
25 | + - content.msg | ||
26 | + - ok | ||
27 | + | ||
28 | +- name: 编辑事业分红-已支付订单数量减少 | ||
29 | + variables: | ||
30 | + id: $actual_id | ||
31 | + quantityControl: '60' | ||
32 | + stateOfPayment: 2 | ||
33 | + productId: $product_id_1 | ||
34 | + api: api/m_api/dividends/m_dividends_edit_api.yml | ||
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 | + - eq: | ||
44 | + - content.data.gridResult.lists.0.stateOfPayment | ||
45 | + - 2 | ||
46 | + ####应收分红 | ||
47 | + - eq: | ||
48 | + - content.data.gridResult.lists.0.dividendsReceivable | ||
49 | + - 690 | ||
50 | + ####已收分红 | ||
51 | + - eq: | ||
52 | + - content.data.gridResult.lists.0.receiveDividends | ||
53 | + - 150 | ||
54 | + ####未收分红 | ||
55 | + - eq: | ||
56 | + - content.data.gridResult.lists.0.uncollectedDividends | ||
57 | + - 600 | ||
58 | + ####分红支出 | ||
59 | + - eq: | ||
60 | + - content.data.gridResult.lists.0.dividendSpending | ||
61 | + - 60 | ||
62 | + | ||
63 | + | ||
64 | +- name: 查看该订单的事业分红详情 | ||
65 | + variables: | ||
66 | + id: ${convert_to_string($actual_id)} | ||
67 | + api: api/m_api/dividends/m_dividends_detail_api.yml | ||
68 | + validate: | ||
69 | + - eq: | ||
70 | + - content.data.order.id | ||
71 | + - $actual_id | ||
72 | + #####初始总数量 | ||
73 | + - eq: | ||
74 | + - content.data.dividendCount.orderNum | ||
75 | + - 300 | ||
76 | + #####初始总金额 | ||
77 | + - eq: | ||
78 | + - content.data.dividendCount.orderAmountAdjustment | ||
79 | + - 4500 | ||
80 | + #####调整后数量 | ||
81 | + - eq: | ||
82 | + - content.data.dividendCount.orderNumControl | ||
83 | + - ${convert_to_string(260)} | ||
84 | + #####调整后总金额 | ||
85 | + - eq: | ||
86 | + - content.data.dividendCount.orderAmountAdjustmentControl | ||
87 | + - ${convert_to_string(3900)} | ||
88 | + ####业务员抽成 | ||
89 | + - eq: | ||
90 | + - content.data.dividendCount.expectedCommission | ||
91 | + - 195 | ||
92 | + #####合伙人应收分红总额 | ||
93 | + - eq: | ||
94 | + - content.data.dividendCount.partnerDividends | ||
95 | + - 750 | ||
96 | + #####合伙人应收分红总额调整 | ||
97 | + - eq: | ||
98 | + - content.data.dividendCount.partnerDividendsControl | ||
99 | + - ${convert_to_string(690)} | ||
100 | + #####合伙人未收分红总额 | ||
101 | + - eq: | ||
102 | + - content.data.dividendCount.notReceivedDividend | ||
103 | + - 600 | ||
104 | + #####合伙人已收分红总额 | ||
105 | + - eq: | ||
106 | + - content.data.dividendCount.receivedDividends | ||
107 | + - 150 | ||
108 | + #####合伙人分红支出 | ||
109 | + - eq: | ||
110 | + - content.data.dividendCount.dividendSpending | ||
111 | + - 60 | ||
112 | + #####产品1是否正确 | ||
113 | + - eq: | ||
114 | + - content.data.product.0.id | ||
115 | + - $product_id_1 | ||
116 | + #####产品1总金额 | ||
117 | + - eq: | ||
118 | + - content.data.product.0.detail.orderPrice | ||
119 | + - 1500 | ||
120 | + #####产品1应收分红 | ||
121 | + - eq: | ||
122 | + - content.data.product.0.detail.partnerDividendsReceivable | ||
123 | + - 150 | ||
124 | + #####产品1数量调整 | ||
125 | + - eq: | ||
126 | + - content.data.product.0.quantityControl | ||
127 | + - ${convert_to_string(60)} | ||
128 | + #####产品1金额调整 | ||
129 | + - eq: | ||
130 | + - content.data.product.0.amountControl | ||
131 | + - ${convert_to_string(900)} | ||
132 | + #####产品1分红调整 | ||
133 | + - eq: | ||
134 | + - content.data.product.0.partnerDividendControl | ||
135 | + - ${convert_to_string(90)} | ||
136 | + #####产品1未收分红 | ||
137 | + - eq: | ||
138 | + - content.data.product.0.notReceivedDividend | ||
139 | + - 0 | ||
140 | + #####产品1已收分红 | ||
141 | + - eq: | ||
142 | + - content.data.product.0.receivedDividends | ||
143 | + - 150 | ||
144 | + #####产品1分红支出 | ||
145 | + - eq: | ||
146 | + - content.data.product.0.dividendSpending | ||
147 | + - 60 | ||
148 | + #####产品1分红状态 | ||
149 | + - eq: | ||
150 | + - content.data.product.0.stateOfPayment | ||
151 | + - 2 | ||
152 | + #####产品2总金额 | ||
153 | + - eq: | ||
154 | + - content.data.product.1.detail.orderPrice | ||
155 | + - 3000 | ||
156 | + #####产品2应收分红 | ||
157 | + - eq: | ||
158 | + - content.data.product.1.detail.partnerDividendsReceivable | ||
159 | + - 600 | ||
160 | + #####产品2未收分红 | ||
161 | + - eq: | ||
162 | + - content.data.product.1.notReceivedDividend | ||
163 | + - 600 | ||
164 | + #####产品2分红状态 | ||
165 | + - eq: | ||
166 | + - content.data.product.1.stateOfPayment | ||
167 | + - 1 | ||
168 | + | ||
169 | +- name: 查看实际订单列表 | ||
170 | + api: api/m_api/actual/m_order_actual_partner_list_api.yml | ||
171 | + validate: | ||
172 | + - eq: | ||
173 | + - content.data.gridResult.lists.0.id | ||
174 | + - $actual_id | ||
175 | + ###订单数量 | ||
176 | + - eq: | ||
177 | + - content.data.gridResult.lists.0.orderNum | ||
178 | + - 300 | ||
179 | + ####订单数量调整 | ||
180 | + - eq: | ||
181 | + - content.data.gridResult.lists.0.quantityControl | ||
182 | + - ${convert_to_string(260)} | ||
183 | + ####订单金额 | ||
184 | + - eq: | ||
185 | + - content.data.gridResult.lists.0.orderPrice | ||
186 | + - 4500 | ||
187 | + ####订单金额调整 | ||
188 | + - eq: | ||
189 | + - content.data.gridResult.lists.0.priceControl | ||
190 | + - ${convert_to_string(3900)} | ||
191 | + | ||
192 | +- name: 查看实际订单详情 | ||
193 | + variables: | ||
194 | + id: ${convert_to_string($actual_id)} | ||
195 | + api: api/m_api/actual/m_order_actual_detail_api.yml | ||
196 | + validate: | ||
197 | + - eq: | ||
198 | + - content.data.orderNumCount | ||
199 | + - 300 | ||
200 | + - eq: | ||
201 | + - content.data.orderAmountAdjustmentCount | ||
202 | + - 4500 | ||
203 | + - eq: | ||
204 | + - content.data.orderNumCountControl | ||
205 | + - ${convert_to_string(260)} | ||
206 | + - eq: | ||
207 | + - content.data.orderAmountAdjustmentCountControl | ||
208 | + - ${convert_to_string(3900)} | ||
209 | + - eq: | ||
210 | + - content.data.product.0.orderPrice | ||
211 | + - 1500 | ||
212 | + - eq: | ||
213 | + - content.data.product.0.quantityControl | ||
214 | + - ${convert_to_string(60)} | ||
215 | + - eq: | ||
216 | + - content.data.product.0.priceControl | ||
217 | + - ${convert_to_string(900)} | ||
218 | + - eq: | ||
219 | + - content.data.product.1.orderPrice | ||
220 | + - 3000 |
不能预览此文件类型
1 | config: | 1 | config: |
2 | name: 合伙人测试集 | 2 | name: 合伙人测试集 |
3 | testcases: | 3 | testcases: |
4 | -#- name: ADMIN001:新增管理员 | ||
5 | -# testcase: testcases/admin/ADMIN001_add_admin_testcases.yml | ||
6 | -# parameters: | ||
7 | -# account: ${create_phone_number(1)} | ||
8 | -# | ||
9 | -#- name: ADMIN002:编辑管理员 | ||
10 | -# testcase: testcases/admin/ADMIN002_edit_admin_testcases.yml | ||
11 | -# | ||
12 | -#- name: ADMIN003:搜索管理员 | ||
13 | -# testcase: testcases/admin/ADMIN003_list_admin_testcases.yml | ||
14 | -# | ||
15 | -#- name: ADMIN004:查看管理员 | ||
16 | -# testcase: testcases/admin/ADMIN004_detail_admin_testcases.yml | ||
17 | -# | ||
18 | -#- name: ADMIN005:禁用管理员 | ||
19 | -# testcase: testcases/admin/ADMIN005_forbidden_admin_testcases.yml | ||
20 | -# | ||
21 | -#- name: ADMIN006:启用管理员 | ||
22 | -# testcase: testcases/admin/ADMIN006_forbidden_admin_testcases.yml | ||
23 | 4 | ||
24 | -- name: PARTNERS001:新增合伙人 | ||
25 | - testcase: testcases/partners/PARTNERS001_add_partner_testcases.yml | ||
26 | - parameters: | ||
27 | - account: ${create_phone_number(1)} | 5 | +############################分红管理模块开始################################# |
6 | +- name: DIV001-事业分红列表-数据源来自于实发订单 | ||
7 | + testcase: testcases/dividends/DIV001_dividendslist_testcases.yml | ||
28 | 8 | ||
29 | -#- name: PARTNERS002:编辑合伙人 | ||
30 | -# testcase: testcases/partners/PARTNERS002_edit_partner_testcases.yml | ||
31 | -# | ||
32 | -#- name: PARTNERS003:搜索合伙类型 | ||
33 | -# testcase: testcases/partners/PARTNERS003_list_partner_testcases.yml | ||
34 | -# | ||
35 | -#- name: PARTNERS004:搜索合伙人名称 | ||
36 | -# testcase: testcases/partners/PARTNERS004_list_partner_testcases.yml | ||
37 | -# | ||
38 | -#- name: PARTNERS005:查看合伙人 | ||
39 | -# testcase: testcases/partners/PARTNERS005_detail_partner_testcases.yml | ||
40 | -# | ||
41 | -#- name: PARTNERS006:禁用合伙人 | ||
42 | -# testcase: testcases/partners/PARTNERS006_set-status_partner1_testcases.yml | ||
43 | -# | ||
44 | -#- name: PARTNERS006:启用合伙人 | ||
45 | -# testcase: testcases/partners/PARTNERS007_set-status_partner2_testcases.yml | ||
46 | -# | ||
47 | -#- name: ACTUAL001:新增实际订单 | ||
48 | -# testcase: testcases/actual/ACTUAL001_add_actual_testcases.yml | ||
49 | -# parameters: | ||
50 | -# account: ${create_phone_number(1)} | ||
51 | -# | ||
52 | -#- name: ACTUAL003:合伙人搜索——实际订单列表 | ||
53 | -# testcase: testcases/actual/ACTUAL003_actual_list_testcases.yml | ||
54 | -# | ||
55 | -#- name: ACTUAL004:搜索发货单号——实际订单列表 | ||
56 | -# testcase: testcases/actual/ACTUAL004_actual_list_testcases.yml | ||
57 | -# | ||
58 | -#- name: ACTUAL005:查看实际订单详情 | ||
59 | -# testcase: testcases/actual/ACTUAL005_actual_detail_testcases.yml | ||
60 | -# | ||
61 | -#- name: ACTUAL006:删除实际订单 | ||
62 | -# testcase: testcases/actual/ACTUAL006_actual_del_testcases.yml | ||
63 | -# | ||
64 | -#- name: PURPOSE001:新增意向订单 | ||
65 | -# testcase: testcases/purpose/PURPOSE001_add_purpose_testcases.yml | ||
66 | -# parameters: | ||
67 | -# account: ${create_phone_number(1)} | ||
68 | -# | ||
69 | -#- name: PURPOSE002:编辑意向订单 | ||
70 | -# testcase: testcases/purpose/PURPOSE002_edit_purpose_testcases.yml | ||
71 | -# | ||
72 | -#- name: PURPOSE003:合伙人搜索——意向订单列表 | ||
73 | -# testcase: testcases/purpose/PURPOSE003_purpose_list_testcases.yml | ||
74 | -# | ||
75 | -#- name: PURPOSE004:搜索订单号——意向订单列表 | ||
76 | -# testcase: testcases/purpose/PURPOSE003_purpose_list_testcases.yml | ||
77 | -# | ||
78 | -#- name: PURPOSE005:意向订单发货 | ||
79 | -# testcase: testcases/purpose/PURPOSE005_purpose_sendout_testcases.yml | ||
80 | -# | ||
81 | -#- name: PURPOSE006:查看意向订单详情 | ||
82 | -# testcase: testcases/purpose/PURPOSE006_purpose_detail_testcases.yml | ||
83 | -# | ||
84 | -#- name: ACTUAL007:删除意向订单 | ||
85 | -# testcase: testcases/purpose/PURPOSE007_purpose_del_testcases.yml | ||
86 | -# | ||
87 | -#- name: dividends:分红管理-编辑 | ||
88 | -# testcase: testcases/dividends/dividend_edit_testcases.yml | ||
89 | -# | ||
90 | -#- name: statistics:订单统计 | ||
91 | -# testcase: testcases/order/order_statistics_testcases.yml | ||
92 | -# | ||
93 | -#- name: statistics:订单详情 | ||
94 | -# testcase: testcases/order/order_details_testcases.yml | ||
95 | -# | ||
96 | -#- name: statistics:分红统计 | ||
97 | -# testcase: testcases/dividend/dividend_statistics_testcases.yml | ||
98 | -# | ||
99 | -#- name: orders001:已收明细——分红订单 | ||
100 | -# testcase: testcases/dividend/dividend_orders001_testcases.yml | ||
101 | -# | ||
102 | -#- name: orders002:未收明细——分红订单 | ||
103 | -# testcase: testcases/dividend/dividend_orders002_testcases.yml | ||
104 | -# | ||
105 | -#- name: list:实发订单列表 | ||
106 | -# testcase: testcases/order/order_list_testcases.yml | ||
9 | +- name: DIV002-事业分红列表-数据源不来自于意向订单 | ||
10 | + testcase: testcases/dividends/DIV002_dividendslist_testcases.yml | ||
11 | + | ||
12 | +- name: DIV003-事业分红详情-初始状态-各个值计算正确 | ||
13 | + testcase: testcases/dividends/DIV003_dividends_cal_testcases.yml | ||
14 | + | ||
15 | +- name: DIV004-事业分红-调整数量-各个值计算正确 | ||
16 | + testcase: testcases/dividends/DIV004_dividends_editnum_testcases.yml | ||
17 | + | ||
18 | +- name: DIV005-事业分红-调整数量-更改支付状态-各个值计算正确 | ||
19 | + testcase: testcases/dividends/DIV005_dividends_edit_num_pay_testcases.yml | ||
20 | + | ||
21 | +- name: DIV006-事业分红-已支付订单数量减少 | ||
22 | + testcase: testcases/dividends/DIV006_dividends_edit_num_testcases.yml | ||
23 | +############################分红管理模块结束################################## | ||
24 | + | ||
25 | +- name: ACT001-实际订单-各个值计算正确 | ||
26 | + testcase: testcases/order/actual/ACT001_actual_detail_testcases.yml | ||
27 | + | ||
28 | +- name: PUR001-意向订单-各个值计算正确 | ||
29 | + testcase: testcases/order/purpose/PUR001_pur_detail_testcases.yml |
-
请 注册 或 登录 后发表评论