PARTNERS005_partner_testcases.yml 1.9 KB
config:
    name: PARTNERS005-合伙人增删改查流程
    base_url: ${ENV(base_manager_url)}

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

-   name: 新增合伙人
    api:  api/m_api/partners/m_partner_add_api.yml
    extract:
        - partnerid: content.data.id
    validate:
        - equals:
            - content.msg
            - ok

-   name: 查看合伙列表
    variables:
        partnerType:
        partnerName: ''
    api:  api/m_api/partners/m_partner_list_api.yml
#    extract:
#        - totalRow: content.data.gridResult.totalRow
    validate:
        - equals:
            - content.data.gridResult.lists.0.id
            - $partnerid
        - length_equals:
            - content.data.gridResult.lists.0.partnerType
            - 4


-   name: 编辑合伙人
    variables:
        id: $partnerid
    api:  api/m_api/partners/m_partner_edit_api.yml
    validate:
        - equals:
            - content.msg
            - ok


-   name: 查看合伙列表
    variables:
        partnerType:
        partnerName: ''
    api:  api/m_api/partners/m_partner_list_api.yml
#    extract:
#        - totalRow: content.data.gridResult.totalRow
    validate:
        - equals:
            - content.data.gridResult.lists.0.id
            - $partnerid
        - length_equals:
            - content.data.gridResult.lists.0.partnerType
            - 2


-   name: 删除合伙人
    variables:
        id: $partnerid
    api:  api/m_api/partners/m_partner_remove_api.yml
    validate:
        - equals:
            - content.msg
            - ok


-   name: 查看合伙列表
    variables:
        partnerType:
        partnerName: ''
    api:  api/m_api/partners/m_partner_list_api.yml
#    extract:
#        - totalRow: content.data.gridResult.totalRow
    validate:
        - not_equals:
            - content.data.gridResult.lists.0.id
            - $partnerid