postman加密和使用当前时间戳
2023-09-27 14:27:49 时间
// 获取全局变量
uid = postman.getGlobalVariable(“uid”)
sid = postman.getGlobalVariable(“sid”)
//设置当前时间戳
postman.setGlobalVariable(“time”,Math.round(new Date().getTime()));
time = postman.getGlobalVariable(‘time’)
//设置KEY_WORD为全局变量
postman.setGlobalVariable(“Key”,"******")
KEY_WORD = postman.getGlobalVariable(“Key”);
//字符串进行md5加密
var str = uid+sid+time+KEY_WORD;
var strmd5= CryptoJS.MD5(str).toString();
postman.setGlobalVariable(“sign”,strmd5)
相关文章
- curl 的用法指南【curl 是常用的命令行工具,用来请求 Web 服务器】【命令行参数多达几十种。如果熟练的话,完全可以取代 Postman 这一类的图形界面工具】
- 项目管理-软件:Apifox【API 文档、API 调试、API Mock、API 自动化测试一体化协作平台,定位 Postman + Swagger + Mock + JMeter】
- Postman使用手册2——管理收藏
- 还在写代码造假数据联调?真 Low!试试 PostMan Mock,真香!!
- Postman接口测试 —— 使用postman运行接口
- Postman接口测试 ------ 使用postman运行接口
- 不会接口测试?用Postman轻松入门(一)—— Postman实现get和post请求
- 2022接口自动化测试工具Postman 使用教程
- Postman接口测试 ------ 设置全局变量、参数传递、断言
- Postman接口&压力测试
- postman VS restlet client基本使用
- 【springmvc】传值的几种方式&&postman接口测试
- postman参数化的方法
- 使用postman上传excel文件测试导入excel
- Postman测试工具调试接口详细教程【向后端发送Json数据并接收返回的Json结果】
- postman:提示restricted header(use Postman Interceptor)