作者 dengyuting

add

name: 分红管理—修改数量or合伙人分红比例
base_url: ${ENV(base_manager_url)}
variables:
orderId: ${convert_to_string(1072)}
state: 1
goodNumber: 50
partnerBonusPercent: 10
reason: '修改原因${get_stringcode(5)}'
productId: ${convert_to_string(2132)}
teardown_hooks:
- ${sleep(1)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
orderId: $orderId
state: $state
goodNumber: $goodNumber
partnerBonusPercent: $partnerBonusPercent
reason: $reason
productId: $productId
method: POST
url: /v1/dividends/modify
# extract:
# - num: content.data.gridResult.totalRow
validate:
- eq:
- content.msg
- ok
... ...
name: 分红管理—支付分红
base_url: ${ENV(base_manager_url)}
variables:
orderId: ${convert_to_string(1072)}
productId: ${convert_to_string(2132)}
teardown_hooks:
- ${sleep(1)}
request:
headers:
Content-Type: application/json;charset=utf-8
User-Agent: okhttp/3.12.3
Authorization: Bearer ${get_m_accesstoken()}
json:
orderId: $orderId
productId: $productId
method: POST
url: /v1/dividends/payDividends
# extract:
# - num: content.data.gridResult.totalRow
validate:
- eq:
- content.msg
- ok
... ...
config:
name: DIV001-事业分红列表-数据源来自于实发订单
name: DIV001-分红列表-数据源来自于实发订单
base_url: ${ENV(base_manager_url)}
teststeps:
... ...
config:
name: DIV002-事业分红列表-数据源不来自于意向订单
name: DIV002-分红列表-数据源不来自于意向订单
base_url: ${ENV(base_manager_url)}
teststeps:
... ...
config:
name: DIV003_1-分红管理-初始状态-各个值计算正确
base_url: ${ENV(base_manager_url)}
variables:
partnerID: 1047
commissionProportion: 5
orderNum1: 100
univalence: 15
partnerRatio: 10
orderNum2: 200
# partnerRatio2: 20
teststeps:
- name: 新增实际订单
testcase: testcases/common/COM001_actual_add_testcases.yml
output:
- actual_id
- name: 查看该订单的分红详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/dividends/m_dividends_detail_api.yml
validate:
- eq:
- content.data.order.id
- ${convert_to_string($actual_id)}
#####合伙人应收分红总额
- eq:
- content.data.order.partnerDividends
- ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
#####合伙人已收分红总额
- eq:
- content.data.order.receivedDividends
- 0
#####合伙人未收分红总额
- eq:
- content.data.order.notReceivedDividend
- ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
#####合伙人分红支出总额
- eq:
- content.data.order.dividendSpending
- 0
#####订单类型
- eq:
- content.data.order.orderType
- 1
#####产品1总金额
- eq:
- content.data.product.0.detail.commodityPrice
- ${convert_to_string(1500)}
#####产品1应收分红
- eq:
- content.data.product.0.detail.partnerDividends
- ${cal_Ratio($partnerRatio, $univalence, $orderNum1)}
#####产品1分红状态
- eq:
- content.data.product.0.paymentStatus
- 1
#####产品2总金额
- eq:
- content.data.product.1.detail.commodityPrice
- ${convert_to_string(3000)}
#####产品2应收分红
- eq:
- content.data.product.1.detail.partnerDividends
- ${cal_Ratio($partnerRatio, $univalence, $orderNum2)}
#####产品2分红状态
- eq:
- content.data.product.1.stateOfPayment
- 1
#####订单总数量
- eq:
- content.data.product.orderNumCount
- ${add($orderNum1,$orderNum2)}
#####总金额
- eq:
- content.data.product.orderAmountAdjustmentCount
- ${cal_orderPrice($univalence, $orderNum1, $orderNum2)}
####合伙人应收分红合计
- eq:
- content.data.product.partnerDividendsCount
- ${cal_Ratio($partnerRatio, $univalence, $orderNum1, $orderNum2)}
\ No newline at end of file
... ...
config:
name: DIV003-事业分红详情-初始状态-各个值计算正确
name: DIV003-分红管理-初始状态-各个值计算正确
base_url: ${ENV(base_manager_url)}
variables:
partnerID: 1047
... ...
config:
name: DIV004_1-分红管理-调整数量由100改为50-各个值计算正确
base_url: ${ENV(base_manager_url)}
variables:
goodNumber: 50
teststeps:
- name: 新增实际订单
testcase: testcases/common/COM001_actual_add_testcases.yml
output:
- actual_id
- product_id_1
- product_id_2
- name: 编辑分红-数量由100调整为50
variables:
orderId: ${convert_to_string($actual_id)}
state: 1
partnerBonusPercent: 10
reason: '修改原因${get_stringcode(5)}'
productId: ${convert_to_string($product_id_1)}
api: api/m_api/dividends/m_dividends_modify_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
#####已支付状态=1
- eq:
- content.data.gridResult.lists.0.stateOfPayment
- 1
######应收分红
- eq:
- content.data.gridResult.lists.0.dividendsReceivable
- ${convert_to_string(375)}
#####已收分红
- eq:
- content.data.gridResult.lists.0.receiveDividends
- ${convert_to_string(0)}
#####未收分红
- eq:
- content.data.gridResult.lists.0.uncollectedDividends
- ${convert_to_string(375)}
- name: 查看该订单的分红详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/dividends/m_dividends_detail_api.yml
validate:
- eq:
- content.data.order.id
- ${convert_to_string($actual_id)}
#####合伙人未收分红总额
- eq:
- content.data.order.notReceivedDividend
- 0
#####合伙人已收分红总额
- eq:
- content.data.order.receivedDividends
- 0
#####合伙人应收分红总额
- eq:
- content.data.order.partnerDividends
- 375
#####合伙人分红支出总额
- eq:
- content.data.order.dividendSpending
- 0
#####初始总数量
- eq:
- content.data.product.orderNumCount
- 250
#####初始总金额
- eq:
- content.data.product.orderAmountAdjustmentCount
- 3750
#####合伙人应收分红总额调整
- eq:
- content.data.product.partnerDividendsCount
- 375
#####产品1是否正确
- eq:
- content.data.product.0.id
- $product_id_1
#####产品1总金额
- eq:
- content.data.product.0.detail.commodityPrice
- 750
#####产品1应收分红
- eq:
- content.data.product.0.detail.partnerDividends
- 75
#####产品1数量调整
- eq:
- content.data.product.0.orderNum
- $goodNumber
#####产品1分红状态
- eq:
- content.data.product.0.stateOfPayment
- 1
#####产品2总金额
- eq:
- content.data.product.1.detail.commodityPrice
- 3000
#####产品2应收分红
- eq:
- content.data.product.1.detail.partnerDividends
- 300
#####产品2分红状态
- eq:
- content.data.product.1.stateOfPayment
- 1
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
validate:
- eq:
- content.data.gridResult.lists.0.id
- $actual_id
- eq:
- content.data.gridResult.lists.0.orderNum
- 300
- eq:
- content.data.gridResult.lists.0.quantityControl
- ${convert_to_string(250)}
- eq:
- content.data.gridResult.lists.0.orderPrice
- 4500
- eq:
- content.data.gridResult.lists.0.priceControl
- ${convert_to_string(3750)}
- name: 查看实际订单详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/actual/m_order_actual_detail_api.yml
validate:
- eq:
- content.data.orderNumCount
- 300
- eq:
- content.data.orderAmountAdjustmentCount
- 4500
- eq:
- content.data.orderNumCountControl
- ${convert_to_string(250)}
- eq:
- content.data.orderAmountAdjustmentCountControl
- ${convert_to_string(3750)}
- eq:
- content.data.product.0.orderPrice
- 1500
- eq:
- content.data.product.0.quantityControl
- $goodNumber
- eq:
- content.data.product.0.priceControl
- ${convert_to_string(750)}
- eq:
- content.data.product.1.orderPrice
- 3000
\ No newline at end of file
... ...
config:
name: DIV004-事业分红-调整数量-各个值计算正确
name: DIV004-分红管理-调整数量由100改为50-各个值计算正确
base_url: ${ENV(base_manager_url)}
variables:
quantityControl: '50'
... ...
config:
name: DIV005-事业分红-调整数量-更改支付状态-各个值计算正确
name: DIV005-分红管理-调整数量由100改为50-更改支付状态-各个值计算正确
base_url: ${ENV(base_manager_url)}
variables:
quantityControl: '50'
... ... @@ -15,7 +15,7 @@ teststeps:
- product_id_1
- product_id_2
- name: 编辑事业分红-数量由100调整为50,支付状态改为已支付
- name: 编辑分红-数量由100调整为50,支付状态改为已支付
variables:
id: $actual_id
productId: $product_id_1
... ...
config:
name: DIV006-事业分红-已支付订单数量减少
name: DIV006-分红管理-已支付订单数量减少
base_url: ${ENV(base_manager_url)}
variables:
stateOfPayment: 2
... ... @@ -14,7 +14,7 @@ teststeps:
- product_id_1
- product_id_2
- name: 编辑事业分红-支付状态改为已支付
- name: 编辑分红-支付状态改为已支付
variables:
id: $actual_id
productId: $product_id_1
... ...
config:
name: DIV007-分红管理-产品1支付分红成功,数据正确
base_url: ${ENV(base_manager_url)}
teststeps:
- name: 新增实际订单
testcase: testcases/common/COM001_actual_add_testcases.yml
output:
- actual_id
- product_id_1
- product_id_2
- name: 支付分红
variables:
orderId: ${convert_to_string($actual_id)}
productId: ${convert_to_string($product_id_1)}
api: api/m_api/dividends/m_dividends_payDividends_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
#####已支付状态=1
- eq:
- content.data.gridResult.lists.0.stateOfPayment
- 2
######应收分红
- eq:
- content.data.gridResult.lists.0.dividendsReceivable
- ${convert_to_string(450)}
#####已收分红
- eq:
- content.data.gridResult.lists.0.receiveDividends
- ${convert_to_string(150)}
#####未收分红
- eq:
- content.data.gridResult.lists.0.uncollectedDividends
- ${convert_to_string(300)}
- name: 查看该订单的分红详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/dividends/m_dividends_detail_api.yml
validate:
- eq:
- content.data.order.id
- ${convert_to_string($actual_id)}
#####合伙人应收分红总额
- eq:
- content.data.order.partnerDividends
- 450
#####合伙人未收分红总额
- eq:
- content.data.order.notReceivedDividend
- 300
#####合伙人已收分红总额
- eq:
- content.data.order.receivedDividends
- 150
#####合伙人分红支出总额
- eq:
- content.data.order.dividendSpending
- 0
#####产品1是否正确
- eq:
- content.data.product.0.id
- $product_id_1
#####产品1总金额
- eq:
- content.data.product.0.detail.commodityPrice
- 1500
#####产品1应收分红
- eq:
- content.data.product.0.detail.partnerDividends
- 150
#####产品1数量
- eq:
- content.data.product.0.orderNum
- 100
#####产品1分红状态
- eq:
- content.data.product.0.stateOfPayment
- 2
#####产品2总金额
- eq:
- content.data.product.1.detail.commodityPrice
- 3000
#####产品2应收分红
- eq:
- content.data.product.1.detail.partnerDividends
- 300
#####产品2分红状态
- eq:
- content.data.product.1.stateOfPayment
- 1
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
validate:
- eq:
- content.data.gridResult.lists.0.id
- $actual_id
- eq:
- content.data.gridResult.lists.0.orderNum
- 300
- eq:
- content.data.gridResult.lists.0.orderPrice
- 4500
- name: 查看实际订单详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/actual/m_order_actual_detail_api.yml
validate:
- eq:
- content.data.orderNumCount
- 300
- 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: DIV008-分红管理-产品1支付分红成功后,调整数量由100改为50,数据正确
base_url: ${ENV(base_manager_url)}
variables:
goodNumber: 50
teststeps:
- name: 新增实际订单
testcase: testcases/common/COM001_actual_add_testcases.yml
output:
- actual_id
- product_id_1
- product_id_2
- name: 支付分红
variables:
orderId: ${convert_to_string($actual_id)}
productId: ${convert_to_string($product_id_1)}
api: api/m_api/dividends/m_dividends_payDividends_api.yml
validate:
- eq:
- content.msg
- ok
- name: 编辑分红-数量由100调整为50
variables:
orderId: ${convert_to_string($actual_id)}
state: 1
partnerBonusPercent: 10
reason: '修改原因${get_stringcode(5)}'
productId: ${convert_to_string($product_id_1)}
api: api/m_api/dividends/m_dividends_modify_api.yml
validate:
- eq:
- content.msg
- ok
- name: 查看分红列表
api: api/m_api/dividends/m_dividends_list_api.yml
validate:
#####已支付状态=1
- eq:
- content.data.gridResult.lists.0.stateOfPayment
- 2
######应收分红
- eq:
- content.data.gridResult.lists.0.dividendsReceivable
- ${convert_to_string(375)}
#####已收分红
- eq:
- content.data.gridResult.lists.0.receiveDividends
- ${convert_to_string(150)}
#####未收分红
- eq:
- content.data.gridResult.lists.0.uncollectedDividends
- ${convert_to_string(300)}
#####分红支出
- eq:
- content.data.gridResult.lists.0.uncollectedDividends
- ${convert_to_string(75)}
- name: 查看该订单的分红详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/dividends/m_dividends_detail_api.yml
validate:
- eq:
- content.data.order.id
- ${convert_to_string($actual_id)}
#####合伙人应收分红总额
- eq:
- content.data.order.partnerDividends
- 450
#####合伙人未收分红总额
- eq:
- content.data.order.notReceivedDividend
- 300
#####合伙人已收分红总额
- eq:
- content.data.order.receivedDividends
- 150
#####合伙人分红支出总额
- eq:
- content.data.order.dividendSpending
- 75
#####产品1是否正确
- eq:
- content.data.product.0.id
- $product_id_1
#####产品1总金额
- eq:
- content.data.product.0.detail.commodityPrice
- 1500
#####产品1应收分红
- eq:
- content.data.product.0.detail.partnerDividends
- 150
#####产品1数量
- eq:
- content.data.product.0.orderNum
- 100
#####产品1分红状态
- eq:
- content.data.product.0.stateOfPayment
- 2
#####产品2总金额
- eq:
- content.data.product.1.detail.commodityPrice
- 3000
#####产品2应收分红
- eq:
- content.data.product.1.detail.partnerDividends
- 300
#####产品2分红状态
- eq:
- content.data.product.1.stateOfPayment
- 1
- name: 查看实际订单列表
api: api/m_api/actual/m_order_actual_list_api.yml
validate:
- eq:
- content.data.gridResult.lists.0.id
- $actual_id
- eq:
- content.data.gridResult.lists.0.orderNum
- 300
- eq:
- content.data.gridResult.lists.0.orderPrice
- 4500
- name: 查看实际订单详情
variables:
id: ${convert_to_string($actual_id)}
api: api/m_api/actual/m_order_actual_detail_api.yml
validate:
- eq:
- content.data.orderNumCount
- 300
- 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
... ...
... ... @@ -6,23 +6,35 @@ testcases:
testcase: testcases/common/start_testcases.yml
############################分红管理模块开始#################################
- name: DIV001-事业分红列表-数据源来自于实发订单
- name: DIV001-分红列表-数据源来自于实发订单
testcase: testcases/dividends/DIV001_dividendslist_testcases.yml
#- name: DIV002-事业分红列表-数据源不来自于意向订单(已废弃)
#- name: DIV002-分红列表-数据源不来自于意向订单
# testcase: testcases/dividends/DIV002_dividendslist_testcases.yml
- name: DIV003-事业分红详情-初始状态-各个值计算正确
- name: DIV003-分红管理-初始状态-各个值计算正确(旧接口)
testcase: testcases/dividends/DIV003_dividends_cal_testcases.yml
- name: DIV004-事业分红-调整数量-各个值计算正确
- name: DIV003_1-分红管理-初始状态-各个值计算正确
testcase: testcases/dividends/DIV003_1_dividends_cal_testcases.yml
- name: DIV004-分红管理-调整数量由100改为50-各个值计算正确(旧接口)
testcase: testcases/dividends/DIV004_dividends_editnum_testcases.yml
- name: DIV005-事业分红-调整数量-更改支付状态-各个值计算正确
- name: DIV004_1-分红管理-调整数量由100改为50-各个值计算正确
testcase: testcases/dividends/DIV004_1_dividends_editnum_testcases.yml
- name: DIV005-分红管理-调整数量由100改为50-更改支付状态-各个值计算正确(旧接口)
testcase: testcases/dividends/DIV005_dividends_edit_num_pay_testcases.yml
- name: DIV006-事业分红-已支付订单数量减少
- name: DIV006-分红管理-已支付订单数量减少(旧接口)
testcase: testcases/dividends/DIV006_dividends_edit_num_testcases.yml
- name: DIV007-分红管理-产品1支付分红成功,数据正确
testcase: testcases/dividends/DIV007_dividends_payDividends_testcases.yml
- name: DIV008-分红管理-产品1支付分红成功后,调整数量由100改为50,数据正确
testcase: testcases/dividends/DIV008_dividends_payDividends_editnum_testcases.yml
############################分红管理模块结束##################################
- name: ACT001-实际订单-各个值计算正确
... ...