COM003_actual_add_many_testcases.yml 1.8 KB
config:
    name: COM003-新增多条实际订单,具体新增几条请修改times字段
    base_url: ${ENV(base_manager_url)}
    variables:
        partnerID: 1047
        commissionProportion: 5
        orderNum1: 100
        univalence: 15
        partnerRatio: 10
        orderNum2: 200
#        partnerRatio2: 20
#    output:
#      - actual_id
#      - product_id_1
#      - product_id_2


teststeps:
-   name: $phone 登录系统
    variables:
      phone: ${ENV(adminphone)}
    testcase: testcases/common/m_login_testcases.yml

-   name: 新增实发订单
    times: 5
    api: api/m_api/actual/m_add_order_actual_api.yml
    teardown_hooks:
      - ${teardown_hook_get_orderid($response)}
    validate:
        - eq:
          - content.msg
          - ok

#-   name: 查看实际订单列表
#    api: api/m_api/actual/m_order_actual_list_api.yml
#    extract:
#      - actual_id: content.data.gridResult.lists.0.id
#    validate:
#        - eq:
#          - content.data.gridResult.lists.0.id
#          - ${convert_to_string($orderid)}
#        - eq:
#            - content.msg
#            - ok
#
#-   name: 查看实际订单详情
#    variables:
#      id: ${convert_to_string($actual_id)}
#    api: api/m_api/actual/m_order_actual_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
#            - ${cal_orderPrice($univalence, $orderNum1, $orderNum2)}
#        - eq:
#            - content.data.product.0.orderPrice
#            - ${cal_orderPrice($univalence, $orderNum1)}
#        - eq:
#            - content.data.product.1.orderPrice
#            - ${cal_orderPrice($univalence, $orderNum2)}