原理:在腳本開始之前將准備好的數據添加至數組內,每次請求根據順序調用
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