当前位置:网站首页>第十四天&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接口

下一步输入接口名字

得到返回值界面

验证接口

引入与导出

边栏推荐
猜你喜欢

动态规划/背包问题总结/小结——01背包、完全背包

### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionExcep

深度学习原理学习小结 - Self-Attention/Transformer

"WEB Security Penetration Testing" (28) Burp Collaborator-dnslog out-band technology
![[230] Execute command error after connecting to Redis MISCONF Redis is configured to save RDB snapshots](/img/fa/5bdc81b1ebfc22d31f42da34427f3e.png)
[230] Execute command error after connecting to Redis MISCONF Redis is configured to save RDB snapshots

JVM类加载简介

linux(centOs7)部署mysql(8.0.20)数据库

JUC thread pool (1): FutureTask use

MongoDB搭建及基础操作

ORA-01105 ORA-03175
随机推荐
软件测试面试题:设计测试用例时应该考虑哪些方面,即不同的测试用例针对那些方面进行测试?
GCC:头文件和库文件的路径
2022 Hangzhou Electric Power Multi-School Session 3 K Question Taxi
Gartner Hype Cycle:超融合技术将在2年内到达“生产力成熟期”
2022牛客多校训练第二场 J题 Link with Arithmetic Progression
If capturable=False, state_steps should not be CUDA tensors
第十一章 开关级建模
2022多校第二场 K题 Link with Bracket Sequence I
Interview summary: Why do interviewers in large factories always ask about the underlying principles of Framework?
Bit rate vs. resolution, which one is more important?
仅3w报价B站up主竟带来1200w播放!品牌高性价比B站投放标杆!
码率vs.分辨率,哪一个更重要?
2022杭电多校第三场 L题 Two Permutations
tiup status
CNI(Container Network Plugin)
More than 2022 cattle school training topic Link with the second L Level Editor I
2022 Multi-school Second Session K Question Link with Bracket Sequence I
JUC thread pool (1): FutureTask use
Software testing interview questions: What are the three modules of LoadRunner?
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?