COMP001_company_statistics_testcases.yml 1.3 KB
config:
    name: COMP001-企业统计值正确
    base_url: ${ENV(base_manager_url)}


teststeps:

-   name: $phone 登录天联共创app端系统
     ####身份类型 1:合伙人  2:高管
    variables:
      idType: ${convert_to_int(2)}
    testcase: testcases/app/common/app_login_testcases.yml
    output:
      - accessToken

-   name: 查看企业统计
    api: api/app_api/company/statistics_api.yml

    extract:
      quarters: content.data.statistics
      totalCount: content.data.statistics.totalCount
    output:
      - totalCount
      - quarters
    validate:
      ####合伙人支出
      - eq:
            - ${get_statistics(careerDividend,businessDividend,developDividend,appDividend,$quarters)}
            - 2136
      ####订单金额
      - eq:
            - ${get_statistics(careerOrdersMoney,businessOrdersMoney,developOrdersMoney,appOrdersMoney,$quarters)}
            - 25500

-   name: 查看企业合伙人列表
    variables:
      type1: 1
      name1: '事业合伙'
      type2: 2
      name2: '业务合伙'
      type3: 3
      name3: '研发合伙'
      type4: 4
      name4: '业务-产品应用合伙'
    api: api/app_api/company/partners_api.yml
    validate:
#      ###合伙人数
      - length_equals:
            - content.data.partners
            - $totalCount