Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Badboy Automated Test tool 2 recording

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Badboy provides recording in two modes: Request (default mode) and navigation mode. Click figure N below to switch the mode. The recording area is the right half of the Badboy-the content control area.

Step1: enter the address (http://www.baidu.com), and click the recording button, such as the red recording button (Noted: by default, recording is triggered automatically when you click the right arrow to request)

Enter Badboy for Step2 and click on Baidu

Step3 Click Badboy Software Home Page

Step4 Badboy will use its own built-in controls to open the newly opened web page and click Info

Step5 close the form

Step6 clicks Record again to end the recording.

At this point, please look at the top and bottom 2 figures, the tree panel of the two script areas shows a very different form of recording script.

The above image shows Request mode, and the following image shows Navigation mode, recording the same operation process. It can be found that the buttons recorded in Navigation mode or the Text or ID of link depend heavily on the interface.

Request mode has the following advantages: if the tested web template is modified, it does not affect the playback of the script. If you need to export badboy scripts to jmeter for performance testing, you must select request mode.

The disadvantages of request mode are as follows: request mode requires a large number of breakpoints to check the item on the page.

*

Navigation mode will record the click actions of elements in browser during website interaction. When playing back the navigation mode script, not only the http request is played back, but also the badboy simulates the click action in brower.

The disadvantage of navigation mode is that the navigation script cannot be used for performance testing, because the performance test engine runtime does not display any user interface, so it can not perform actions such as simulated clicks in navigation.

The three elements of Navigation recording browser are as follows: 1 link click 2 button click 3 other clicks, such as initiating javas crankpt operation. When you record a click on an element, it uses the following logic to record the element name:

1. If it has an id, then it will record the id

two。 If it has a unique name, it will record the name

3. If it is a link or a button and has unique and easily recognizable text (such as a label on the button), it will record the text and distinguish between other elements or controls

4. If no other method is used, it will identify the location of the element in the browser DOM and record it using an JavaScript expression.

Conclusion: whether to choose navigation mode or request mode depends on the purpose of testing. If you only require the test function and do not care about the interface, then request mode is undoubtedly the first choice.

But from the point of view of how I use it:

1 when the interface of the software tends to be stable, it is more convenient to use N mode to do regression test. Request often does not recognize controls, especially pop-up forms, especially slow to respond to calendar controls, such as Oracle ADF controls, which report a lot of no found errors

2 Badboy must set aside time to record actions and input values, and also take into account factors such as the reaction speed of the website, so the movement must be slow when recording, and the movement is clean and clean.

3 after recording the script must run again, according to the observation of the running process, and then delete and make up the recording process. (the course of running scripts will be released one after another)

(4) to reduce the coupling in the recording process, the minimum unit of the test point is Step. Suppose that after logging in to Taobao, delete the items in the shopping cart, at least 3 Step,1 login 2 select the shopping cart 3 to delete the items in the shopping cart. The advantage of this is that when play scripts, you can choose to start with step2 without having to log in repeatedly.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report