accessToken_api.yml 911 字节
name: 获取授权令牌
base_url: ${ENV(base_url)}
verify: False
variables:
    currtime: ${make_time()}
    uuid: ${make_uuid()}
    access_token: ''
    sign: ${make_sign($currtime, $uuid,$access_token)}
teardown_hooks:
  - ${teardown_hook_get_accesstoken($response)}
request:
    headers:
        Content-Type: application/json;charset=utf-8
        User-Agent: abilityIOSTest/120004 CFNetwork/1121.2.2 Darwin/19.3.0
#        X-MMM-AppName: com.maimaimai.abilityIOS
        X-MMM-AppProject: ability
        X-MMM-DeviceType: "0"
        X-MMM-Sign: $sign
        X-MMM-Timestamp: $currtime
        X-MMM-Uuid: $uuid
        X-MMM-Version: 0.12.0
    json:
        clientId: lks3Z8Ncn2j
        authCode: ${get_authcode()}
        clientSecret: gtfhyjukiol3Qncbvmdwe67khh
    method: POST
    url: v1/auth/accessToken
validate:
-   eq:
    - content.code
    - 0
-   eq:
    - content.msg
    - 获取成功