COM001_task_login_testcases.yml 1.0 KB
config:
    name: 用户登录APP
    base_url: ${ENV(base_url)}
variables:
    phone: ${ENV(adminphone)}

teststeps:

-   name:  $phone 登陆统一用户中心
    api: api/app_api/login_api/ucenter_login_api.yml
    extract:
        cuid: content.data.cuid
        credentials: content.data.credentials
        muid: content.data.companys.0.muid
    varidate:
        validate:
          - eq:
              - content.msg
              - ok

-   name:  价值系统登录
    variables:
        credentials: $credentials
        cuid: $cuid
        muid: $muid
        cid: ${ENV(companyid)}
    api: api/app_api/login_api/authorize_api.yml
    teardown_hooks:
        - ${teardown_hook_get_authcode($response)}
    varidate:
        validate:
          - eq:
              - content.msg
              - 登录成功

-   name: 获取accessToken
    api: api/app_api/login_api/accessToken_api.yml
    teardown_hooks:
        - ${teardown_hook_get_task_accesstoken($response)}
    validate:
          - eq:
              - content.msg
              - 获取成功