作者 dengyuting

fix

name: 查看订单状态
base_url: ${ENV(base_manager_url)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
id:
method: POST
url: /v1/common/orderType
validate:
- eq:
- content.msg
- ok
\ No newline at end of file
... ...
name: 意向订单发货
base_url: ${ENV(base_manager_url)}
#variables:
variables:
# orderid: ${get_purpose_id_from_database()}
# id: 1026
order_id: 1026
product_id: 2048
request:
headers:
Content-Type: application/json;charset=utf-8
... ... @@ -10,13 +11,13 @@ request:
Authorization: Bearer ${get_m_accesstoken()}
json:
shipmentsId: '意向订单发货${get_nowtime()}'
id: '1026'
id: ${convert_to_string($order_id)}
productDetail:
- productName: '意向订单发货产品名称${get_stringcode(5)}'
orderNum: 105
univalence: 15.5
partnerRatio: 10.5
id: 2048
orderNum: 300
univalence: 15
partnerRatio: 15
id: $product_id
method: POST
url: /v1/order/purpose/sendout
validate:
... ...
config:
name: COM002-新增意向订单
base_url: ${ENV(base_manager_url)}
variables:
orderId: '意向订单号${get_nowtime()}'
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
\ No newline at end of file
... ...
config:
name: PUR002-意向订单-发货
base_url: ${ENV(base_manager_url)}
variables:
orderId: '意向订单号${get_nowtime()}'
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
\ No newline at end of file
... ...
... ... @@ -30,3 +30,6 @@ testcases:
- name: PUR001-意向订单-各个值计算正确
testcase: testcases/order/purpose/PUR001_pur_detail_testcases.yml
- name: PUR002-意向订单-发货
testcase: testcases/order/purpose/PUR002_pur_sendout_testcases.yml
... ...