当前位置:网站首页>Jmeter录制接口自动化
Jmeter录制接口自动化
2022-07-27 13:55:00 【weixin_39118023】
一、安装Jmeter(参考上一篇帖子)
- 安装JDK,配置环境变量JAVA_HOME,电脑Java环境正常
- 配置Jmeter环境变量:JMETER_HOME; CLASSPATH正常
- 官网地址:Apache JMeter - Download Apache JMeter


二、Jmeter录制web端脚本
1.打开Jmeter,配置Jmeter工具
(1)添加【线程组】
测试计划(右击) - 添加 - 线程组
(2)添加【简单控制器】
线程组(右击) - 添加 - 逻辑控制器 - 简单控制器
(3)添加【HTTP代理服务器】
测试计划(右击) - 添加 - 非测试元件 - HTTP代理服务器
(4) HTTP代理服务器-排查模式
.*\.(js|css|PNG|jpg|ico)
.*\.css
.*\.jpg


2.HTTP代理设置可看到端口号,其发出的代理网络信息为: ip:端口号 (如127.0.0.1:8880)
3.打开浏览器代理网络设置,桌面通知栏网络连接图标--->网络和internet属性--->代理--->手动设置代理
使用Jmeter的代理网络,启动HTTP代理服务器后即可开始录制HTTP请求(有些浏览器代理是跟随系统的,有些是独立设置的)

4.如果需要录制https请求,则需要配置证书。当启动代理服务器的时候,Jmeter下的bin目录会生成一个证书名称为ApacheJMeterTemporaryRootCA.crt文件。需要将证书导入Jmeter和浏览器(导入浏览器证书方式与fiddler一致) 确保2端都安装证书后,才可以录制
三、安装证书
1. Jmeter选项-SSL管理器导入证书成功后,在Jmeter安装路径bin目录下会看到ApacheJMeterTemporaryRootCA.crt这个证书(这时先启动HTTP代理服务器,然后再去目录下看是否生成证书)

2.启动HTTP代理服务器
按提示操作安装好证书,即可打开浏览器输入要访问的地址,开始录制接口

3.开启HTTP代理服务器





4.再去关闭浏览器的代理,就可以正常访问网页了
边栏推荐
- 终于有人把面试必考的动态规划、链表、二叉树、字符串全部撸完了
- watch VS watchEffect
- Database storage series (1) column storage
- What you want most is the most comprehensive summary of C language knowledge. Don't hurry to learn
- 如果我们是那晚负责修复 B 站崩了的开发人员
- [intensive reading of papers] grounded language image pre training (glip)
- 炒黄金开户平台有没有正规,安全的
- Lecture 4: Longest ascending substring
- 微信小程序实现音乐搜索页面
- Architecture - the sublimation of MVC
猜你喜欢
Database storage series (1) column storage

大家最想要的,最全的C语言知识点总结,还不赶紧学习

STM32 - capacitive touch button experiment

arduino+ZE08-CH2O甲醛模块,输出甲醛含量

Visual system design example (Halcon WinForm) -10. PLC communication

股票买卖4

Visual system design example (Halcon WinForm) -9. text display

Arduino+ze08-ch2o formaldehyde module, output formaldehyde content

【ManageEngine】什么是SIEM

Slam overview Reading Note 6: slam research based on image semantics: application-oriented solutions for autonomous navigation of mobile robots 2020
随机推荐
User question understanding and answer content organization for epidemic disease Science Popularization
Unityui aspect processing (induction and accumulation)
正则表达式:邮箱匹配
Is the security of online brokerage app account opening guaranteed?
Failed to connect to ResourceManager
DVWA全级别通关教程
Disk troubleshooting of kubernetes node
Construction of knowledge map of financial securities and discovery of related stocks from the perspective of knowledge relevance
Nokia's patent business was hit for the first time, and Chinese enterprises are not so easy to knead
Ten thousand words detailed Google play online application standard package format AAB
【云享读书会第13期】视频文件的封装格式
STM32F103C8T6在Arduino框架下驱动ssd1306 0.96“ IIC OLED显示
Rtl8762dk environment construction (I)
Getting started for beginners: build your own blog with WordPress
NEFU118 n!后面有多少个0【算术基本定理】
Interprocess communication
Idea makes jar packages and introduces jar packages
SkyWalking分布式系统应用程序性能监控工具-中
通过VN1630/VN7640的I/O功能来确认电源设置电压的时间精确度
Who can't capture packets these days? Wireshark packet capture and common protocol analysis are for you!