Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
User Guide
V3 August 2014
Copyright
The information in this document is subject to change without notice. No part of this document may be
reproduced, stored or transmitted in any form or by any means, electronic or mechanical, for any
purpose without the express written permission of: Perfecto Mobile Ltd.
Perfecto Mobile Ltd. assumes no liability for any damages incurred, directly or indirectly, from any
errors, omissions or discrepancies between the software and the information contained in this
document.
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Contents
1 Terms & Definitions .............................................................................................................................. 3
2 Introduction .......................................................................................................................................... 4
3 Setup Pre-Requisites ............................................................................................................................. 5
4 Reference Documentation .................................................................................................................... 5
5 Examine network conditions impact on mobile user experience......................................................... 6
6 Examine server load impact on mobile user experience .................................................................... 13
7 Reporting............................................................................................................................................. 17
8 Appendix A- Inside the VuGen template ............................................................................................ 18
9 Appendix B- Creating a VuGen Web Performance Script ................................................................... 22
10 Appendix C - Using the HP Password Encoder ................................................................................ 23
Table of Figures
Figure 1: Perfecto Mobile Performance Solution ......................................................................................... 4
Figure 2: Perfecto Mobile Performance solution architecture ..................................................................... 4
Figure 3: MobileCloud Automation Sample Script ....................................................................................... 8
Figure 4: Viewing TCP traffic using Wireshark ............................................................................................ 12
Figure 5: PCAPPerf network traffic analysis................................................................................................ 13
Figure 6: HP LoadRunner Analysis - Transaction Summary in Summary Report ........................................ 17
Figure 7: HP LoadRunner Controller - Interactive Schedule Graph ............................................................ 17
Figure 8: Sample Script - Execute MobileCloud Automation ...................................................................... 19
Figure 9: Sample Script - Check Execution Status of MobileCloud Automation Script............................... 20
Figure 10: Sample Script - Collect and Analyze MobileCloud Automation Script ....................................... 21
Figure 11: Create new script in VuGen ....................................................................................................... 22
Figure 12: Record web transaction in VuGen ............................................................................................. 23
Figure 13: VuGen recording toolbar ........................................................................................................... 23
Figure 14: VuGen parameter replacement dialog ...................................................................................... 23
Figure 15: HP Tool password encoder ........................................................................................................ 24
Page 2 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
* Disclaimer: Any and all references to the HP tool chain: LoadRunner, Performance Center, VuGen and
password encoder should all be considered as recommendation. Please turn to HP.com for proper
documentation and guidance regarding using the HP tool chain.
Page 3 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
2 Introduction
This document details the setup process for implementing the Perfecto mobile performance product for
measuring the mobile users experience during impacted network and server load conditions.
The Perfecto MobileCloud provides real devices, connected via Wi-Fi or cellular carriers to the internet,
and spread in different locations. The Perfecto performance product enables real mobile device testing
on simulated network and server load conditions.
This solution enables users to measure response time and availability of key transactions inside a mobile
application, under simulated real-world conditions. This new product handles this complex and
challenging process composed of unpredictable network conditions and varying server loads, alongside
mobile device performance under such conditions.
Page 4 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
3 Setup Pre-Requisites
Before getting started, be sure to complete the following pre-requisites list. All listed items are required,
and can be obtained from Perfecto Mobile Support.
3.1 Required
Acquired from Perfecto Mobile Support:
3.2 Optional
Packet capture analysis tools:
Wireshark, Shunra Analytics (available from HP Software), http://pcapperf.appspot.com
4 Reference Documentation
4.1 Perfecto Mobile
Help Knowledgebase
HTTP API guide
HP VuGen Sample Script and LoadRunner Template
4.2 HP
HP LoadRunner user guide
Online from here
HP VuGen user guide here
Page 5 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Tip:
It is recommended follow the ScriptOnce1 methodology so your script is applicable for all the
devices you are targeting.
Step 1. Start your script by doing some cleanup and proper launch.
Its very important to clean browser cache/ remove application from resident memory
and ensure a consistent script starting point to ensure script stability and timers
accuracy.
In the case of a mobile application, the recommendation is to use the following
sequence:
- Close application
- Wait(5)
- Start application
In the case of a browser, it is recommended to clean the browser cache. Its certainly
recommended to use the device generic browser (ex.: safari) as opposed to an
instrumented browser.
Step 2. Identify the KPIs to be measured.
These are the Key Performance indicators (KPIs) you are interested in monitoring.
Note:
A KPI is a measurement of response time and availability of a user facing
transaction. It can be composed of a single or multiple user action(s)
In our example, the CNN page load time is our KPI.
1
Perfecto Mobile's patented ScriptOnce technology allows the creation of device agnostic test objects. With this
technology you can write a script and re-use it on multiple platforms and networks with minimal to no
modifications to the script.
Page 6 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Page 7 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Page 8 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Device vitals start Begin collection of device vitals for the mobile device. It is recommended to
leave the parameters field as-is (collect-all) and set the collection frequency to run at the highest
possible frequency.
Device vitals stop- this will stop the collection of the device vitals
Get Vitals- this will get an immediate reading of the vitals selected
The script execution report will have a tab labeled performance, where a CSV file will be available to
download, containing all device vitals.
At the time of writing this document not all commands are supported across all iOS/Android platforms.
Therefore it is recommended to set the error policy for the above commands to catch so that they do
not fail the script in case a device is not supported.
For network conditions testing, the device being used is connected to the Web via WiFi.
Use the above Network virtualization start and the Network virtualization update commands to activate
and update the network conditions. Without this activation there is no effect on the device
communication to the Web.
Page 9 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Page 10 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Page 11 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Note that in case the packet payload is encrypted you may need to decrypt the packets payload. Heres
one link describing the process.
Page 12 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
This use-case measures the impact of a server load on real mobile devices, leveraging the HP
Performance Center LoadRunner tool to execute the following:
LoadRunner will present reporting for both approaches, as well as the script execution result for each
device from Perfecto Mobile.
Page 13 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
6.1 Creating a VuGen script from the network sniffer (PCAP) file to
facilitate the backend server load
This step is optional and only required if there is no existing backend load traffic script available; Use the
PCAP file generated in the previous section, and import it into VuGen.
You will notice in the LoadRunner scenario there are two groups, each of them based on a single real
device. The base script is called Real_Device_Template and it is meant to drive real devices in the
Perfecto cloud while load is applied on the backend.
You will want to leave the number of virtual users the way it is (1 virtual user) for each of them. You can
change the group name to reflect a logical name you want to call one of the devices in your test. You
may want to extend the duration of the test by clicking on Duration at the bottom-left side of the
screen. You then want to set the runtime parameters for your script. You do that by highlighting the
group row and doing a right-click, selecting Run time Settings. Below are all the VuGen parameters:
Page 14 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Page 15 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Repeat the same process for the 2nd device in your script. If you do not have a 2nd device to run
your script, delete the group.
Run your scenario once to ensure it works well.
Add to your scenario more groups based on the number of real devices you want to run in
parallel to the load. Ensure the script you are pointing to is the same Real_Device_Template
script.
Add to your scenario the script you created that emulates a mobile virtual user, as described
here
Add to your scenario a web load script. See here instructions how to create one.
Eventually you should have a complete scenario as shown below. Run your scenario, observe the
response time(s) for web, virtual mobile user and the various devices. For each Perfecto script execution
you can refer back to the execution center of your cloud to get the complete Perfecto report,
.PCAP/.Shunra file and device vitals.
Once the scenario is complete, you can click on Results->analyze results to gain access to the
LoadRunner reports
6.3 Best practices configuring real device testing from inside LoadRunner
The following does not replace the LoadRunner manual. This is an explanation how to configure the real
device sampling while emulated load is running.
You may want to create several scripts that will each run on a different device while the emulated load
is in effect. Ensure that for each script:
Page 16 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
7 Reporting
Refer to the HP LoadRunner user manual for instructions on viewing load session reports. If the load
session was completed successfully, you should be able to obtain KPIs from real devices that are
materially different from those extracted by the emulated load.
Refer to the reporting interface inside Perfecto portal to view specific real device script execution
report.
Page 17 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
The VuGen script includes HTTP API operations that communicate with the MobileCloud.
This section describes all of the VuGen sample script components. These include:
1. Execute MobileCloud Automation Script:
Send an execution query to the MobileCloud MCM to execute the Automation script
2. Check MobileCloud Automation Script Execution Status:
Query the MobileCloud for the Automation script execution status loop querying every 30
seconds until execution is complete
3. Collect and Analyze MobileCloud Script run Report:
Translate KPIs in MobileCloud report to HP BSM - Report KPI
Return MobileCloud HTML report to HP BSM in case of error - Report Snapshot OnError
Page 18 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
How to use:
See the Start New Execution Perfecto Mobile Help KB article for more information on how to use
this HTTP API operation.
Page 19 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
How to use:
See the Get Execution Status Perfecto Mobile Help KB article for more information on how to
use this HTTP API operation.
Page 20 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Figure 10: Sample Script - Collect and Analyze MobileCloud Automation Script
How to use:
See the Download Execution Report Perfecto Mobile Help KB article for more information on
how to use this HTTP API operation.
Page 21 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Page 22 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Select the browser you want to use, the URL you want to go to and hit start recording. Your browser
will show and any transaction will record until you hit stop.
Next, VuGen will offer a dialog to replace parameters as you prepare for multi-virtual user test.
You can now add your web load script to your Performance Center/LoadRunner scenario.
Go to Start > HP Software > HP LoadRunner > Tools > Password Encorder.
Enter your password, click Generate, and Copy to copy the encrypted password to your clipboard.
Page 23 of 24
Mobile Performance User Guide: MobileCloud Automation and HP BSM
Page 24 of 24