Real Devices vs Emulators vs Simulators for Mobile App Testing

Written by mobindustry | Published 2020/09/14
Tech Story Tags: emulator | simulator | mobile-app-testing | testing | app-testing | android-app-testing | testing-ios-apps | quality-assurance

TLDR Real Devices vs Emulators vs Simulators for Mobile App Testing is a vital part of mobile app development. It’s more complex to test mobile apps compared to desktop apps because of the large number of different mobile devices with various operating systems, operating system versions, screen resolutions, mobile-specific hardware, and so on. Developers and QA specialists typically use one or two emulators that are most convenient for them. Emulators and simulators are not the same thing, despite what many people think. An emulator replaces a device by emulating its environment and allowing you to complete a task you would complete on the physical device.via the TL;DR App

Is it best to use real devices, emulators, or simulators to test your mobile apps? Let’s find out the most effective way to test applications by considering the pros and cons of all three approaches.
Testing is a vital part of mobile app development, and it’s more complex to test mobile apps compared to desktop apps because of the large number of different mobile devices with various operating systems, operating system versions, screen resolutions, mobile-specific hardware, and so on. Moreover, different device manufacturers use slightly different versions of Android, and you need to test your app on all of them. 
When it comes to mobile app testing, you need lots of devices to make sure your application looks good on all screens. Because it’s costly to purchase so many testing devices, many developers and companies with in-house development teams opt for emulators and simulators that can imitate interactions with real devices. 
Another option is to use the services of device farms, where you can rent real devices remotely to test your applications. I won’t be talking much about this method, as we don’t use it at Mobindustry for security reasons.
In this article, I’ll talk about the upsides and downsides of testing on real devices, emulators, and simulators. Let’s start with emulators and simulators and find out how to work with them. 

Emulators and simulators

Emulators and simulators are not the same thing, despite what many people think. 
An emulator replaces a device by emulating its environment and allowing you to complete a task you would complete on the physical device. An emulator doesn’t allow you to change anything about the environment, however. 
This is exactly what a simulator can do. Though a simulator doesn’t copy the operating system of a device, it allows developers and quality assurance specialists to make changes to the operating system. 
Put simply, emulators recreate the behavior of a system without regard to how the system actually works internally. Simulators, on the other hand, model the internal components of a system. 
Simulators are best suited for testing mobile applications, and emulators are better for testing mobile websites. However, many developers use emulators for mobile app testing as well. 
There are many kinds of emulators that use different emulation methods, but the end goal is always to recreate the experience of using your app on a certain version of an operating system. 
Mobile app emulators help you conduct mobile app tests quickly and detect critical defects. I recommend emulators to all quality assurance specialists, especially beginners. Let’s now talk about different emulators and simulators on the market and what I use in my own work. 

Android app testing

An Android emulator replaces an Android device by copying the main aspects of the target device’s behavior, both in terms of hardware and software. Here are the most popular Android emulators that I use in my work: 
  • BlueStacks
  • NoxPlayer
  • Genymotion
  • Android Studio emulator
There are hundreds of Android emulators, as there are lots of devices that run Android. However, QA specialists typically use one or two emulators that are most convenient for them. 

Testing iOS apps

For testing iOS apps on Apple devices such as iPhones and iPads, you need iOS emulators or simulators. The official Apple iOS Simulator is the first that comes to mind, as it’s the default simulator that comes bundled in Xcode and is created specifically for iOS developers and testers.
The Apple iOS Simulator allows developers and QA specialists to test their apps on different combinations of software and hardware, but only on Mac computers. If you don’t have access to a Mac, you won’t be able to use this simulator. To launch it, you need to install Xcode.

Pros and cons of emulators

Let’s talk about the advantages and disadvantages of both Android and iOS emulators. 
Advantages of emulators:
  • Imitate both hardware and software
  • Apps work in them without any changes
  • Help you find unpredictable behavior
  • Often open source and free
  • Can connect your emulator to an IDE for early testing during development
  • Can save money on QA activities
Disadvantages of emulators: 
  • Work very slow, as they simulate both software and hardware
  • Don’t consider some factors that can affect an app’s work, such as conflicts with other apps, low battery, or overheating
  • Setting up a good emulator takes lots of time and can be costly
  • Can be incompatible with some elements of your app, so you’ll need to spend time patching it
  • Can support only a limited number of operating system versions

Pros and cons of simulators

To compare emulators to simulators, let’s first talk about the advantages and disadvantages of Android and iOS simulators. 
Advantages of simulators: 
  • Fast, as they model only the operating system
  • Relatively easy to set up 
  • Can be used to inspect app behavior
  • Help you find unpredictable behaviors
Disadvantages of simulators:
  • Don’t take hardware into account
  • Apps can work differently than on real devices
  • Can be challenging to analyze the results of modeling because of incomplete data
Both simulators and emulators are great for early testing when you don’t need to conduct a costly quality assurance process with real devices. Android and iOS simulators and emulators, both native and third-party, are great for testing mobile apps if they allow developers to simulate or emulate different operating system versions. 
However, you should remember that each mobile device — and especially each Android device — has its own peculiarities that emulators often can’t replicate. The more popular your app becomes, the more different devices will be represented among your user base. 
Emulators and simulators aren’t perfect, so as the number of devices in your user base grows, the number of potential errors will only increase. That’s when you’ll need to start thinking about testing your app on real devices.

Testing mobile apps on real devices

Testing on real devices is the most effective way to make sure your app works properly. On real devices, you’ll get the most precise information about your app’s performance, as you won’t miss anything an emulator or simulator can’t model. 
However, testing on real devices is rather costly: you’ll need to collect the devices yourself if you have an in-house team. Thankfully, if you outsource development or quality assurance to a mobile development company, they probably already have a pool of the most popular devices with different versions of operating systems installed. 
To use the time of quality assurance specialists effectively, it’s best to handpick the pool of devices for testing your app. Let’s figure out how to do that.
How to choose devices for testing
You’re not actually choosing devices for testing; rather, you’re choosing operating systems and their versions. To make testing on real devices effective and to avoid wasting time and money testing on unnecessary devices, your quality assurance specialists will need to adhere to the following strategy. 
  1. Analyze the device market to find the most popular devices. 
  2. Analyze your target audience to learn more about your users. For example, if your mobile app is brand-new and is mostly used by young people, you’ll need to test it on the latest devices and fresh operating system versions.
  3. Choose devices with various screen resolutions for the best coverage.
  4. Take factors like compatibility, storage space, and connectivity into consideration. 
  5. Talk to the app owner to figure out what devices are most relevant to them. 

Pros and cons of testing mobile apps on real devices

Though real devices are definitely the best option for mobile app testing, they also have their disadvantages compared to emulators and simulators. Let’s discuss the pros and cons of testing your app on real devices.
Advantages of testing on real devices: 
  • Get the most precise information on your app’s performance by testing on a real operating system with settings from a device manufacturer
  • Can check lots of scenarios using different screen resolutions and brightness levels
  • Easier to check compatibility
  • Easy to recreate errors users have on their own devices
  • No false positives 
  • Can use all the capabilities of a real device such as push notifications, geolocation, accelerometers, and Wi-Fi
  • Can check how your app behaves when the battery is low
  • Can check your app’s behavior during interruptions such as calls or receiving an SMS
Disadvantages of testing on real devices: 
  • There are thousands of mobile devices, and it’s costly to purchase a pool of testing devices
  • Devices require maintenance
  • Hard to get devices that are only available abroad
  • Remote workers don’t have access to testing devices
If a company specializes in mobile development, they need to constantly expand their pool of devices. 

Final thoughts

The best mobile testing strategy is to combine emulators, simulators, and real devices in one quality assurance strategy. This will allow you to cover most cases and ensure your app’s quality. 
While emulators and simulators are fast to test on and don’t require significant investments, they lack precision and can miss some important errors. Testing on real devices is costly, but it’s also more effective. I advise testing with real devices at later stages of development.
A quality assurance specialist will know when to use an emulator and when a real device is necessary. Using real devices only when needed will save you time without sacrificing quality. 
To figure out what devices you need in your testing pool, research your audience and market to find out what versions of operating systems your audience uses most often. If you’re not ready to invest in your own device pool, it’s a good idea to outsource quality assurance to a mobile development company that already has a wide variety of devices to test on.

Written by mobindustry | Software Development Team
Published by HackerNoon on 2020/09/14