正在显示
6 个修改的文件
包含
175 行增加
和
7 行删除
api/m_api/common/common_orderType_api.yml
0 → 100644
1 | +name: 查看订单状态 | ||
2 | +base_url: ${ENV(base_manager_url)} | ||
3 | +request: | ||
4 | + headers: | ||
5 | + Content-Type: application/json;charset=utf-8 | ||
6 | + User-Agent: okhttp/3.12.3 | ||
7 | + Authorization: Bearer ${get_m_accesstoken()} | ||
8 | + json: | ||
9 | + id: | ||
10 | + method: POST | ||
11 | + url: /v1/common/orderType | ||
12 | +validate: | ||
13 | + - eq: | ||
14 | + - content.msg | ||
15 | + - ok |
1 | name: 意向订单发货 | 1 | name: 意向订单发货 |
2 | base_url: ${ENV(base_manager_url)} | 2 | base_url: ${ENV(base_manager_url)} |
3 | -#variables: | 3 | +variables: |
4 | # orderid: ${get_purpose_id_from_database()} | 4 | # orderid: ${get_purpose_id_from_database()} |
5 | -# id: 1026 | 5 | + order_id: 1026 |
6 | + product_id: 2048 | ||
6 | request: | 7 | request: |
7 | headers: | 8 | headers: |
8 | Content-Type: application/json;charset=utf-8 | 9 | Content-Type: application/json;charset=utf-8 |
@@ -10,13 +11,13 @@ request: | @@ -10,13 +11,13 @@ request: | ||
10 | Authorization: Bearer ${get_m_accesstoken()} | 11 | Authorization: Bearer ${get_m_accesstoken()} |
11 | json: | 12 | json: |
12 | shipmentsId: '意向订单发货${get_nowtime()}' | 13 | shipmentsId: '意向订单发货${get_nowtime()}' |
13 | - id: '1026' | 14 | + id: ${convert_to_string($order_id)} |
14 | productDetail: | 15 | productDetail: |
15 | - productName: '意向订单发货产品名称${get_stringcode(5)}' | 16 | - productName: '意向订单发货产品名称${get_stringcode(5)}' |
16 | - orderNum: 105 | ||
17 | - univalence: 15.5 | ||
18 | - partnerRatio: 10.5 | ||
19 | - id: 2048 | 17 | + orderNum: 300 |
18 | + univalence: 15 | ||
19 | + partnerRatio: 15 | ||
20 | + id: $product_id | ||
20 | method: POST | 21 | method: POST |
21 | url: /v1/order/purpose/sendout | 22 | url: /v1/order/purpose/sendout |
22 | validate: | 23 | validate: |
1 | +config: | ||
2 | + name: COM002-新增意向订单 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + orderId: '意向订单号${get_nowtime()}' | ||
6 | + partnerID: 1047 | ||
7 | + commissionProportion: 5 | ||
8 | + orderNum1: 100 | ||
9 | + univalence: 15 | ||
10 | + partnerRatio: 10 | ||
11 | + orderNum2: 200 | ||
12 | + output: | ||
13 | + - pur_id | ||
14 | + - product_id_1 | ||
15 | + - product_id_2 | ||
16 | + | ||
17 | + | ||
18 | +teststeps: | ||
19 | +- name: $phone 登录系统 | ||
20 | + variables: | ||
21 | + phone: ${ENV(adminphone)} | ||
22 | + testcase: testcases/common/m_login_testcases.yml | ||
23 | + | ||
24 | +- name: 新增意向订单 | ||
25 | + api: api/m_api/purpose/m_order_purpose_add_api.yml | ||
26 | + validate: | ||
27 | + - eq: | ||
28 | + - content.msg | ||
29 | + - ok | ||
30 | + | ||
31 | +- name: 查看意向订单列表 | ||
32 | + api: api/m_api/purpose/m_order_purpose_partner_list_api.yml | ||
33 | + extract: | ||
34 | + - pur_id: content.data.gridResult.lists.0.id | ||
35 | + validate: | ||
36 | + - eq: | ||
37 | + - content.data.gridResult.lists.0.orderId | ||
38 | + - $orderId | ||
39 | + | ||
40 | +- name: 查看意向订单详情 | ||
41 | + variables: | ||
42 | + id: ${convert_to_string($pur_id)} | ||
43 | + api: api/m_api/purpose/m_order_purpose_detail_api.yml | ||
44 | + extract: | ||
45 | + - product_id_1: content.data.product.0.id | ||
46 | + - product_id_2: content.data.product.1.id | ||
47 | + validate: | ||
48 | + - eq: | ||
49 | + - content.data.orderNumCount | ||
50 | + - ${add($orderNum1,$orderNum2)} | ||
51 | + - eq: | ||
52 | + - content.data.orderAmountAdjustmentCount | ||
53 | + - 4500 | ||
54 | + - eq: | ||
55 | + - content.data.product.0.orderPrice | ||
56 | + - 1500 | ||
57 | + - eq: | ||
58 | + - content.data.product.1.orderPrice | ||
59 | + - 3000 |
1 | +config: | ||
2 | + name: PUR002-意向订单-发货 | ||
3 | + base_url: ${ENV(base_manager_url)} | ||
4 | + variables: | ||
5 | + orderId: '意向订单号${get_nowtime()}' | ||
6 | + partnerID: 1047 | ||
7 | + commissionProportion: 5 | ||
8 | + orderNum1: 100 | ||
9 | + univalence: 15 | ||
10 | + partnerRatio: 10 | ||
11 | + orderNum2: 200 | ||
12 | + output: | ||
13 | + - pur_id | ||
14 | + - product_id_1 | ||
15 | + - product_id_2 | ||
16 | + | ||
17 | + | ||
18 | +teststeps: | ||
19 | +- name: $phone 登录系统 | ||
20 | + variables: | ||
21 | + phone: ${ENV(adminphone)} | ||
22 | + testcase: testcases/common/m_login_testcases.yml | ||
23 | + | ||
24 | +- name: 新增意向订单 | ||
25 | + api: api/m_api/purpose/m_order_purpose_add_api.yml | ||
26 | + validate: | ||
27 | + - eq: | ||
28 | + - content.msg | ||
29 | + - ok | ||
30 | + | ||
31 | +- name: 查看意向订单列表,存在刚刚新增的意向订单 | ||
32 | + api: api/m_api/purpose/m_order_purpose_partner_list_api.yml | ||
33 | + extract: | ||
34 | + - pur_id: content.data.gridResult.lists.0.id | ||
35 | + validate: | ||
36 | + - eq: | ||
37 | + - content.data.gridResult.lists.0.orderId | ||
38 | + - $orderId | ||
39 | + | ||
40 | +- name: 查看意向订单详情 | ||
41 | + variables: | ||
42 | + id: ${convert_to_string($pur_id)} | ||
43 | + api: api/m_api/purpose/m_order_purpose_detail_api.yml | ||
44 | + extract: | ||
45 | + - product_id_1: content.data.product.0.id | ||
46 | + - product_id_2: content.data.product.1.id | ||
47 | + validate: | ||
48 | + - eq: | ||
49 | + - content.data.orderNumCount | ||
50 | + - ${add($orderNum1,$orderNum2)} | ||
51 | + - eq: | ||
52 | + - content.data.orderAmountAdjustmentCount | ||
53 | + - 4500 | ||
54 | + - eq: | ||
55 | + - content.data.product.0.orderPrice | ||
56 | + - 1500 | ||
57 | + - eq: | ||
58 | + - content.data.product.1.orderPrice | ||
59 | + - 3000 | ||
60 | + | ||
61 | +- name: 意向订单发货 | ||
62 | + variables: | ||
63 | + order_id: $pur_id | ||
64 | + product_id: $product_id_1 | ||
65 | + api: api/m_api/purpose/m_order_purpose_sendout_api.yml | ||
66 | + validate: | ||
67 | + - eq: | ||
68 | + - content.msg | ||
69 | + - ok | ||
70 | + | ||
71 | +- name: 查看意向订单列表,不存在刚刚新增的意向订单 | ||
72 | + api: api/m_api/purpose/m_order_purpose_partner_list_api.yml | ||
73 | + extract: | ||
74 | + - pur_id: content.data.gridResult.lists.0.id | ||
75 | + validate: | ||
76 | + - not_equals: | ||
77 | + - content.data.gridResult.lists.0.orderId | ||
78 | + - $orderId | ||
79 | + | ||
80 | +- name: 查看实际订单列表 | ||
81 | + api: api/m_api/actual/m_order_actual_partner_list_api.yml | ||
82 | + extract: | ||
83 | + - actual_id: content.data.gridResult.lists.0.id | ||
84 | + validate: | ||
85 | + - eq: | ||
86 | + - content.data.gridResult.lists.0.orderId | ||
87 | + - $orderId | ||
88 | + - eq: | ||
89 | + - content.msg | ||
90 | + - ok |
不能预览此文件类型
@@ -30,3 +30,6 @@ testcases: | @@ -30,3 +30,6 @@ testcases: | ||
30 | 30 | ||
31 | - name: PUR001-意向订单-各个值计算正确 | 31 | - name: PUR001-意向订单-各个值计算正确 |
32 | testcase: testcases/order/purpose/PUR001_pur_detail_testcases.yml | 32 | testcase: testcases/order/purpose/PUR001_pur_detail_testcases.yml |
33 | + | ||
34 | +- name: PUR002-意向订单-发货 | ||
35 | + testcase: testcases/order/purpose/PUR002_pur_sendout_testcases.yml |
-
请 注册 或 登录 后发表评论