COM002_m_login_testcases.yml 1.5 KB
config:
    name: 用户登录管理后台
    base_url: ${ENV(base_business_url)}

teststeps:
-   name:  登录企业平台
    api: api/m_api/login_api/auth/pwdLogin_api.yml
#    variables:
#        username: ${ENV(wpftwphone)}
    teardown_hooks:
        - ${teardown_hook_get_Authorization($response)}
    varidate:
        validate:
          - eq:
              - content.msg
              - ok
-   name:  用户的公司列表
    output:
        - companyId
    api: api/m_api/login_api/auth/userCompamies_api.yml
    extract:
        companyId: content.data.company.0.id
    validate:
        - eq:
            - content.msg
            - ok
        - eq:
            - content.data.company.0.id
            - $companyId
-   name: 登录公司
    api: api/m_api/login_api/auth/anonymousLogin_api.yml
    teardown_hooks:
        - ${teardown_hook_get_access_token($response)}
    varidate:
        validate:
          - eq:
              - content.msg
              - ok
#
-   name: 登录列表
    api: api/m_api/login_api/auth/getSingleLoginMenus_api.yml
    teardown_hooks:
        - ${teardown_hook_get_login_code($response)}
    varidate:
        validate:
          - eq:
              - content.msg
              - ok
#
-   name: 登录价值系统
    api: api/m_api/login_api/auth/login_api.yml
    teardown_hooks:
        - ${teardown_hook_get_task_Authorization($response)}
    varidate:
        validate:
          - eq:
              - content.msg
              - ok