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

Application of LoadRunner in Mobile performance Test

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

If you have done performance testing before, I am sure you will have applied the famous performance testing tool-LoadRunner. At present, the latest version of LoadRunner is LoadRunner 12.0. according to the needs of performance testing in the mobile market, LoadRunner also provides some protocols and corresponding tools based on mobile platform. In this section, we will introduce how to use "HP LoadRunner Mobile Recorder" to record the script of mobile application business, how to use VuGen to edit the script, how to use Controller to design, monitor and execute business load scenarios, and how to use Analysis to analyze the results. Let's take a look at how to apply LoadRunner12.0 to implement mobile platform performance testing.

First, download a mobile script recording tool "HP LoadRunner Mobile Recorder" from "Google play", as shown in figure 9-37.

Figure 9-download information about "HP LoadRunner Mobile Recorder" on 37Google Play

After downloading the installation package, install it to the phone, and an icon will appear on the phone after installation. Double-click the icon to open the "HP LoadRunner Mobile Recorder" application, as shown in figure 9-38.

Here, we click the "Advanced options" link to enter the "AdvancedSettings" activity, as shown in figure 9-39. Then, by selecting the "Export automatically after recording" option, we can see at the bottom of the activity that the automatic save path is "/ storage/sdcard0/Android/data/com.hp.mobileRecorder/cache" after recording the script.

Figure 9-38 "HP LoadRunner Mobile Recorder" main activity interface information figure 9-39 "AdvancedSettings" activity

After setting this option, return to the "HP LoadRunner Mobile Recorder" main activity, click the "StartRecording" button, the color of the button changes from blue to red, and the name of the button changes to "Stop Recording", as shown in figure 9-40. You can record the applications you need to operate. Here we want to open my blog and read the article entitled "Mobile platform Automation testing starts from scratch-MonkeyRunner tool usage (Section 2)". You can press the "Home" button on your phone, open the IE browser, enter my blog address "http://tester2test.cnblogs.com", and then click the link to the article entitled" Mobile platform Automation testing starts from scratch-MonkeyRunner tool use (Section 2) ", as shown in figure 9-41.

Figure 9-40 interface after recording starts

Figure 9-41 "Mobile platform Automation testing starts from scratch-use of MonkeyRunner tools (Section II)"

Finally, click the "Stop Recording" button to stop recording, and then "HP LoadRunner Mobile Recorder" pops up an activity window for distributing the recorded script package, so you can choose to distribute the script package by mail or QQ according to your actual situation. Here we cancel the distribution and return to the "HP LoadRunner Mobile Recorder" main activity interface, as shown in figure 9-42. At the same time, you can see the generated script package name "2015-06-26 14-32-33.lrcap". Then we can use mobile assistant software to download the script package "2015-06-26 14-32-33.lrcap" to our computer, taking 360mobile assistant as an example, as shown in figure 9-43.

Figure 9-42 "HP LoadRunner Mobile Recorder" main activity interface information

Figure 9-43 "2015-06-26 14-32-33.lrcap" script package file information

Here we download the "2015-06-26 14-32-33.lrcap" script package file to my "C" disk root directory, and then double-click the file directly, the system will automatically call LoadRunner's Vugen to open it, as shown in figure 9-44.

Figure 9-44 "2015-06-26 14-32-33.lrcap" script package file information opened with Vugen

Is it not much different from our normal Web script? You can play back the script like other Web scripts, click the "Replay" button, and the playback result will be automatically displayed after the playback is completed, as shown in figure 9-45.

Figure 9-45 playback result information

Click the "The TestResults" link to view the specific playback content, as shown in figure 9-46.

Figure 9-46 specific playback result information

Of course, you can also modify and improve the content of the script according to the actual situation, such as adding transactions, parameterizing the script, and so on.

You can also use Controller to select the modified script to design the load scenario and add some performance counters that need to be examined, as shown in figure 9-47.

Figure 9-47 Design load scenario in Controller

After the scene is designed, click the "Start Scenario" button to execute the scene. After the scene execution is complete, LoadRunner will automatically generate the test results. You can analyze the results by applying the "Analysis" tool, as shown in figure 9-48.

Figure 9-48Analysis Analysis execution result

If you are not very familiar with the operation and analysis of LoadRunner, it is recommended to refer to another book of the author, "proficient in Software performance testing and LoadRunner Best practice", which gives you a detailed introduction to the related concepts, classification, indicators, testing process and the use of LoadRunner tools and their detailed cases.

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