---
title: Test mobile native applications with OctoPerf
url: https://blog.octoperf.com/test-mobile-native-applications-with-octoperf/
date: '2016-03-22'
authors:
- gbetaillouloux
categories:
- Tutorials
tags:
- Design
- Cloud
- Fiddler
- Recording
- SSL
- HTTP
description: Simple tutorial on how to capture traffic and load test your native apps.
---

# Test mobile native applications with OctoPerf

As mobility has been the trend these past years, all the users coming to a website do so from many different devices.
OctoPerf allows you to simulate traffic to your website, but it also allows to simulate this kind of multi-device traffic.

That being said, to take advantage of OctoPerf possibilities, you might need to import several different user journeys.
Because a mobile user is very likely to deal with a different version of the application.
Thus if you record only one user journey from a computer's browser and use it for your tests, they may not be realistic.

## Browser based mobile apps

To record the traffic from a mobile application, you have several options.
For browser based apps, **you can record them from Chrome or firefox and just use the dev tools to switch the user agent**:

Native apps are a bit more complex to get by.

Let's see what is required step by step to record such an application.


## Native mobile apps

**First, what you need:**

- A computer with fiddler installed.
- A phone or device to record
- A WiFi network for both to connect to.

## Fiddler

To get started with fiddler, you can look at [our documentation.](https://api.octoperf.com/doc/design/create-virtual-user/har-recorder/record-fiddler-har/)

Once fiddler is installed, you must **allow remote connects in Tools -> Fiddler options**:
![Allow connect](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/fiddler-allow-connect.png)

Then, if your application is using HTTPS you must make sure that Fiddler is a trusted third party tool.
To do that,you have to **send the fiddler certificate to the mobile device**.
If you are not sure, your application is likely to use HTTPS whenever a login is implied.
In case you did not install the certificate and start recording an HTTPS application, you will notice that the application can't be accessed.

### To take care of this:

#### Export the certificate from fiddler:
![Export certificate](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/export-certificate.png)

#### Send it by mail and open/import it on the mobile:
![Certificate mobile](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/certificate-mobile.jpg)

Now that fiddler's taken care of, **let's switch to the mobile itself**.

## Mobile device

As said before, **the idea is to connect the mobile to the same WiFi network than the computer**.
Once you achieved that, set computer IP as proxy on mobile.
If you do not know how to find your computer's IP, **run 'ipconfig' in a command line and look at the following information**:

![IpConfig](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/ipconfig.png)

### To set a proxy on an android phone follow the below procedure:

#### Go to settings:
![Mobile proxy 1](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/mobile-proxy-1.png)

#### Select WiFi:
![Mobile proxy 2](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/mobile-proxy-2.png)

#### Long tap on your WiFi network and modify network config:
![Mobile proxy 3](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/mobile-proxy-3.png)

#### Check 'Show advanced options':
![Mobile proxy 4](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/mobile-proxy-4.png)

#### Set the proxy to manual and enter the IP and port (8888 by default for Fiddler):
![Mobile proxy 5](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/mobile-proxy-5.png)

## Recording

Just **start the recording in fiddler and launch your application on the phone**.
The traffic will be recorded in Fiddler:
![Recording](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/recording.png)

## Import it in OctoPerf

You can **export this traffic as an HTTP archive v1.2 and import it in OctoPerf**.
You will have the same possibilities as usual:

![OctoPerf](https://blog.octoperf.com/img/blog/OctoPerf-mobile-capabilities/octoperf.png)

## Video

If anything is still unclear, you can look at this video tutorial to see a recording step by step:

[![Mobile recording](https://img.youtube.com/vi/66PdWOPxzf0/0.jpg)](https://www.youtube.com/watch?v=66PdWOPxzf0 "Mobile Recording")
