Jmeter (twenty-eight) - From entry to proficiency - Jmeter Http protocol recording script tool - Badboy1 (detailed tutorial)

1 Introduction

   When using jmeter to automatically record scripts, many useless requests will be generated, so it is recommended to use badboy to record the script and save it as a jmx file, and then open it in jmeter. Therefore, Brother Hong will introduce the tool Badboy here. He originally planned not to introduce it because this tool is no longer maintained and updated. However, considering that some children's shoes cannot test the script by hand, Brother Hong still wants to do some. Time to introduce this popular recording tool.

2.Introduction to badboy

 Badboy monitors the activities of Internet Explorer and provides recording/playback functions. Recording function: The top of the Badboy window displays whether it is currently recording. If you click the play button, Badboy automatically turns off the recording function. After the play is over, you can click the recording button to continue recording. script. 

Note: You must wait until the previous request is processed before clicking to send the next request, otherwise the next request will be used as a sub-frame of the first request.

1. Lightweight free testing tool;

2. Functional testing is possible, mainly performance testing;

3. It can be used for stress testing of simple tasks alone, or as a Jmeter script development tool. Mainly used by testers. There are also a small number of functions that support developers’ debugging and self-testing.

 If you want to learn automated testing, I recommend a set of videos to you. This video can be said to be the number one automated testing tutorial on the entire network played by Bilibili. The number of people online at the same time has reached 1,000, and there are also notes that can be collected and communicated with various channels. Master technical communication: 798478386   

[Updated] A complete collection of the most detailed practical tutorials on Python interface automation testing taught by Bilibili (the latest practical version)_bilibili_bilibili [Updated] A complete collection of the most detailed practical tutorials on Python interface automated testing taught by Bilibili (practical version) The latest version) has a total of 200 videos, including: 1. Why interface automation should be done for interface automation, 2. Overall view of request for interface automation, 3. Interface practice for interface automation, etc. For more exciting videos from UP master, please follow the UP account . https://www.bilibili.com/video/BV17p4y1B77x/?spm_id_from=333.337.search-card.all.click

3.Download

1. The official website address http://www.badboy.com.au/ used to be accessible. Brother Hong recently tried it and it is no longer accessible. It may be because it is not updated and maintained, so Brother Hong provided an installation package, you can download and install it yourself, as follows:

 badboy installation package: Link: https://pan.baidu.com/s/1Ae3tLuP3q7301SzyXDGw2A Extraction code: jcg5 

2. Download and install (fool-proof installation, Brother Hong will not go into details here)

3. Click on the icon of the installed badboy, and you will see the Badboy IDE interface. The picture below is a simple annotation of the interface by Hong Ge, including a screenshot of the introduction of the Badboy official website.

4. This is a detailed introduction, as shown in the figure below:

4. Overview of interface and functions

4.1 Menu bar

1.File: includes commonly used functions such as opening scripts, creating new scripts, exporting scripts, and saving scripts.

2.Edit: Click Search/Replace under the Edit menu and the following interface will pop up in the panel to help us select and replace functions in the script. Click the X to close the window. Of course, we can also use the F3 shortcut key to pop up this interface.

3.View: Click and click again to change the display and hide the view area. The Report function also has 3 customizations for users to choose from. This part will be explained in future courses.

4.Tools: There are many functions in it. For example, we can configure the data source to automatically fill in the data to the test system. Especially when some test point values ​​cannot be unique, reading from the data source is a very common method. QTP is Can easily read Excel data

5.Preferences: We can change system settings under the General Tab. For example: Under the default configuration, recording is automatically triggered when you click the arrow on the right to request. If you want to cancel this configuration, you can remove the check, as follows. 

 

6. Help:

 Click Content to help with the documentation. My series of articles are also organized and based on Badboy's help documentation.

4.2Tools bar: Introduction to some tools

1. Create test groups, test units, and steps

2. Recording mode: Request and Navigation

 3. Run script: We are also used to call running script

4. Others: open, hold, capture screenshots, create variables, timing, etc.

4.3 Browser address bar

Since the Badboy recording area is the content area on the right half, the starting point of the website should be launched in the address bar

 

4.4 Script tree

In the early low-level version of Badboy, there was only the Step level. In the subsequent updates and iterations, Badboy began to introduce the concepts of Suite and test in the later versions. The benefits of this are more obvious in the script. The levels are clear to testers and maintainers can easily take over later. Here we will test the essay publishing function of the blog park as an example to carry out scenario learning for all subsequent courses. Children or friends who have been exposed to testing should understand that if we test the blog garden, the essay publishing function is only a function of one of the modules. The blog garden has many other functions. I have listed the simple function list and test below. Idea:

 Level description: If we all use Step to summarize all test steps, it is still not easy to understand and find just using Step name or ID to distinguish them. Now, we can position the first-level function as the Suite level, Test as the test point, and Step Layers are different scenarios for testing. Of course, Badboy does not explicitly stipulate that multiple Suites or Tests must be used, but by default when adding a Test, subordinate Steps will be automatically added, and the Tests are on a tree level, as shown in the following figure:

Create a hierarchy for publishing essays according to the introduction to work, as shown in the figure below:

 

Add: In addition to clicking the icon above, you can also do this: right-click and select Add

 

Rename: After double-clicking the name, a dialog box will pop up. You can enter a new name and description. Click OK to save the operation.

 Delete: Right-click and select Delete 

 Template template: Right-click and select Save as Template. Using templates can effectively reflect the concept of script reuse. For example, we can keep a login script with two input items and no verification code as a template. When there are other websites that use this login method, , it can be introduced directly without recording again.

Guess you like

Origin blog.csdn.net/Faith_Lzt/article/details/132562781