当前位置:网站首页>Use JMeter to record scripts and debug
Use JMeter to record scripts and debug
2022-07-05 18:13:00 【Coffee cat】
First step : stay JMeter Add thread group in , Name it AddBugByJMeter
The second step : Add... Under thread group HTTP Request defaults
add to -> The configuration element ->HTTP Request defaults , Setup server IP And port number (JMeter By default 80 Port number , My Zen configuration is 81 port )
The third step : add to HTTP proxy server
1、 Add non test originals ->HTTP proxy server , And set the port number ( Can pass netstat -ano Check the unused port number in the computer )、 Select the target controller ( Select the previous thread group )

2、 Click on HTTP Start button of proxy server , After startup, it can pass through JMeter In the top right corner of the log View button to check the startup

3、 open Google Chrome Browser Settings agent

Step four : Start recording
1、 use Google Chrome The browser accesses the Zen home page , You can see when opening the home page JMeter The corresponding request information has been recorded .
2、 Continue recording finish adding bug The business of , Exit the Zen management system after completion , Go back to the login page .
3、 Cancel the local proxy setting of the browser after recording .
4、 see JMeter Recording of , You can see a lot of recorded content , There are many of them png、css、gif、js Etc .
Insert picture description here
5、 adopt HTTP Exclusion mode of proxy server , Exclude some unnecessary request information , Such as css、gif、png wait .
Insert picture description here
6、 Delete the original recorded request after setting the include and exclude modes , Record again ( Can be in HTTP Add a listener under the proxy server -> View the result tree to view the recording ).
Step four : Debug script
Two requests in my script recording succeeded , But playback failed , From the request information, we can see that the requested server is api.zentao.net, Other requests are 127.0.0.1. Because I don't know what it is , I don't know if it will affect the playback , So my approach is to disable these two requests first , Continue debugging .
Insert picture description here
Step five : Add view result tree and aggregate report under thread group to view playback .
1、 From the view result tree, you can see that the playback passed .
2、 Log in to the Zen system to see if the addition is really successful ( It turned out to be a failure ,bug There is nothing new in the list bug).
3、 In the view result tree, pass HTML Check each request in the form .
4、 In order to make the test results more intuitive , You can modify the advance in the script bug name , This is changed to Replay
Insert picture description here
5、 After the playback is successful, check whether the Zen manager is successfully added .
Insert picture description here
summary
problem 1: JMeter Use IE Browser failed
Problem appearance : There is no HTTP Request information , Only the fourth step is disabled 2 strip
Problem analysis : It is suspected that it is the browser itself or the setting problem , Not resolved , So it's changed to Google Chrome
original text :https://www.cnblogs.com/tester808/p/6619129.html
The principle of this method is to use the proxy to record the access records of the browser . Another way to record scripts is to use badboy.
边栏推荐
- Xiaobai getting started with NAS - quick building private cloud tutorial series (I) [easy to understand]
- Use of print function in MATLAB
- vulnhub之darkhole_2
- 开户注册股票炒股安全吗?有没有风险的?靠谱吗?
- 如何获取飞机穿过雷达两端的坐标
- Access the database and use redis as the cache of MySQL (a combination of redis and MySQL)
- 生词生词生词生词[2]
- Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]
- Introduction to Resampling
- buuctf-pwn write-ups (9)
猜你喜欢
![[JMeter] advanced writing method of JMeter script: all variables, parameters (parameters can be configured by Jenkins), functions, etc. in the interface automation script realize the complete business](/img/a6/aa0b8d30913dc64f3c0cd891528c40.png)
[JMeter] advanced writing method of JMeter script: all variables, parameters (parameters can be configured by Jenkins), functions, etc. in the interface automation script realize the complete business

华夏基金:基金行业数字化转型实践成果分享

Simulate the hundred prisoner problem

Leetcode daily practice: rotating arrays

寻找第k小元素 前k小元素 select_k

ISPRS2020/云检测:Transferring deep learning models for cloud detection between Landsat-8 and Proba-V

Cmake tutorial step1 (basic starting point)

Sophon Base 3.1 推出MLOps功能,为企业AI能力运营插上翅膀

吴恩达团队2022机器学习课程,来啦

如何获取飞机穿过雷达两端的坐标
随机推荐
《力扣刷题计划》复制带随机指针的链表
Tupu software digital twin | visual management system based on BIM Technology
Tencent music launched its new product "quyimai", which provides music commercial copyright authorization
How to solve the error "press any to exit" when deploying multiple easycvr on one server?
Multithreading (I) processes and threads
EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
pytorch yolov5 训练自定义数据
VC编程入门浅谈「建议收藏」
mybash
Mask wearing detection based on yolov3
让更多港澳青年了解南沙特色文创产品!“南沙麒麟”正式亮相
分享:中兴 远航 30 pro root 解锁BL magisk ZTE 7532N 8040N 9041N 刷机 刷面具原厂刷机包 root方法下载
Fix vulnerability - mysql, ES
Introduction to Resampling
热通孔的有效放置如何改善PCB设计中的热管理?
通过SOCKS代理渗透整个内网
Star Ring Technology launched transwarp Navier, a data element circulation platform, to help enterprises achieve secure data circulation and collaboration under privacy protection
IDC report: Tencent cloud database ranks top 2 in the relational database market!
Wu Enda team 2022 machine learning course, coming
Configure pytorch environment in Anaconda - win10 system (small white packet meeting)