PUR002_pur_sendout_testcases.yml
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
config:
name: PUR002-意向订单-发货
base_url: ${ENV(base_manager_url)}
variables:
orderId: '意向订单号${get_stringcode(5)}'
partnerID: 1047
commissionProportion: 5
orderNum1: 100
univalence: 15
partnerRatio: 10
orderNum2: 200
output:
- pur_id
- product_id_1
- product_id_2
teststeps:
- name: $phone 登录系统
variables:
phone: ${ENV(adminphone)}
testcase: testcases/common/m_login_testcases.yml
- name: 新增意向订单
api: api/m_api/purpose/m_order_purpose_add_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看意向订单列表,存在刚刚新增的意向订单
api: api/m_api/purpose/m_order_purpose_partner_list_api.yml
extract:
- pur_id: content.data.gridResult.lists.0.id
validate:
- eq:
- content.data.gridResult.lists.0.orderId
- $orderId
- name: 查看意向订单详情
variables:
id: ${convert_to_string($pur_id)}
api: api/m_api/purpose/m_order_purpose_detail_api.yml
extract:
- product_id_1: content.data.product.0.id
- product_id_2: content.data.product.1.id
validate:
- eq:
- content.data.orderNumCount
- ${add($orderNum1,$orderNum2)}
- eq:
- content.data.orderAmountAdjustmentCount
- 4500
- eq:
- content.data.product.0.orderPrice
- 1500
- eq:
- content.data.product.1.orderPrice
- 3000
- name: 意向订单发货
variables:
order_id: $pur_id
product_id: $product_id_1
api: api/m_api/purpose/m_order_purpose_sendout_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看意向订单列表,不存在刚刚新增的意向订单
api: api/m_api/purpose/m_order_purpose_partner_list_api.yml
extract:
- pur_id: content.data.gridResult.lists.0.id
validate:
- not_equals:
- content.data.gridResult.lists.0.orderId
- $orderId
- name: 查看实际订单列表,存在刚刚新增的意向订单
api: api/m_api/actual/m_order_actual_partner_list_api.yml
extract:
- actual_id: content.data.gridResult.lists.0.id
validate:
- eq:
- content.data.gridResult.lists.0.orderId
- $orderId
- eq:
- content.msg
- ok