Wearable Devices: How to Overcome the Load Testing Challenges they Create
Wearable devices are hot - and this is a problem if you’re a mobile app developer.
As the popularity of wearable devices for fitness, fashion, and functionality soars, you need to work harder to ensure your app will continuously meet user expectations. In this post, I’ll show you how to do just that.
How Wearable Devices Impact Load Testing
While you don’t need to load test the wearable device itself, you do need to be sure that your app’s infrastructure can handle load from many different devices from multiple locations- as each one provides data through the server to users of that device class.
In this blog post, I’ll show you how to set up an effective load test when the traffic is generated by wearable devices. I tested my Apple Watch using an iPhone for its network access. However, you can also use the same method to test Android devices.
How to Set Up an Apple or Android Device to Generate Load
I’ll be using BlazeMeter’s Mobile Recorder as it allows me to run performance and scalability tests for native apps without jailbreaking the device. It works under secure connections and intercepts HTTP and HTTPS traffic between the device and back-end servers. As wearable devices use an Android or iPhone for their network connection, all apps that run on them are also captured by the Mobile Recorder.
So here’s how you can set up a wearable device to generate traffic to load test a device server:
Step One: Getting the Mobile Recorder
The first thing I needed to do was to get the Mobile Recorder. For this you need a BlazeMeter account. If you don’t have one you can sign up for free here. Now click the mobile recorder link and select ‘Create Proxy’ to create a proxy server. Here’s how it should look:
Take a note of your proxy settings on the left panel. You’ll need these for the next step.
Step Two: Configuring your Device
To configure your device, you first need to turn on your WIFI. To do this, go to your phone’s “settings”, select “WIFI” and click on your local WIFI network. Then check “Show Advanced Options” and go to the HTTP Proxy.
Next, you’ll need to enter data for the server and the port. Take a look at the proxy settings that you noted down before. For the server, enter the text displayed in the current proxy field - but don’t include the number at the end. Enter this number in the “Port” field.
Open your mobile browser (note: on iOS devices you’ll need to use Safari as Chrome tends to give errors) and enter this URL: http://bz . Here, you can select the device you’re using. I’m testing my Apple watch today so I selected the Apple icon.
Install the certificate, name it, and wait for verification.
Step Three: Recording Your Activity
Now the fun part! :) Go back to your computer and click the record button at the bottom of your screen. Go to your device and start using your app. For this blog post, I tested the map app on my Apple watch earlier this morning. Here’s how it looked:
While I was using this app, the Mobile Recorder showed me all the captured requests:
Step Four: Running the Load Test
This was all that I wanted to record so I hit “Pause”, just in case I wanted to do some more later. You should only hit the “Stop” button when you’re 100% finished.
There are four different ways that you can now run this as a load test:
- Export it as a JMeter .jmx file. Edit if necessary and run your load test.
- Export it as a JSON file. Again, you can edit it before running your test.
- Export it as a URL list to instantly create a URL test. Just export it, go to the BlazeMeter app and start running your test.
- Export it as a "Smart JMX".
And that’s pretty much it. Just remember to disable the proxy after your test runs (go to mobile settings, and click ‘off’ on your WIFI network). Then click the “Terminate Proxy” button at the bottom of the left panel.
Want to learn more? Take a look at this video:
How Load Testing Impacts Wearable Devices
Clearly wearables are affecting our load testing methods - but testing is also having an impact on the devices. Load Testing helps device manufacturers better understand their server infrastructure needs when launching a new solution. By looking at the number of devices and the type of activity they are running on the server, manufacturers can better size the environment needed to effectively serve their customers.
Device users can be confident that any data collected (such as running times on a fitness app) can be immediately viewed on the server when needed. Effective load testing with the device helps ensure the responsiveness users expect from the server infrastructure.
Are you working with wearables? Let us know about the challenges you’ve encountered in the comments box below, and we’ll do our best to help you overcome them! :)