Testing Mobile Apps on Mobile Devices with Appium

Testing Mobile Apps on Mobile Devices with Appium

Testing mobile apps on mobile devices is a discipline in its own right. When I started a testing project at Medux for the handheld scanners used in the warehouse, I was struck by how little information could be found online about this specific area. There is an abundance of content on testing web applications — from YouTube tutorials to in-depth blog posts. But once you enter the world of native mobile apps and physical devices, it suddenly becomes very quiet.

Can you even apply test automation to a handheld scanner or another device with a dedicated app? Absolutely! In this blog article, I share the insights I gained. What do you need to get started with testing on mobile devices? What is the difference between testing mobile web applications and native mobile apps — and why does that difference matter so much? I discuss the pros and cons of testing on real devices versus emulators. And I show how you can test mobile apps using tools like Robot Framework and Appium. Because even when working with specialized mobile devices, automation is definitely possible.

The difference between browser-based tests and mobile application tests

When testing software on mobile devices, it is important to distinguish between testing mobile web applications and testing native or hybrid mobile applications. Mobile web applications are accessed through a browser on a mobile device and usually share the same codebase as the desktop version of the website. As a result, automated tests can often be reused; essentially, the application is the same, only adapted for smaller screens and touch interaction.

Testing mobile applications is different. These apps are usually written in different programming languages (such as Swift for iOS or Kotlin for Android) and operate independently of the browser. They are standalone programs that cannot simply be run on a desktop. This requires a completely different testing approach, using specific tools and emulators or physical devices to test behavior, performance, installation processes, and interactions with hardware such as the camera or GPS.

“While mobile web tests are often an extension of your regular test strategy, testing apps on mobile devices requires a specialized and more device-oriented approach.”

Automated Testing of Mobile Devices: What You Need to Get Started

Test automation on mobile devices is similar to web automation but requires a few extra steps. While web testing often only requires a browser and Selenium, testing mobile devices demands a different setup. Here’s what you need:

The application itself
You need the app’s installation file (for example, an .apk for Android or an .ipa for iOS). Make sure you have access to the correct, most up-to-date version of the app—often you can request this from the developer.

A test device
This can be a physical device, such as a smartphone, or—in my case—a handheld scanner connected to your computer via USB.

A server
Devices are controlled via the Appium server. The server allows the test software to connect to the devices being tested.

A driver
You need software that enables automated interaction with the device. For Android, for example, you use UIAutomator as a driver to execute test actions on the device.

Testing on a Physical Device or Emulator: Which to Choose?

 Emulators are software simulations of mobile devices on your computer. They mimic the operating system and hardware, allowing you to test multiple devices and OS versions without physical devices. Ideal for fast, scalable tests and integration into CI/CD pipelines.

“Emulators provide flexibility and scalability, especially in larger or more complex test environments.”

Advantages of emulators:

  • No physical devices required, saving space and costs.

  • Quickly switch between different models and OS versions.

  • Simulate network conditions (poor Wi-Fi, no connection, GPS locations, time zones).

  • Automation in pipelines is possible without manual intervention.

Disadvantages of emulators:

  • High demand on your computer’s processing power.

  • Often slower and less reliable than real devices.

  • Hardware features such as camera, Bluetooth, or sensors are difficult to simulate.

  • Specialized devices (like handheld scanners) often cannot be emulated accurately.

Physical devices are crucial if you want to see how the app truly performs in practice, especially for hardware-dependent features. At Medux, we tested on the exact same handheld scanners used in the warehouse. This ensured our tests were realistic and reflected the actual user experience.

When to Choose Which?

Use an emulator if… Use a physical device if…
  • You need to switch quickly between devices/versions
  • You are testing on specific hardware like handheld scanners
  • You want to integrate tests into a CI/CD pipeline
  • Your app heavily relies on sensors, Bluetooth, or camera 
  • You want to simulate network conditions
  • You want to replicate the exact user experience
  • You don’t have a large collection of physical devices
  • You are working with one specific device

In practice, a mix is common: daily testing on emulators and periodic validation on real devices for maximum reliability.

 

Mobile Testing with Robot Framework and Appium

You need an application that executes your test steps—just like Selenium does for browsers—and in the mobile world, that’s Appium. Appium acts as a bridge between your test code and the mobile device (physical or virtual). It supports almost any programming language and works well with Robot Framework, which provides an extensive AppiumLibrary.

Through Appium—which runs as a server—you send test instructions, such as: “find this button and click it.” Unlike web testing, you can’t just right-click to inspect an app. That’s why you use the Appium Inspector: it shows the structure behind the screen in XML.

This XML structure guides your testing. Just like you navigate buttons or text fields on a website via HTML, in apps you navigate via XML. Mobile testing is less forgiving: going back? You must explicitly script it. Jumping to another “page”? Forget it.

Using simple keywords like Open Application, Click Element, and Wait Until Page Contains, you can build intuitive tests. Typical mobile actions—swipe, scroll, long press—are easily automated. Sometimes, you’ll encounter limitations, for example when controlling external apps (like the camera). Additional tools, like Android Debug Bridge (ADB), can help—but these require extra technical knowledge.

Most importantly, collaborate closely with developers and understand the type of app and device you’re testing. With that foundation and Appium as a bridge, you can automate mobile apps effectively, reliably, and at scale using Robot Framework.

“Mobile testing in a logistics environment with specialized devices, like handheld scanners, may be complex but is certainly achievable.”

Conclusion

Effective mobile testing requires more than just the right tools. Understand the type of app you are testing (native or web), the devices you’re testing on (physical or virtual), and collaborate closely with developers to improve testability. With this foundation—and Appium as a bridge—you can test mobile apps effectively and at scale using Robot Framework.

If you have questions about this article or the topic, don’t hesitate to contact Sofius.

 

Misschien vind je de volgende artikelen ook wel interessant