HP LoadRunner with Mobile Center Quick Start
Transcription
HP LoadRunner with Mobile Center Quick Start
HP Mobile Center Software Version: 1.10 LoadRunner with Mobile Center Document Release Date: May 2015 Software Release Date: May 2015 LoadRunner with Mobile Center Legal Notices Warranty The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. The information contained herein is subject to change without notice. Restricted Rights Legend Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. Copyright Notice © Copyright 2015 Hewlett-Packard Development Company, L.P. Trademark Notices Adobe® is a trademark of Adobe Systems Incorporated. Microsoft® and Windows® are U.S. registered trademarks of Microsoft Corporation. UNIX® is a registered trademark of The Open Group. Red Hat® is a registered trademark of Red Hat, Inc. in the United States and other countries. Apple and the Apple logo are trademarks of Apple Computer, Inc., registered in the U.S. and other countries. iPad® is a trademark of Apple Inc. iPhone® is a trademark of Apple Inc. Google™ © 2012 Google Inc. All rights reserved. Google and the Google Logo are registered trademarks of Google Inc. Documentation Updates The title page of this document contains the following identifying information: l l l Software Version number, which indicates the software version. Document Release Date, which changes each time the document is updated. Software Release Date, which indicates the release date of this version of the software. To check for recent updates or to verify that you are using the most recent edition of a document, go to: https://softwaresupport.hp.com. This site requires that you register for an HP Passport and sign in. To register for an HP Passport ID, go to https://softwaresupport.hp.com and click Register. Support Visit the HP Software Support Online web site at: https://softwaresupport.hp.com HP Mobile Center (1.10) Page 2 LoadRunner with Mobile Center This web site provides contact information and details about the products, services, and support that HP Software offers. HP Software online support provides customer self-solve capabilities. It provides a fast and efficient way to access interactive technical support tools needed to manage your business. As a valued support customer, you can benefit by using the support web site to: l l l l l l l l Search for knowledge documents of interest Submit and track support cases and enhancement requests Download software patches Manage support contracts Look up HP support contacts Review information about available services Enter into discussions with other software customers Research and register for software training Most of the support areas require that you register as an HP Passport user and sign in. Many also require a support contract. To register for an HP Passport ID, go to: https://softwaresupport.hp.com and click Register. To find more information about access levels, go to: https://softwaresupport.hp.com/web/softwaresupport/accesslevels. HP Software Solutions & Integrations and Best Practices Visit HP Software Solutions Now at https://h20230.www2.hp.com/sc/solutions/index.jsp to explore how the products in the HP Software catalog work together, exchange information, and solve business needs. Visit the Cross Portfolio Best Practices Library at https://hpln.hp.com/group/best-practices-hpsw to access a wide variety of best practice documents and materials. HP Mobile Center (1.10) Page 3 LoadRunner with Mobile Center Contents Welcome to mobile performance testing with HP LoadRunner 5 Create and run performance tests 7 How do I set up my testing environment? 7 How do I connect LoadRunner to Mobile Center? 9 How do I record a TruClient-Native Mobile test script? 10 How can I enhance my TruClient-Native Mobile script? 14 What runtime settings should I define before running the test? 21 How do I run my test and view results? 24 Step Arguments Reference for TruClient-Native Mobile Scripts 25 Troubleshooting and FAQs 35 Send Us Feedback 37 HP Mobile Center (1.10) Page 4 LoadRunner with Mobile Center Welcome to mobile performance testing with HP LoadRunner Welcome to mobile performance testing with HP LoadRunner Use HP LoadRunner Virtual User Generator to record and run single-user performance tests for mobile apps on real mobile devices hosted on HP Mobile Center. HP Mobile Center helps you take control of your mobile reality, and addresses the challenge of optimizing mobile app quality and user experience throughout the application lifecycle. Built on native HP technology, HP Mobile Center leverages our expertise in functional and performance testing, and integrates mobile testing with Sprinter, Unified Functional Testing, LoadRunner, Performance Center, and Network Virtualization. Using the TruClient - Native Mobile protocol, you can create and run single-user performance tests for native mobile apps on a variety of devices that run on Android or iOS. LoadRunner connects to the Mobile Center server and accesses the mobile devices attached to it. LoadRunner then interacts with the apps and runs performance tests on the devices. What's New in HP LoadRunner with HP Mobile Center 1.10 l Highlight and replace recorded test objects in HP TruClient-Native Mobile scripts. l Run your tests on a network profiles previously defined in HP Network Virtualization for Mobile Center. l Use HP Mobile Web apps for iOS and Android to test mobile web applications. l Hotfix! Use Script Once to record tests on one platform ( iOS or Android) and replay on another. To download the hotfix, see below. How do I update LoadRunner? HP Mobile functionality on HP LoadRunner is provided with LoadRunner 12.02 patch 2. l LoadRunner 12.02 patch 2: l Download the following LoadRunner 12.02 patch 2 component updates and install them on top of LoadRunner 12.02 or LoadRunner 12.02 patch 1: Note: For full installation instructions, see the LoadRunner 12.02 patch 2 Readme: https://softwaresupport.hp.com/group/softwaresupport/search- HP Mobile Center (1.10) Page 5 LoadRunner with Mobile Center Welcome to mobile performance testing with HP LoadRunner result?keyword=KM01589630 o LoadRunner Full: https://softwaresupport.hp.com/group/softwaresupport/search-result//facetsearch/document/LID/LR_03526 o LoadRunner Load Generator: https://softwaresupport.hp.com/group/softwaresupport/search-result//facetsearch/document/LID/LRLG_00111 o LoadRunner Virtual User Generator: https://softwaresupport.hp.com/group/softwaresupport/search-result//facetsearch/document/LID/LRVUG_00178 l Hotfix: To download the LoadRunner 12.02 patch 2 Hotfix for BPM and the Script Once feature, see https://softwaresupport.hp.com/group/softwaresupport/search-result//facetsearch/document/KM01626588. HP Mobile Center (1.10) Page 6 LoadRunner with Mobile Center Create and run performance tests Create and run performance tests Using the TruClient - Native Mobile protocol, you can create and run single-user performance tests for native mobile apps on a variety of devices that run on Android or iOS. LoadRunner connects to the Mobile Center server and accesses the mobile devices attached to it. LoadRunner then interacts with the apps and runs performance tests on the devices. What do you want to do? 1. Set up my testing environment. 2. Connect to the Mobile Center server. 3. Record a test script. 4. Enhance my script. 5. Configure runtime settings for my test. 6. Run my test and view results. How do I set up my testing environment? HP Mobile Center must already be set up with the devices you want to test. HP Mobile Center (1.10) Page 7 LoadRunner with Mobile Center Create and run performance tests Make sure the following prerequisites are met: HP Mobile Center setup & Learn how application preparation HP Mobile Center must be installed. Go to the HP Mobile Center Help: http://mobilecenter.hp.com/docs/en/latest/ Mobile devices must be connected to HP Mobile Go to the HP Mobile Center Help: Center. http://mobilecenter.hp.com/docs/en/latest/ LoadRunner must be able to connect to HP Mobile See "How do I connect LoadRunner to Mobile Center. Center?" on the next page Browser cookies must be enabled. See your browser's help. Next step: Connect to the Mobile Center server HP Mobile Center (1.10) Page 8 LoadRunner with Mobile Center Create and run performance tests How do I connect LoadRunner to Mobile Center? 1. Launch Virtual User Generator. 2. In the Create a New Script dialog box, under the Single Protocol or Mobile category, select TruClient – Native Mobile. 3. Click Develop Script. A browser window open, displaying the TruClient sidebar on the left. 4. Click General Settings . 5. In the dialog box that opens, click the Mobile Center Settings tab. 6. Enter the details of the HP Mobile Center server: l Enter the server address in the following format: machine IP:port For example, 123.45.67.89:8080 l Enter the user name and password used to access the server. 7. Click Done to connect to Mobile Center. Mobile Center opens in the right browser pane. Next step: Record your TruClient-Native Mobile script. HP Mobile Center (1.10) Page 9 LoadRunner with Mobile Center Create and run performance tests How do I record a TruClient-Native Mobile test script? 1. Launch Virtual User Generator. 2. In the Create a New Script dialog box, under the Single Protocol or Mobile category, select TruClient – Native Mobile. 3. Click Develop Script. A browser window open, displaying the TruClient sidebar on the left. 4. If are connected to the Mobile Center server, Mobile Center is displayed on the right. If you do not see Mobile Center, see "How do I connect LoadRunner to Mobile Center?" on the previous page. 5. Click the HP Mobile Center (1.10) button and select the app that you want to test: Page 10 LoadRunner with Mobile Center Create and run performance tests (Optional) You can filter the application list by: l entering the name of a mobile application l selecting a mobile operating system Click an application to select it. You can select only one application. If the required application is not displayed, you can upload the app by clicking the Upload app É box. Note: To enable record and replay functionality when testing, HP record and replay libraries need to be added to the app. When you upload an app, HP Mobile Center automatically packages the app with the libraries needed for testing. iOS apps: When you upload an app, HP Mobile Center also re-signs the app with your Enterprise/ Developer certificate and provisioning profile, provided that your administrator has configured HP Mobile Center for automatic packaging of iOS apps. If you are unable to upload your app to HP Mobile Center, try packaging your app from the command line using HPMC Enabler and then upload it to HP Mobile Center. For more details, see the HP Mobile Center Help. Limitations for uploading apps HP Mobile Center (1.10) Page 11 LoadRunner with Mobile Center Create and run performance tests l Maximum file size: 200MB l Android: o A maximum of 65,536 methods (including ~340 HP Mobile Center packaging methods) can be referenced within a single Dalvik Executable (DEX) file that contains the compiled code used to run an app. o MultiDex applications are not supported. Click to apply your selection. (The checkmark is enabled only after you select an application.) The number of days left until the HP Mobile Center license expires. 6. Click the Select Device button, and select an available compatible device to run the test on. (Optional) You can filter the list of devices by: l entering the name of a mobile device HP Mobile Center (1.10) Page 12 LoadRunner with Mobile Center Create and run performance tests l selecting/clearing the availability status check boxes Note: The mobile operating system filter is read-only. Only relevant devices are displayed. Click a device to select it. You can select one device only. Click to apply your selection. Note: The checkmark is enabled only after you select a device. Hover over a device to display additional options, including Delete device, Unlock device, and Device details. Note: When you select the device, it is locked on the Mobile Center server for your use only, until you release it. 7. In the Mobile Center pane, a remote access window opens, displaying the device you selected. The app you selected is launched on the device. 8. In the TruClient sidebar, click Record . 9. Interact with the emulated mobile device in the remote access window. As you perform actions, TruClient records the operations, and steps are added to the script. Use the Options panel on the left of the Mobile Center pane to add Back, Home, Menu, and Recent Apps actions. Note: l Even if the remote access window fails to complete the loading of the user interface or if there is a delay, TruClient can still continue to interact with the physical device, recording steps that you perform on the device itself. l To record only the coordinates where you touch the device, in the Options panel, switch Mobile Center to Analog recording mode. In this mode, when you touch the device, Touch on Device steps are created. l TruClient does not support recording the following actions from the Options panel: HP Mobile Center (1.10) Page 13 LoadRunner with Mobile Center Create and run performance tests o Device action: Change orientation o Simulate event actions: Receive call; Receive SMS; App to background; Location change You can add these actions manually, where needed. For details, see: o Device steps in the "Step Arguments Reference for TruClient-Native Mobile Scripts" on page 25 o l "How can I enhance my TruClient-Native Mobile script?" below Android only: The Home, Back, Recent Apps buttons can be recorded only from the Options panel in the Mobile Center pane, and not from the device itself. Alternatively. these steps can be added manually after recording the script. l When recording, the Recent Apps button behaves like the Home button, and brings the device to its home screen. 10. When you have finished recording your script, click Stop in the TruClient sidebar. Note: If you entered credentials while recording a test step, the password is not saved by the Mobile Center server. You need to open the corresponding TruClient step and edit the password field, replacing ******** with the real password. Next step: Edit and enhance the script as required. How can I enhance my TruClient-Native Mobile script? HP Mobile Center (1.10) Page 14 LoadRunner with Mobile Center Create and run performance tests What do you want to do? l "Reenter passwords entered during script recording" below l "Configure the Controller to run more comprehensive performance tests" below l "Enhance the script steps" on page 17 l "Debug my script" on page 18 Reenter passwords entered during script recording If you entered credentials while recording a test step, the password is not saved by the Mobile Center server. You need to open the corresponding TruClient step and edit the password field, replacing ******** with the real password. Configure the Controller to run more comprehensive performance tests When you record a new TruClient-Native Mobile script, the following hard-coded parameters are created automatically. By default, these parameters are empty in every TruClient–Native Mobile script you create: Parameter Description MobileApp The full name of the mobile application, for example. com.hp.app MobileDevice The identifier of the mobile device that is used to monitor the application. HP Mobile Center (1.10) Page 15 LoadRunner with Mobile Center Create and run performance tests Parameter Description MobileServerURL The URL or IP address of the Mobile Center server, followed by the port, in the format <IP>:<port> MobileServerUserName The user name to access the Mobile Center server MobileServerPassword The password to access the Mobile Center server You can use the MobileDevice parameter, for example, to configure your test in the Controller to run your script on more than one device: 1. In the Controller, create test using your script. 2. Add more Vusers to the test. Each Vuser will run on its own device. 3. Each device has a unique identifier, obtainable from Mobile Center (see table above). For each Vuser, fill in the MobileDevice paramater with the device's identifier. Because this parameter is defined as a unique parameter (which is updated only once in the lifecycle of a performance test), each Vuser will take one of the device identifiers and run on the corresponding device. So for a test to run on three devices, configure three rows with device identifiers. The first Vuser will use the first device in the list, the second will use the second, and so on. Similarly, l use the MobileApp parameter to run regression tests on different versions of your app l use the MobileServerUrl, MobileServerUsername, MobileServerPassword parameters to test the performance of devices in different locations HP Mobile Center (1.10) Page 16 LoadRunner with Mobile Center Create and run performance tests For more information, visit HP LoadRunner and Performance Center Blog: Run LoadRunner’s new TruClient–Native Mobile scripts on multiple devices in the HP Enterprise Business Community. Enhance the script steps Enhance your script as you would enhance any TruClient script. Add actions manually Using the TruClient Toolbox: l Add generic device actions that cannot be recorded, such as "Shake" (Android); Change Orientation; and so on. l Add generic object actions. Because objects do not always stay in the same location on mobile devices, for example, due to orientation changes, you can simulate these changes by adding generic object steps. See also "Parametrize object actions" below. l Insert wait time l Add calls to functions l Add flow control and other miscellaneous steps Parametrize object actions You can use parameters in object identification, but the object's structure must be identical in all the parametrized objects, with only a change in the text property. Example You record booking a plane ticket. To parametrize the airport name in your script: 1. Create a new parameter destAirPort. 2. In the Object > Javascript section, include the following code: HP Mobile Center (1.10) Page 17 LoadRunner with Mobile Center Create and run performance tests ArgsContext.TC.getParam("destAirPort"); Note: ArgsContext enables you to refer to arguments defined outside the argument section. For more details on implementing enhancements to your script: l Click in the TruClient sidebar to visit the HP TruClient Help l See "Step Arguments Reference for TruClient-Native Mobile Scripts" on page 25. For another example of object parametrization, visit HP LoadRunner and Performance Center Blog: Advanced script enhancements in LoadRunner’s new TruClient – Native Mobile protocol in the HP Enterprise Business Community. Debug my script You can debug your scripts using snapshots and logs. l Snapshots. TruClient generates snapshots of interactive steps during recording and replay of a script. Note: On iOS devices, the Snapshot on error feature is not supported for TruClient-Native Mobile scripts. Disable this feature before you begin running a test. In Virtual User Generator, go to Runtime Settings > Other, and set the Generate replay snapshot option to Never. The following table summarizes where each snapshot is generated: Mode Generated in Interactive Remote access window Load Mobile Center When you click TruClient's Snapshot button, the Snapshot Viewer displays the snapshot in the right browser pane and adds the following elements: UI Element Snapshot type HP Mobile Center (1.10) Description l Recording. Snapshots of specific step during recording. l Interactive Replay. Snapshots of a specific step during interactive replay. Page 18 LoadRunner with Mobile Center Create and run performance tests UI Element Slideshows Views Description l Iteration. Snapshots of a specific iteration during interactive replay mode. l Load Mode Replay. Snapshots of a specific step during load mode replay. l Play Slideshow. Displays snapshots as a slideshow. l Stop Slideshow. Suspends the playing of a slideshow. In the Snapshot Viewer's top-right corner, select how to view the snapshots: l Single. Displays the snapshot for a single step. l Compare. Splits the screen so you can compare snapshots from different modes. Use the Snapshot Type buttons in each pane to select which snapshots to view. Click the Synchronize Scrolling button to synchronize scrolling between the panes. The snapshot error icon ( ) indicates that the snapshot is not current for the step. l Slideshow. Displays the snapshots in thumbnail view. Previous/Next Navigate to the snapshot for the previous or next step. The corresponding step is highlighted in the script. l Logs. To facilitate debugging the script during replay, switch on the Extended Log: a. In Virtual User Generator, go to Runtime Settings > Log. b. Under Log Level and Associated Options, select Extended Log. In the TruClient–Native Mobile protocol, this log includes all of the communication between Mobile Center and TruClient. When replaying the script in VuGen, you can view the Extended log from script's Runtime Settings: Load mode Output pane > Replay Interactive script development Output pane > Browser > Replay The log looks as follows: WS send: [This is the message sent from TruClient t HP Mobile Center (1.10) Page 19 LoadRunner with Mobile Center Create and run performance tests o Mobile Center] {"type":"request","uid":0,"data":{"data": {"command":"executeStep","content":{"job":{"id":"9b0b6421-8f82-4575-91463e5196bf976b"}, "device":{"id":"08b094572133005a"}, [This is the device id that the vuser is using] "action":{"name":"SetText","parameters":{"value":"********"}},[These are the parameters sent by the user for the action] "testObject":{"accessibilityId":"","boundsInScreen": {"bottom":1109,"left":60,"right":1020,"top":991},"children": [],"className":"Input","eventTime":1866712,"eventType":16,"index":1,"isPass word":true,"packageName":"com.hp.advantage","parent": {"className":"android.widget.LinearLayout","parent": {"className":"android.widget.RelativeLayout","parent": {"className":"android.widget.FrameLayout","parent": {"className":"android.widget.RelativeLayout","parent": {"className":"View","parent": {"className":"android.widget.FrameLayout","parent": {"className":"View"}}}}}}},"resourceId":"com.hp.advantage:id/loginPasswordE ditText","tag":"","text":"","windowId":25}}}}}[This is the test object that the action is performed on. If you are familiar with the application implementation it can help you if there are problems with object identification] Next step: Set up runtime settings for your test HP Mobile Center (1.10) Page 20 LoadRunner with Mobile Center Create and run performance tests What runtime settings should I define before running the test? Where do I find it? To configure runtime settings: l In Virtual User Generator, or in the Controller, select Runtime settings > Load > Mobile Center Settings l In TruClient, click General Settings > Mobile Center Settings What do you want to do? l "I want my test to simulate a new user for each iteration" below l "I want use Network Virtualization" on the next page l "When I run my test, I want to monitor device vitals" on page 23 I want my test to simulate a new user for each iteration 1. In Virtual User Generator, or in the Controller, go to Runtime Settings > General > Replay, and ensure that the Simulate a new user for each iteration option is selected. 2. Access the Mobile Center Settings as described above. 3. Select how your app should behave between iterations: Restart app Restarts the app upon each iteration Install app before Reinstalls the application upon each iteration execution HP Mobile Center (1.10) l Delete app after execution. Deletes the application after each Page 21 LoadRunner with Mobile Center Create and run performance tests iteration. I want use Network Virtualization During your test runs, you can use virtualized networks for your mobile devices. This enables you to test the mobile device's performance in a variety of different scenarios with differing network performance. How do I integrate LoadRunner with HP Network Virtualization for Mobile? 1. In HP Network Virtualization for Mobile, create different profiles to simulate varying network conditions. For details on creating and deploying network virtualization profiles, see the HP Network Virtualization for Mobile User Guide. 2. Make sure that the HP NV for Mobile integration with HP Mobile Center is configured. For details, see the HP Mobile Center Help (http://mobilecenter.hp.com/docs/en/latest/). 3. Access the Mobile Center Settings: l In Virtual User Generator, or in the Controller, select Runtime settings > Load > Mobile Center Settings l In TruClient, click General Settings > Mobile Center Settings 4. You can select one of the predefined profiles or enter a user-defined profile. l l Predefined profiles Name Latency (ms) Packet loss (%) Bandwidth in (Kbps) Bandwidth out (Kbps) 4G Good 40 0 10,000 7,500 3G Good 80 0 2,000 512 3G Typical 120 0 512 256 3G Busy 200 0.5 384 128 2.5G Busy 300 0.5 128 56 NV for Mobile profiles. Any network profile defined in NV Test Manager is available for use from LoadRunner. This includes: o Custom profiles. Create a custom network profile in NV Test Manager by manually specifying the network parameters. o Imported profiles. Import a profile from the NV Global Library to NV Test Manager. HP Mobile Center (1.10) Page 22 LoadRunner with Mobile Center Create and run performance tests Note: If you are using a user-defined profile, make sure to type the name of the profile exactly as it was defined in HP Network Virtualization for Mobile. The profile name is case-sensitive. Where will I be able to view network traffic captured during the test? During a test run, all network traffic is captured and saved in the AnalysisResources.shunra file on the NV for Mobile machine. The file's data can be viewed using HP NV Analytics only. The results provide the actual performance results, and an analysis of those results. Note: You must have the appropriate permissions on the NV for Mobile machine to access the result folders. The results are stored in the location specified in the Replay log of the test at the end of each iteration. When I run my test, I want to monitor device vitals Before you run your test, you can select measurements to monitor while running your test in Load mode: 1. Access the Mobile Center Settings as described above. 2. Select the measurements your want to monitor. CPU on device CPU that is consumed on the device Free memory on device Memory that is available on the device Consumed memory on Memory that is consumed by the application under test on the device device Note: When you run your test, these measurements are saved in the Controller. You can view these measurements in Analysis , in the User Defined Data Points graph. Next step: Run the test HP Mobile Center (1.10) Page 23 LoadRunner with Mobile Center Create and run performance tests How do I run my test and view results? In LoadRunner, click Run. LoadRunner connects to HP Mobile Center and the remote access window opens, enabling you to watch the application's behavior as the test steps run. After the test run, you can view device vitals in Analysis , in the User Defined Data Points graph. If you used network emulation for testing, during a test run, all network traffic is captured and saved in the AnalysisResources.shunra file on the NV for Mobile machine. This file's data can be viewed using HP NV Analytics only. The results provide the actual performance results, and an analysis of those results. Note: You must have the appropriate permissions on the NV for Mobile machine to access the result folders. The results are stored in the location specified in the Replay log of the test at the end of each iteration. HP Mobile Center (1.10) Page 24 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Step Arguments Reference for TruClientNative Mobile Scripts The following table displays the step arguments categorized by role. Role Action Description Arguments Android iOS Device SetOrientation Sets the device orientation. Orientation. Required. √ √ Device SMSReceived Respond to event.True/false √ √ √ √ Background Time. Default value=10 From. The number of the SMS sender Body. The content of the SMS Device CallReceived Respond to event. True/false Background Time. Default value=10 From. The number of the SMS sender Device LocationChanged Latitude/Longitude. Maximum 180; Minimum -180. Required. √ √ Device ToBackground Respond to event. True/False √ √ √ √ √ x Background Time. Default value=10 Device Swipe Swipes the device in the specified direction. Direction. Required. Start X Offset/Start Y Offset. The x- and ycoordinates at which to start the swipe Note: The specified x- and ycoordinates are relative to the upper left corner of the device. The default value is the center of the device. Number Of Touches (for iOS only). The number of points to touch, emulating the number of fingers you would use for the gesture on a real device. Device pressHome HP Mobile Center (1.10) Presses the device's Home button. Page 25 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Role Action Description Arguments Android iOS Device pressBack Presses the device's Back button. √ x Device pressMenu Presses the device's Menu button. √ x Device pressRecentApps Opens the list of recent applications. √ x Device pressEnter Presses the device's keypad enter button. √ x √ x √ x √ x Relevant only in applications that support it. Device pressSearch Presses the device's keypad search button. Relevant only in applications that support it. Device pressDelete Device Touch Presses the device's delete button, if it exists. X Coordinate. The x-coordinate of the touch. Required. Y Coordinate. The y-coordinate of the touch. Required. Note: l The specified x- and ycoordinates are relative to the upper left corner of the device. l The touch operation is recorded in Analog mode. This is used as a workaround for objects that are HP Mobile Center (1.10) Page 26 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Role Action Description Arguments Android iOS not supported by HP Mobile Center. Device Scroll Recorded objects are scrolled into the application view automatically. Direction. The direction of the scroll operation. Required. √ x Object index. The index of the scrollable object on the screen. Default=1. If the object is not recorded, , you can scroll it by adding this device action. Device Shake Performs a Shake gesture on the device x √ View Tap Simulates X Offset/Y Offset. Horizontal and vertical tapping on the offset numbers device's screen. The combination of the x and y offsets gives the point of the tap. This is optional since the tap location is based firstly on the object representation, and only then on the x/y offsets. √ √ View LongPress Simulates a long press of the user. √ √ Android: No arguments. The LongPress location is decided according to the internal object representation. iOS: Number Of Taps. The number of times to tap the object. Integer value. Number Of Touches. The number of points to touch, emulating the number of fingers you would use for the gesture on a real device. Duration. The number of seconds to continue pressing. Double float. X Offset/Y Offset. The x and y-coordinates of the long press. Note: The specified coordinates are relative to the upper left corner of HP Mobile Center (1.10) Page 27 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Role Action Description Arguments Android iOS the object. The default value is the center of the object Number Of Touches. The number of points to press, similar to the number of fingers you would use for the gesture on a real device. View Get Property Property. The name of the property to retrieve. Required. √ √ √ √ Performs a Pan Start X Offset/Start Y Offset. The x- and y- √ gesture on the coordinates at which to start the Pan gesture. object. Required √ Variable. The name of the JavaScript variable to store value. Required View Swipe Direction. Required. Start X Offset/Start Y Offset. The x- and ycoordinates at which to start the swipe. Note: The specified coordinates are relative to the upper left corner of the device. The default value is the center of the device. Number Of Touches (for iOS only). The number of points to press, similar to the number of fingers you would use for the gesture on a real device. View Pan Note: The specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. End X Offset/End Y Offset. The x- and ycoordinates at which to end the Pan gesture. Required. Note: The specified coordinates are relative to the upper left corner of HP Mobile Center (1.10) Page 28 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Role Action Description Arguments Android iOS the object. The default value is the center of the object. Velocity X Offset/Velocity Y Offset. The horizontal and vertical velocity of the Pan gesture. View Pinch Rotation.. The scale for the Pinch gesture. This number is the ratio between the start distance and the end distance between the two touch point used for the pinch. Required. x √ Rotation. The degrees to rotate the device in. √ Required. √ For example, if you were to touch a screen with your fingers 6 cm apart, and pinch until your fingers were 3 cm apart, the scale would be 0.5. Velocity. The speed at which to perform the Pinch gesture. This number specifies the scale factor per second—that is, the ratio between the touch point distance at one second, and the touch point distance one second later. For example, if performing a pinch from 6 cm to 3 cm (0.5 scale) takes 2 seconds, then the velocity is 0.25. X Offset/Y Offset.. The x- and y-coordinates for the Pinch gesture. Note: The specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. View Rotation Velocity. The speed at which to perform the Rotation gesture. This number specifies the scale factor per second—that is, the ratio between the touch point distance at one second, and the touch point distance one second later. X Offset/Y Offset. The x- and y-coordinates for the Rotation gesture. HP Mobile Center (1.10) Page 29 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Role Action Description Arguments Android iOS Note: The specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. RadioGroup Select Index. The index of the button to select. Integer. √ √ √ √ x √ Text. The name of the button to select. String. One of these arguments must be specified. Scroller Scroll Android: No arguments. The Scroll location is decided according to the internal object representation. iOS: X Offset/Y Offset. The x- and y-coordinates of the long press. Required. Note: The specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. Scroller Zoom X Offset/Y Offset. The x- and y-coordinates of the zoom. Required. Note: The specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. Scale. The zoom scale (0.5 to reduce to half, 2 to double the size, on so on). Double floating value. Required. Button Inherits All View actions √ √ Label Inherits all View actions √ √ DateSelector Pick SelectedDate. The value to set in the √ DateSelector. This can be a time or a date or √ HP Mobile Center (1.10) Page 30 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Role Action Description Arguments Android iOS both. String value. Required. DateFormat. The format of the SelectedDate argument. Required. When recording a step with this method, TruClient uses one of the formats, depending on the date selector object used on the device. When editing a step with this method, you can also use other similar formats. The format you specify in the DateFormat parameter must match the format of the string you provide in the SelectedDate argument. Input SetText Value. The text to enter in the edit box. String value. Required. √ √ √ √ x √ If the recorded SetText action is for a password field, the step will contain •••••• instead of the actual string for security considerations. We strongly recommend to store the password encrypted and to use the TC.decrypt function to retrieve the argument. Input SetFocus Set the focus on the input object Input Unfocus Switch Set Value. “on” \ “off”. Required. √ √ Slider Slide Value. The new position for the slider. Required. √ √ Possible values for position are determined by the range of the slider. Checkbox Set Value. “on” \ “off”. Required. √ x CheckLabel Set Value. “on” \ “off”. Required. √ x ToggleButton Set Value. “on” \ “off”. Required. √ x RadioButton Set Value. “on” \ “off”. Required. √ x ItemSelector Tap No arguments. √ x The Tap location is decided according to the internal object representation. HP Mobile Center (1.10) Page 31 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Role Action ItemSelector Pick Description Arguments Android iOS Row index. The row index to select. Must be supplied if no ‘Row title’ argument is specified. Required. √ √ Row title. The row title to select. Must be supplied if no ‘Row index’ argument is specified. Column index. To column index that the ‘Row index’ and ‘Row title’ will be applied on. Required. X Offset/Y Offset. The x- and y-coordinates of the pick. Note: The specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. RatingBar Select Value. The rating value to select in the rating bar. Integer value. Required. √ √ Table Tap Row. The row index in the table to tap on. Integer value. Required. x √ √ √ √ √ Section. The section in the table to tab on. Usually the column. Required. X Offset/Y Offset. Number of horizontal and vertical pixels inside the table cell. Integer value. Table Select Row. The row index in the table to tap on. Integer value. Section. The section in the table to tab on. Usually the column. X Offset/Y Offset. Number of horizontal and vertical pixels inside the table cell. Integer value. Table Scroll Row. The row index in the table to tap on. Integer value. Section. The section in the table to tab on. Usually the column. X Offset/Y Offset. Number of horizontal and vertical indexes inside the table cell. Integer value. HP Mobile Center (1.10) Page 32 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Role Action Table Insert Description Arguments Android iOS Row. The numeric index of the item to insert. x Integer value. Required √ Section. The numeric index of the section to insert within the specified item. Usually the column. Table Delete Row. The numeric index of the item to delete. Integer value. Required. x √ Source row. The numeric index of the item to x move. Integer value. Required. √ Section. The numeric index of the section to delete within the specified item. Usually the column. Integer value. Default=0. Table Move Destination row. The numeric index of the new location for the item. Required. Source section. The numeric index of the section within the specified ‘Source row’ to move. Destination section. The numeric index of the new location for the section, within the specified ‘Destination row’. Table RemoveTableRow Row x √ PageControl Set Index. Required. The numeric index of the page to select. x √ Stepper Tap Value. Required. Should be "increment" or "decrement" x √ Row. The numeric index of the item to insert. x Integer value. √ CollectionView Scroll Section. The numeric index of the section to insert within the specified item. X Offset/Y Offset. The x- and y-coordinates of the scroll. Note: The specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. CollectionView Select HP Mobile Center (1.10) Item. The item to select in the collection. Required. x √ Page 33 LoadRunner with Mobile Center Step Arguments Reference for TruClient-Native Mobile Scripts Role Action Description Arguments Android iOS Integer value. Section. The section to select inside the item. Integer value. Required. X Offset/Y Offset. The x- and y-coordinates of the selection. Note: The specified coordinates are relative to the upper left corner of the object. The default value is the center of the object. CollectionView Unselect Item.. The item to select in the collection. Integer value. Required. x √ x √ Index. The 0-based index of the tab to select. √ Integer value. √ Section. The section to select inside the item. Integer value. Required. Mapview MapSetRegion TabBar Select Text. The name of the tab to select. String value. One of the above must be specified HP Mobile Center (1.10) Page 34 LoadRunner with Mobile Center Troubleshooting and FAQs Troubleshooting and FAQs l I've lost my connection to Mobile Center. If your connection to Mobile Center drops, click the Reconnect to server button in the TruClient sidebar. l Why can't I see all my apps and devices in the Mobile Center pane? Check the filter panel to see what options are selected. HP Mobile Center displays only the items that fit the filter conditions. To display all items, select all the filter options and clear the search field of any text that you have entered. l Known Mobile Center issues and limitations For details, see the Known issues and limitations section in the Mobile Center 1.10 Release Notes (http://mobilecenter.hp.com/docs/en/latest/). HP Mobile Center (1.10) Page 35 LoadRunner with Mobile Center Troubleshooting and FAQs HP Mobile Center (1.10) Page 36 Send Us Feedback Can we make the LoadRunner with Mobile Center better? Tell us how: [email protected] HP Mobile Center (1.10) Page 37