在Per-request Script中设置参数
postman.setGlobalVariable("startTime",Date.parse(new Date("2021/06/01 00:00:10")));
postman.setGlobalVariable("endTime",Date.parse(new Date("2021/06/13 23:59:10")));
json中日期格式这样写:
"onBoardDate": {{onBoardDate}},
"offBoardDate": {{offBoardDate}},
{
"account":"0000299",
"name": "小明",
"department": null,
"mobile": 13057650733,
"mail": "111111@qq.com",
"gender": null,
"birthYear": "2021",
"educationBg": null,
"experience": null,
"companyId": 1,
"onBoardDate": {{onBoardDate}},
"offBoardDate": {{offBoardDate}},
"comment": null,
"isTermination": 0
}
Postman使用Date数据类型,Postman发送Date类型数据,Postman模拟前端调用_w_monster的博客-CSDN博客_postman模拟date