当前位置:网站首页>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.
边栏推荐
- Generate classes from XML schema
- nacos -分布式事务-Seata** linux安装jdk ,mysql5.7启动nacos配置ideal 调用接口配合 (保姆级细节教程)
- Isprs2022 / Cloud Detection: Cloud Detection with Boundary nets Boundary Networks Based Cloud Detection
- Fix vulnerability - mysql, ES
- 职场进阶指南:大厂人必看书籍推荐
- EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
- 使用QT遍历Json文档及搜索子对象
- rsync
- 含重复元素取不重复子集[如何取子集?如何去重?]
- Nanjing University: Discussion on the training program of digital talents in the new era
猜你喜欢
随机推荐
[paddlepaddle] paddedetection face recognition custom data set
第十一届中国云计算标准和应用大会 | 华云数据成为全国信标委云计算标准工作组云迁移专题组副组长单位副组长单位
Leetcode daily practice: rotating arrays
Huaxia Fund: sharing of practical achievements of digital transformation in the fund industry
Introduction to VC programming on "suggestions collection"
【PaddlePaddle】 PaddleDetection 人脸识别 自定义数据集
深拷贝与浅拷贝【面试题3】
U-Net: Convolutional Networks for Biomedical Images Segmentation
Star ring technology data security management platform defender heavy release
南京大学:新时代数字化人才培养方案探讨
Generate classes from XML schema
Sophon base 3.1 launched mlops function to provide wings for the operation of enterprise AI capabilities
图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统
Can communication of nano
从XML架构生成类
Failed to virtualize table with JMeter
Neural network self cognition model
【pm2详解】
How to solve the error "press any to exit" when deploying multiple easycvr on one server?
【在優麒麟上使用Electron開發桌面應】









