Recording an HTTP test for mobile applications

You can use HCL DevOps Test Performance (Test Performance) to test a native or web application from the mobile device by using an HTTP protocol.

Before you begin

You must have performed the following tasks:

  • Installed Test Performance on your computer.
  • Connected the computer where you install Test Performance and the mobile device to the same wireless network.

About this task

To record the HTTP traffic to and from the mobile applications, you must download a digital certificate to connect to a wireless network, which is same as that hosts Test Performance. To record communication between the mobile device and the internet, the computer on which Test Performance is installed must be set up as a proxy server. This setup communicates all mobile network traffic through Test Performance recording proxy.

Procedure

  1. Perform the following steps to download the certificate from Test Performance to your computer:
    1. Click the New Test From Recording icon test_recording_new from the Performance Test perspective.

    Alternatively, you can click File > New > Test From Recording.

    1. Select HTTP Test from the Recording Session window, and then click Next.
    2. Select the project and folder, type a name for the test from the Select Location window, and then click Next.
    3. Select the Unmanaged Application from the Select Client Application window, and then click Next.
    4. Click the hyperlinked save option to save the recorder root certificate on your computer from the Proxy Recorder Settings window, and then click Cancel.
  2. Share the downloaded certificate with a mobile device that is under test.
  3. Perform one of the steps described in the following table to download and install the certificate on a mobile device:
    Step description Step number
    To download and install the certificate on an Android device Perform 3.a
    To download and install the certificate on an iPhone device Perform 3.b
    1. Perform the following steps to download and install the certificate on the Android device:
      1. Go to Settings > Additional settings > Privacy > Encryption & credentials > Install from storage.
      2. Select the certificate to install.
      3. If you have a PIN or password set on your Android device, you must enter it and tap OK.
      4. Specify a name for the certificate, and then click OK.
      5. Go to Settings > Additional settings > Privacy > Encryption & credentials > User credentials to view the installed certificate.
    2. Perform the following steps to download and install the certificate on the iPhone device:
      1. Select the certificate.
      2. Choose iPhone as the device.
      3. Go to Settings > General > Profile > HCL DevOps Test Performance Recorder.
      4. From the Install Profile screen, tap Install.
      5. Optional: Enter the PIN or passcode set on your iPhone
      6. Tap Install by ignoring the warning.
      7. Tap Done to exit the screen.
      Note: You can go to Settings > General > About > Certificate Trust Settings to manually enable the installed certificate.
  4. Perform one of the steps described in the following table to configure the mobile device proxy:
    Step description Step number
    To configure the mobile device proxy on the Android device Perform 4.a
    To configure the mobile device proxy on the iPhone device Perform 4.b
    1. Perform the following steps to configure the mobile device proxy on the Android device:
      1. From your Android device, go to Settings > Wi-Fi and tap the connected network.
      2. In the PROXY section, select Manual and specify the following settings:
        • Hostname - Enter the IP address or the hostname of the computer that hosts Test Performance.
        • Port - Enter 1080 as Test Performance listening port.
        • Bypass for - Leave this field empty.
      3. In the IP SETTINGS section, select DHCP.
    2. Perform the following steps to configure the mobile device proxy on the iPhone device:
      1. From iPhone, go to Settings > Wi-Fi and tap the connected network.
      2. In the HTTP PROXY section, select Manual for Configure Proxy and specify the following settings:
        • Server - Enter the IP address or the hostname of the computer that hosts Test Performance.
        • Port - Enter 1080 as Test Performance listening port.
        • Authentication - Do not enable.
  5. Perform the following steps to record an HTTP performance test on a mobile device:
    1. Right-click the project where you want to save the test.
    2. Select New > Test From Recording.
    3. Select HTTP Test from the Recording Session window, and then click Next.
    4. Select the project and folder, specify a name for the test from the Select Location window, and then click Next.
    5. Select Unmanaged Application from the Select Client Application window, and then click Next.
      This option records HTTP traffic from a mobile device that uses a proxy.
    6. Select Proxy Type as HTTP and Proxy port as 1080 in the Proxy Recorder Settings window, and then click Next.
    7. Select the checkbox to accept the security warning, and then click Finish.
    8. Navigate through your installed application to start the recording from your mobile device.

      If all settings are configured correctly, you can view some activities on the HTTP Proxy Recorder tab during recording.

      Mobile app recording activity

      Tip:
      • You can click the Pause/Resume Recording icon to pause the test recording and navigate to another section of the mobile application that needs no recording.

        You can click the Pause/Resume Recording icon again to resume the test recording.

      • You can click the Stop icon to stop the recording when you finish recording all the required transactions from your mobile application.

    9. Select the domains to include in the test, and then click Finish.

Results

You have recorded the test from the mobile device. A progress window is displayed while the test is generated.

After the test is complete, the Recording Control view displays the Test generation completed message, the test navigator lists your test, and the test opens in the test editor.