赞
踩
request body:
{
“id”: “demoData”,
“date”: “{{date}}”
// “timeStamp”: “{{timeStamp}}”
}
Pre-request Script:
Datel类型
postman.setGlobalVariable(“date”, Date.parse(new Date()))
或
postman.setGlobalVariable(“date”, Date.parse(new Date(“2023-09-07”)))
TimeStamp类型
timeStamp=Math.round(new Date().getTime());
postman.setGlobalVariable(“timeStamp”,timeStamp)
创建Runner
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。