update_taskPublish_api.yml 1.5 KB
name: 编辑任务:/v1/task/taskPublish
base_url: ${ENV(base_url)}
verify: False
variables:
    currtime: ${make_time()}
    uuid: ${make_uuid()}
    access_token: ${get_accesstoken()}
    sign: ${make_sign($currtime, $uuid, $access_token)}
    title: API测试任务名称${get_nowtime()}
    content: API测试任务描述${get_nowtime()}
    acceptability: API测试验收标准${get_nowtime()}
    nature_id:  2
    csVals_id13: 13
    csVals_id3: 3
    bidStartTime: ${get_bidStartTime()}
    bidEndTime: ${get_bidEndTime()}

    msg: '保存成功'
request:
    headers:
        Content-Type: application/json;charset=utf-8
        User-Agent: okhttp/3.12.3
        X-MMM-AccessToken: $access_token
        X-MMM-AppName: com.mmm.ability
        X-MMM-AppProject: ability
        X-MMM-DeviceType: '0'
        X-MMM-Sign: $sign
        X-MMM-Timestamp: $currtime
        X-MMM-Uuid: $uuid
        X-MMM-Version: 1.0.0
    json:
        id: $id
        action: 0
        type: 1
        title: $title
        content: $content
        acceptability: $acceptability
        images:
        nature:
            id: $nature_id
            name: 线
        csVals:
          - id: $csVals_id3
            name: 色泽
          - id: $csVals_id13
            name: 账期
        bidStartTime: $bidStartTime
        bidEndTime: $bidEndTime
        bonus: 1000
        isReward: False
    method: POST
    url: /v1/task/taskPublish
validate:
    -   eq:
        - content.code
        - 0
    -   eq:
        - content.msg
        - 更新成功
#        - $msg