Postman取动态的随机字符串

Pre-request  Script中写代码处理,存为环境变量

postman.setGlobalVariable("random_username", ("0000" + (Math.random()*Math.pow(36,4) << 0).toString(36)).slice(-4));

posted @ 2017-03-17 15:10  手掌心的微笑是否  阅读(4578)  评论(0编辑  收藏  举报