The number of mobile client applications that connect to the Internet is growing exponentially. It is important to understand the effect of these increasing connections to make good decisions about how to optimize the performance of the back-end.
This article demonstrates how to record the HTTP traffic to and from mobile client applications, directly from the built-in proxy recorder of IBM® Rational® Performance Tester.
Connect a mobile device to a dedicated wireless network
This is a quick and simple procedure that requires you to select the Network Service Set Identifier (SSID) of the wireless network that you want to connect to if it is visible in your device, and to connect to the network after you provide the required password. Another, more secure way to connect to a wireless network is to use Digital Certificate Client Authentication.
For the purpose of this exercise, assume that your mobile device is connected to a wireless network.
Configure the mobile device proxy
The system on which the Rational Performance Tester is installed needs to be set up as a proxy server to record communication between the mobile device and the Internet. This setup relays all mobile network traffic through the Rational Performance Tester's recording proxy.
Configuration instructions for an Android device
From your Google® Android™ device, navigate to Settings > Wireless network > WIFI. Press and hold the selected network. Choose Modify network and select Show advanced options.
Set the following options, as shown in Figure 1:
- Proxy settings: Manual.
- Proxy hostname: The IP address of the computer that hosts Rational Performance Tester.
- Proxy port: The Rational Performance Tester listening port. The default is 1080.
- Bypass proxy for: Leave this field blank.
- IP settings: DHCP.
Save your changes.
Figure 1. Android proxy settings
Configuration instructions for an iOS device
On your Apple® iOS® device, navigate to Settings>Wi-Fi and tap on your connected network. In the HTTP PROXY section, tap manual and enter the following settings, as shown in Figure 2:
- Server: The IP address or the host name of the computer that hosts Rational Performance Tester.
- Port: The Rational Performance Tester listening port. The default is 1080.
- Authentication: Do not enable.
Figure 2. Proxy setting for an iOS device
Record and generate test scripts
To start recording, follow these steps:
From the Rational Performance Tester project, right-click the folder where you want your recording to be located. Then select New> Test From Recording as shown in Figure 3.
Figure 3. Start a new recording
Select HTTP Test in the Recording Session window and click Next, as shown in Figure 4.
Figure 4. Selecting HTTP protocol for your recording
Provide a name for this recording and click Next, as shown in Figure 5.
Figure 5. Provide a name for your recording
Mobile devices cannot be managed by Rational Performance Tester, therefore you must select Unmanaged Application in the Client Application window and then click Next, as shown in Figure 6.
Figure 6. Select Unmanaged Application for client application
Make sure that the Proxy Recorder Settings reflect the settings shown in Figure 7 then click Next.
Figure 7. Specify the settings for recording network traffic with the proxy recorder
Accept the Privacy Warning and then click Finish to start recording, as shown in Figure 8.
Figure 8. Accept the Privacy Warning
From your mobile device, navigate through your installed application to start the recording. If all settings are configured correctly, you can see some activities on the Rational Performance Tester Proxy Recorder tab during recording, as shown in Figure 9.
Figure 9. Recorder accepting connection
To pause your recording while navigating to other sections of your mobile app that need no recording, press the Pause/Resume Recording solid red button, as shown in Figure 10. Press the button again to resume recording.
Figure 10. Pause/Resume recording
Note: You cannot name a page while you are using an unmanaged recording in Rational Performance Tester. Therefore, you might need to add comments to identify the operation being recorded, as shown in Figure 11.
Figure 11. Button to insert comments
Insert your comments in the text field, as shown in Figure 12.
Figure 12. Text field to insert comments
When you finish recording all needed transactions from your mobile application, press Stop, as shown in Figure 13, to stop recording.
Figure 13. Blue button to stop recording
This action generates the test script, which you can customize for your workload, as shown in Figure 14.
Figure 14. Prompt to open the recorded test
This article explains how to record mobile network traffic using the Rational Performance Tester recording proxy. These steps can be applied with any mobile device for the purpose of generating workload test scripts.
- Find out more on the Rational Performance Tester product overview page. Then explore the Rational Performance Tester page on IBM developerWorks for links to technical articles and browse the user assistance in the Rational Performance Tester Information Center for best practices.
- Explore the Rational software area on developerWorks for technical resources, best practices, and information about Rational collaborative and integrated solutions for software and systems delivery.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Improve your skills. Check the Rational training and certification catalog, which includes many types of courses on a wide range of topics. You can take some of themanywhere, anytime, and many of the Getting Started ones are free.
Get products and technologies
- Download the trial version of IBM Rational Performance Tester.
- Evaluate IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.
- Join the Performance Testing forum, where you can share your questions and knowledge about IBM performance testing products.
- Get connected with your peers and keep up on the latest information in the Rational community.
- Rate or review Rational software. It's quick and easy.
- Share your knowledge and help others who use Rational software by writing a developerWorks article. Find out what makes a good developerWorks article and how to proceed.
- Follow Rational software onFacebook, Twitter (@ibmrational), and YouTube, and add your comments and requests.
- Ask and answer questions and increase your expertise when you get involved in the Rational forums, cafés, and wikis.