原理:在脚本开始之前将准备好的数据添加至数组内,每次请求根据顺序调用

 

 

wrk.method = "GET"

-- 循环列表

local queries = { -- API与参数

"/app/getConDetails?ConttId=38163230&Type=2",

"/app/getContDetails?ContId=381667330&Type=1",

}

local i = 0

 

request = function() –每次调用不同的接口数据

    local path = wrk.format(nil, queries[i % #queries + 1])

    i = i + 1

    print(path)

    return path

end

posted on 2019-10-02 09:15  月光之下  阅读(1300)  评论(0编辑  收藏  举报