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

下一步输入接口名字

得到返回值界面

验证接口

引入与导出

边栏推荐
- CNI (Container Network Plugin)
- (十七)51单片机——AD/DA转换
- ora-00604 ora-02429
- matlab 采用描点法进行数据模拟和仿真
- Inter-process communication and inter-thread communication
- After the staged testing is complete, have you performed defect analysis?
- 4. PCIe interface timing
- 第十一章 开关级建模
- 深度学习原理学习小结 - Self-Attention/Transformer
- Opencv——视频跳帧处理
猜你喜欢

行业现状?互联网公司为什么宁愿花20k招人,也不愿涨薪留住老员工~

10年测试经验,在35岁的生理年龄面前,一文不值

Lattice PCIe Learning 1

蓝牙Mesh系统开发四 ble mesh网关节点管理

oracle create user

JUC线程池(一): FutureTask使用

Activity Recommendation | Kuaishou StreamLake Brand Launch Conference, witness together on August 10!

JVM类加载简介

Memory Forensics Series 1

数仓4.0(三)------数据仓库系统
随机推荐
GCC:屏蔽动态库之间的依赖
面试汇总:为何大厂面试官总问 Framework 的底层原理?
PCIe Core Configuration
torch.autograd.grad求二阶导数
torch.autograd.grad finds the second derivative
张驰咨询:揭晓六西格玛管理(6 Sigma)长盛不衰的秘密
僵尸进程和孤儿进程
Jin Jiu Yin Shi Interview and Job-hopping Season; Are You Ready?
自定义线程池
2022牛客多校第三场 A Ancestor
2021年11月网络规划设计师上午题知识点(上)
软件测试技术之最有效的七大性能测试技术
GCC: compile-time library path and runtime library path
新唐NUC980使用记录:在用户应用中使用GPIO
Software Testing Interview Questions: What's the Key to a Good Test Plan?
Software test interview questions: BIOS, Fat, IDE, Sata, SCSI, Ntfs windows NT?
Getting Started with Kubernetes Networking
GCC: paths to header and library files
Software Testing Interview Questions: What do test cases usually include?
Software Testing Interview Questions: What Are the Types of Software Testing?