m_login_testcases.yml 1.1 KB
config:
    name: 管理后台登陆
#    base_url: ${ENV(base_manager_url)}
    variables:
        phone: ${ENV(adminphone)}

teststeps:
-   name: $phone 登录企业平台
    api: api/m_api/m_login_api/m_pwdLogin_api.yml
    extract:
        pwdLogintoken: content.data.access.token
    validate:
        - eq:
              - content.msg
              - ok

-   name: 选择公司登录
    variables:
      companyId: ${ENV(companyId)}
    api: api/m_api/m_login_api/m_anonymousLogin_api.yml
    extract:
        anonymousLogintoken: content.data.access.token
    validate:
        - eq:
              - content.msg
              - ok

-   name: 单点登录,获取secret用于登录子系统
    api: api/m_api/m_login_api/m_getSingleLoginMenus_api.yml
    extract:
        url: content.data.list.1.url
    validate:
        - eq:
              - content.msg
              - ok

-   name: 使用secret登录合伙人系统
    api: api/m_api/m_login_api/m_login_api.yml
    teardown_hooks:
      - ${teardown_hook_get_m_accesstoken($response)}
    validate:
        - eq:
              - content.msg
              - ok