当前位置:网站首页>第十四天&postman
第十四天&postman
2022-08-05 00:53:00 【xbxbgk】
1.接口的批量运行&数据驱动
首先建立一个集合,在集合中创建需要运行的接口,点击run

勾选需要运行的接口

左侧为批量运行的设置,如迭代次数,迭代的间隔时间,选取的文件(将测试数据保存本地,一次性进行运行 在参数里面的数据文件值和取全局变量一致,使用{ {}},在断言里面取数据文件的值使用:data.字段名 )

选取所选文件的格式

在接口中用相应的{ {}}对应外部链接文本中数据,断言用data.引用


运行得到结果

2.接口的加密解密
加密方式base64
var username = CryptoJS.enc.Utf8.parse("admin")
var base64_username = CryptoJS.enc.Base64.stringify(username)
console.log(base64_username) //加密
var username = CryptoJS.enc.Base64.parse("YWRtaW4=")
var new_username = username.toString(CryptoJS.enc.Utf8)
console.log(new_username)//解密对文件进行加密

对文件进行解密

只加密不解密的加密方式:MD5,SHA1,SHA2,SHAN...
3.动态参数
{
{$timestamp}}:生成当前时间的时间戳
{
{$randomInt}}:生成0~1000的随机数
{
{$guid}}:生成随机的guid字符串4.MOCK接口

下一步输入接口名字

得到返回值界面

验证接口

引入与导出

边栏推荐
- Countdown to 1 day!From August 2nd to 4th, I will talk with you about open source and employment!
- canvas Gaussian blur effect
- Software Testing Interview Questions: What Are the Types of Software Testing?
- ORA-00257
- Software Testing Interview Questions: What is Software Testing?The purpose and principle of software testing?
- 2022 Hangzhou Electric Multi-School Training Session 3 1009 Package Delivery
- How DHCP works
- Software testing interview questions: the difference and connection between black box testing, white box testing, and unit testing, integration testing, system testing, and acceptance testing?
- 4. PCIe 接口时序
- gorm joint table query - actual combat
猜你喜欢
随机推荐
3. pcie.v 文件
Matlab uses plotting method for data simulation and simulation
tensor.nozero(),面具,面具
2022牛客多校训练第二场 J题 Link with Arithmetic Progression
[FreeRTOS] FreeRTOS and stm32 built-in stack occupancy
金九银十面试跳槽季;你准备好了吗?
LiveVideoStackCon 2022 Shanghai Station opens tomorrow!
VOC格式数据集转COCO格式数据集
进程间通信和线程间通信
深度学习训练前快速批量修改数据集中的图片名
Software Testing Interview Questions: What do test cases usually include?
E - Many Operations (bitwise consideration + dp thought to record the result after the operation
测试工作这么难找吗?今年32,失业2个月,大龄测试工程师接下来该拿什么养家?
2022 Nioke Multi-School Training Session 2 J Question Link with Arithmetic Progression
码率vs.分辨率,哪一个更重要?
二叉树[全解](C语言)
If capturable=False, state_steps should not be CUDA tensors
2022 Hangzhou Electric Multi-School Training Session 3 1009 Package Delivery
Software testing interview questions: Please draw the seven-layer network structure diagram of OSI and the four-layer structure diagram of TCP/IP?
tiup status








](/img/4d/2d81dc75433c23c5ba6b31453396f0.png)
