当前位置:网站首页>JMeter interface test tool foundation - use badboy to record JMeter script
JMeter interface test tool foundation - use badboy to record JMeter script
2022-06-24 10:29:00 【Test - Eight Precepts】
1、 Use Badboy Recording JMeter Script
open Badboy Tool starts script recording :
(1) When we open Badboy Tool time , By default, it will enter the recording state .
Here's the picture :

Of course, we can also click the record button to switch .
(2) Enter the tested address in the address bar , And access .
Let's take Jingdong as an example :
Enter the Jingdong website in the input field , Click on the little arrow behind , Jump to the address under test .

When you click the arrow , Record one step operation ( It's like creating a sampler ), And display the content of the tested web address in the right view , Here's the picture :

(3) You can directly manipulate the displayed content in the view .
It's the same as we usually visit websites , for example : I click “ Please login. ”, Will jump to the landing page of Jingdong .
At the same time, a step will continue to be added to the script tree .

(4) Stop recording scripts .
If a test process is finished recording , We can click stop recording .
Just click on the little red dot in the toolbar , Here's the picture :

(5) Save recorded script file .
Click on File —> Export to JMeter..., Save the script file to the location you need , Easy to manage ,
(JMeter The default format of the file is .jmx)
(6) stay JMeter Open the script file you just saved in
Click on the file —> open , Find the script file you just saved and open it , Here's the picture :

(7) Add listener
Use Badboy Recorded JMeter Script , They don't have a monitor . Here we need to add a listener manually , Easy to see results .

(8) stay JMeter Start the script in
Click the green start arrow in the toolbar to run the script .
After the script runs , Can be in " Look at the fruit tree " View the results of all requests and responses in the test plan in .

2、 Use Badboy Parametric configuration
Badboy To facilitate automated data flexibility , Provides the function of script parameterization .
There is no input operation in the above example , If I visit Baidu , You need to enter some search keyword information , At this time, you need to configure parametrically .
(1) open Badboy Tools , By default, it will enter the recording state .
(2) Enter the tested address in the address bar , And access .
for example : Visit Jingdong website , Search for the product you need .

(3) Enter search keywords in Baidu search bar “ mobile phone ”, And click search .

Click on the search .

(4) Click the stop recording button , And start to modify .
Expand the script tree added by the previous search product :

Two changes are needed :
1)、 If the input keyword information appears garbled .
Badboy Default to use the system of IE browser , In case of garbled code , take ie Attribute utf8 Change it to gbk. for example , Jingdong website ie The attribute is enc attribute .
double-click enc attribute ( Right click on the attribute and select Properties Options can be ), Make changes in the pop-up window , Here's the picture :

(GBK It can be in both case )
Be careful : What is the default browser on your computer , Just replace it with the corresponding code .
2)、 Configure the input parameter information
for example : On the Jingdong page ,keyword Attributes are keyword information .
Defining variables
double-click keyword attribute ( Right click on the attribute and select Properties Options can be ), modify Value The attribute is ${ Custom variable name }, Click ok .

Then start to configure the parameter information of the variable :

here keyword The value of the property , Has been parameterized .
(5) double-click Step 1, Make changes For each value of vari The value defined by each variable shall prevail ( That is, using parameterization ).

At this point, look at the changes in the script tree .

(6) Save script , And use JMeter Open the script , Can run .
It can also be in Badboy in , Right click on the Test 1 —> Play Whole Test, Execute the recorded script , Check the execution effect .
3、 solve “ There is an error in the script of the current page ” Prompt box
Badboy When you record the script , Always pop up the following pop-up box prompt “ There is an error in the script of the current page ”.

open Badboy —> preferences —> Click on playing —> Check Javascript Error Dialogs, And then again Badboy Just tools .

Check “JavaScript Error Dialogs”, It means automatic processing / Inhibition JavaScript Error dialog .
summary
All of these are Badboy The most basic usage , There are also many functions to learn in the future 、 Accumulate slowly .
a key : Supporting learning materials and video teaching
So here I have carefully prepared the detailed information of the above outline in The link below is as follows


边栏推荐
- 抓包工具charles实践分享
- Flink cluster construction and enterprise level yarn cluster construction
- What are the characteristics of EDI local deployment and cloud hosting solutions?
- 解决Deprecated: Methods with the same name as their class will not be constructors in报错方案
- 【资源分享】2022年第五届土木,建筑与环境工程国际会议(ICCAEE 2022)
- Six states of threads
- 包装类型与基本类型的区别
- H5网页如何在微信中自定义分享链接
- Learn to use PHP to implement unlimited comments and unlimited to secondary comments solutions
- 线程调度的常用方法
猜你喜欢

Record the range of data that MySQL update will lock

栈题目:函数的独占时间

图解杂项【防止丢失进行存档用的】

分布式事务原理以及解决分布式事务方案

使用swiper左右轮播切换时,Swiper Animate的动画失效,怎么解决?

2022 the most complete and detailed JMeter interface test tutorial and detailed interface test process in the whole network - JMeter test plan component (thread < user >)

Status of the thread pool

283.移动零

Baidu online disk download has been in the process of requesting solutions

2022全网最全最细的jmeter接口测试教程以及接口测试流程详解— JMeter测试计划元件(线程<用户>)
随机推荐
3. addition, deletion, modification and query of employees
2.登陆退出功能开发
tf.contrib.layers.batch_norm
抓包工具charles實踐分享
整理接口性能优化技巧,干掉慢代码
分布式系统你必须了解的点-CAP
Uniapp develops a wechat applet to display the map function, and click it to open Gaode or Tencent map.
卷妹带你学jdbc---2天冲刺Day1
Record the range of data that MySQL update will lock
包装类型与基本类型的区别
SSM integration
JMeter接口测试工具基础 — Badboy工具
88.合并有序数组
Uniapp implements the function of clicking to make a call
HBuilder制作英雄皮肤抽奖小游戏
学习使用php对字符串中的特殊符号进行过滤的方法
学习使用phpstripslashe函数去除反斜杠
Status of the thread pool
学习整理在php中使用KindEditor富文本编辑器
Leetcode interview question 01.05: primary editing