Introduction to Mobile Testing & Appium

What is Mobile Testing

What is Appium

Major Requirements for Setting up Appium

How Appium works in Android

Tips and Tricks for running Appium Test on Android Devices

How Appium works in IOS

Tips and Tricks for running Appium Test on IOS Devices

Conclusion


What is Mobile Testing?

This refers to a series of tests carried out to verify the functionality, consistency, and usability of a software application. Mobile testing is divided into two categories namely Mobile device testing and mobile application testing. Mobile device testing function to assure a device quality by validating and verifying its hardware and software components. E.g, it examines the screen, applications, camera, etc. of the device. On the contrary, Mobile application testing identifies the software application reliability and functionality only. It assures that the selected application is the best-fit for the mobile device in terms of software, hardware, and network connectivity. Mobile applications are divided into three types:

  • Native Applications

Native mobile apps are developed with a specific platform (IOS, Android, Windows) in mind. That is, they are built to work on a particular mobile device or platform. For instance, IOS are specifically built to work on Apple devices alone. Examples of such applications are Google maps, Skype, and many more.

  • Web Applications

This kind of application works on mobile browsers alone. Mobile web applications are built in web-based languages like CSS, HTML, and Javascript. They are budget friendly and do not require any installation or updates from its users. Examples of such apps are OLX, AliExpress, etc.

  • Hybrid Applications

As the name implies, Hybrid applications combine the strength of both native and web applications to function. They can be used on native app devices and still run through browsers. Some examples of this app are Gmail, Uber, etc.


What is Appium?

Appium is an open-source, cross-platform automation tool used to test mobile applications (IOS, Android). It is also best suited for automating test cases for the different types of mobile applications (native, web, and hybrid). Still, Appium does not really perform well on hybrid application testing due to the switch between native and web applications. Appium supports multiple frameworks and scripting languages (such as, Java, Ruby, PHP, C#, etc.) which allow users to be able to create test scripts in any language suitable for them. It can also be used on different operating systems like Windows, Mac OS, Linux, among many others. On the other hand, Appium cannot be used to test Android versions below 4.2.


Major Requirements for Setting up Appium

Given below is a shortlist of the software and hardware essential for automating mobile application testing with Appium.

  • Download and Install Appium Desktop/Server
  • Download the latest Appium Client Library
  • Install the Java Development Kit (JDK)
  • Download and Install Java. Afterwards, set up your environmental variable
  • Download and Install Android Software Development Kit (SDK)
  • Install Eclipse
  • Install Node.Js
  • Set up Java-client jars and Selenium jars
  • APK (Mobile applications to be automated)
  • Mobile devices
  • Download and Install USB driver for the mobile devices

How Appium Works in Android

On Android devices, Appium assists testers to validate the functionality and reliability of their applications as projected in real-user conditions. Besides, it allows maximum consistency in deliveries. Appium applies the UIAutomator (native UI automation framework for Android) scripts to test the Android user interface for automating the Android devices. The UIAutomator makes use of Java as its scripting language but Appium will execute the test from any of the WebDriver supported languages.


Tips and Tricks for running Appium Test on Android Devices

  • Download and set up the vital components required to run the test, some of which are listed above.
  • Identify the set of keys and values sent by the Appium client to the server (that is, the desired capabilities). This can either be set in the appium.txt.files or in the test codes.
  • The test codes support the writing of the Appium test scripts required to perform Appium tests on Android devices.
  • Enable the developer mode option while writing your test scripts for the Android devices.
  • Execute tests on real devices (Android precisely) to affirm maximum user-friendliness.

Read more: Mobile Testing different between Real device, Emulator and Simulator


How Appium works in IOS

IOS shares a similar situation with Android whereby, Appium applies the Apple UIAutomation to test the user interface element for automating applications on IOS devices. It uses the principle of RESTful services by sending JSON files. This operates with the IOS application using the UI elements (like the button and text labels) via Apple UIAutomation API to carry out the application testing.


Tips and Tricks for running Appium Test on IOS Devices

  • Make sure to install and set up the Appium Server on your device before going through the testing process.
  • Specify the essential details (such as the IOS version, bundled, and device name) of the IOS device to be used to set the desired capabilities.
  • Set up a new project on Eclipse to write the Appium test scripts for your IOS devices.
  • Examine the UI for IOS using Appium Desktop Inspector. Moreover, it can be used to record components for error-free debugging.
  • Execute tests on real IOS devices to get the expected outcomes.

  You also can try Mobile Testing with Appium from our video or try alternative tools like Katalon Studio.


Conclusion

With Appium flexibility and robust cross-platform capability, it has become widely accepted as a mobile application testing tool. In order to get started with this tool, there is a need to set up the basic software and hardware to run the test. Some of which are Appium Desktop/Server, Client Library, JDK, SDK, etc. With all these in place, you can explore the tool flexibility in running mobile application testing on your Android and IOS apps.