1) Describe various types of mobile applications
Mobile applications are of the following three types:
- Native Applications: Applications that are created with the help of iOS and Android SDK are Native Applications. Native applications developed in Android will not work on iOS phones and will not be available on iOS App Stores. Native applications designed and optimized for specific platforms offer the best performance, UI/UX suitable to run on that platform, Google Play Store support, offline mode, consistent look and feel, security and data protection, and fewer bugs during development. Some examples of Native applications are the mobile version of WhatsApp, Amazon Prime, Linked In, etc.
- Mobile Web Applications are actual websites developed in HTML5, accessible by browser, can be accessed offline because of the browser cache. Some examples of mobile web applications are Newspaper as ePaper, Google applications like Drive, Gmail, Docs, Sheets, Forms, and Photos, etc.
- Hybrid Applications are a mix of native and web applications, like native applications are available on the mobile app stores, and have features similar to native applications, like web applications rely on web browsers to be rendered. Online eCommerce sites and Netflix are some of the best examples of hybrid applications.
2) What hardware and software are the prerequisites for using Appium?
The list of software required before installing Appium is as below:
8 GB RAM Memory
.Net Framework 3.5 or higher.
- Java Development Kit (JDK) – It should have at least JDK version 8 or higher.
- Android SDK version 22 has separate platforms and build tools, suitable for Appium.
- Node.js is needed for a non-blocking event-based server to handle multiple WebDriver sessions for iOS and Android platforms.
- Microsoft WebDriver- also known as WinAppDriver, Appium compatible WebDriver server – Need Windows 10 or above.
- PDANet+ – It is a free application that converts Android and iOS mobile into Modem and enables tethering.
- Appium – Client libraries and Desktop application of Appium is mandatory
- GenyMotion – It is required to run Appium tests in multiple virtual Android devices in parallel.
- ADT Plugin to access Android SDK within Eclipse.
- Java Client Drivers are also known as language binding for creating testing in multiple programming languages.
- Appium Client Libraries supports Appium extensions to WebDriver protocol by Appium Server.
3) List advantages of using Appium.
It offers the following advantages:
- It is open-source, supports both iOS and Android
- We can design an automation script using the same API for Android and iOS.
- Supports multiple languages like Java, Node.js, Ruby, Python, Robot framework and is cross-platform.
- Can be integrated with continuous integration tools.
- Issues like synchronization are avoided.
- Uses HTTP protocol and is based on Selenium
4) List limitations of using Appium
Following are some limitations:
- The time needed, and configuration for Appium set up is complex
- It can run a single iOS device at a time.
- There is no support for automation for Android 4.1 or lower.
- There is no support for Windows for Appium inspector.
- Limited support for testing hybrid applications.
- You cannot test the switching action of native to the web or vice versa.
5) Describe the JSON wire protocol used in Appium.
JSON wire protocol uses RESTful API to communicate between Appium client and server, controls behaviors of mobile phone in addition to setting communication stream.
6) List locators used in Appium
List of locators support is as below:
- Class Name
- Accessibility ID
- Android UI Automator
- iOS UI Automation
- Android View Tag using Appium Espresso
7) List difference between Selenium WebDriver and Appium WebDriver
Selenium and Appium both use
- JSON wire protocol
- Methods like
8) What is selendroid?
Selendroid is a mobile automation tool for Android-based applications that uses selenium WebDriver client API. It uses inspector for monitoring the current UI status.
9) List the activities possible with the real device but not with the emulator.
The list of functionalities that are not possible with an emulator is as below:
- Make or Receive Calls, Send or Receive SMS,
- Battery issues, GPS tracking, Gesture recognition, touch screen functionality
- Changing Color over the screen, widgets, accessing the file
- Selecting icons to access the application with help of fingers (touch screen),
- Typing the text, moving the mouse on a real mobile screen will differ from that of an emulator.
- Performance tracking of the installed mobile application, etc.
10) What is Espresso?
Espresso is a test automation framework for Android. It is a UI automation framework suitable for black-box testing that uses JUnit4 annotations. The tests in Espresso are written using Java and Kotlin. Appium uses Espresso with Android View Tag.
11) What is XCUITest?
XCUITest is an automation framework for iOS. This framework is used to test only native mobile applications that are built using swift or objectives C. XUITest cannot write tests for multiple platforms. Appium uses the XCUITest driver for automating iOS applications.
12) List some common exceptions in Appium observed during test automation?
Following are some commonly encountered exceptions in Appium during script execution:
- SessionNotFoundException: On disconnection of Appium connection or Session not established, display this exception
- ElementNotFoundException: When Appium does not find the element it is looking for, this exception is displayed
- WebDriverException: When Driver does not exist, this exception is displayed
- NoSuchContextException: is thrown when the context target that is to be switched to does not exist.
13) List the essentials you need to write the Appium test?
The essential things required are:
- Driver – Set of APIs help write tests and commands are sent to HTTP Server for processing,
- Session – Session instances should be created during execution of automation testing and closed after execution,
- Capabilities – Set up of Chrome Driver path to execute tests in Chrome browser and defining params like PlatformName, PlatformVersion, and DeviceName,
- Commands – Appium requires commands that are action words that perform test steps.
14) Describe desired capabilities in Appium
Desired capabilities are keys and values inside JSON objects sent by Appium client to server to perform all the actions required to test the functionality.
15) What are the properties present in key-value pair in desired capabilities?
Few of the properties are explained that are present in keys and values form in desired capabilities as below:
- automationName: Provides name of the automation engine that will be used. Appium is used by default, and Espresso, UIAutomator1 & 2 for Android, whereas XCUITest for iOS.
- platformName: Name of mobile OS platform being used, for example, iOS, Android or FirefoxOS
- platformVersion: Version of mobile OS such as 7.1, 4.4, etc.
- deviceName: Mobile device or emulator type – iPhone Simulator, Android Emulator, etc.
16) What are some possible errors that a developer can face while using Appium?
Following is the list of some possible errors a developer can face using Appium:
Error 1: The following desired capabilities are needed but not provided: Device Name, platformName
Error 2: Could not find adb. Please set the ANDROID_HOME environment variable with the Android SDK root directory path.
Error 3:selenium.SessionNotCreatedException: A new session could not be created
Error 4: How to find DOM element or XPath in a mobile application?
17) What are the main types of mobile app testing?
Following is the list of some types of mobile app testing:
- Usability testing
- Compatibility testing
- Performance testing
- Interface testing
- Services testing
- Low-level resource testing
- Operational testing
- Installation testing
- Security testing etc.
18) What is Mobile Application Testing (MAT), and how is it different from Mobile Testing (MT)?
Mobile Application Testing is the testing of an application on mobile devices. It is entirely different from Mobile Testing. In Mobile Testing, the main focus is on the native application features of Mobile devices such as Calls, SMS, Media Player, etc. On the other hand, in Mobile Application Testing, the main focus is only on the application’s functionality and features we want to test.
19) What is the most challenging scenario to test with Appium?
The data exchange is the most challenging scenario to test with Appium.
20) What is the difference between simulator and emulator?
A simulator creates an environment that mimics the behavior and configurations of an actual device. On the other hand, an emulator is used to duplicate all the device’s hardware and software features. Emulation and simulation processes are both used in mobile app testing in addition to real devices.
21) Is a server machine required to run tests on Appium?
No. There is no need for a server machine to run tests on Appium. Appium provides a 2-tier architecture where a test machine connects to a test server running Appium and automating the whole thing. We can run Appium on the same machine where we run our test.
22) What is the general structure of mobile application testing frameworks?
There are mainly three segments used in Mobile Application Testing frameworks:
- Application Package: the Application Package is the target application that we have to test.
- Instrumentation TestRunner: The Instrumentation TestRunner can be defined as a test case runner that runs test cases on the target application. It consists of an SDK tool for building tests and a tool that provides APIs for writing a program that controls an Android device, for example, MonkeyRunner.
- Test Package: The Test Package contains two classes, Test case classes and Mock objects. The Test case classes include test methods to perform on the target application, while the mock object has mock data that will be used as sample input for test cases.
24) What is the full form of iPA, APK, .exe, jad, and prc?
The full form of these terms is as follows:
- iPA: iOS APP Store Package
- APK: Android Application Package file
- .exe: Executable File
- jad: Java Application Descriptor
- prc: Palm Resource Compiler
25) What are the desired capabilities in testing?
The desired capabilities are keys and values such as a map or hash sent by the client to the server. The client sends these to tell the server what kind of automation session they want.
26) Can a tester run the tests in a multithreaded environment while using Appium?
Yes, testers can run the tests in a multithreaded environment while using Appium. The only thing that they have to care about is to ensure that no more than one test runs at the same time against the same Appium server.
27) How can you inspect elements of the Native Android App?
It is easy to inspect the elements of the Native Android App using the UIAutomator tool in Android SDK. You can also get access to the object locators of the Android Native Apps.
28) What are some critical issues you faced with cross-platform testing?
Generally, cross-platform testing is compatible with multiple platforms, but one can face cross-platform testing issues. The issues depend upon the different OS/device versions. You can see that the same application works on one OS while it might not work on another version.
For example, we have faced an issue that our application was working fine on iOS 6.x version devices but on tapping a few modules on iOS 5.x devices, the application crashes. The same thing happened with 2.3.5 Vs.
29) What do you need to automate using Appium in Android? An app’s .apk or you also need the app in my workspace?
In Android, we only need a .apk file to automate using Appium.
30) Does Appium support test frameworks?
Appium does not support test frameworks because there is no need to keep them. We can use Appium with any frameworks that we want.
31) What do you understand by native Apps?
Those Apps which are written by using Android SDKs and iOS are known as Native Apps.
32) What are native Apps?
An open-source tool that is required for mobile web, automating Native and hybrid application on Android and IOS platform is known as Appium which was in 2012. Appium is considered to be a cross-platform that will low you to write tests that are on multiple platforms like Android and IOS. They do this using the same API. This facility will enable you to do reuse codes between Android and IOS test sites.
Those Apps are written by using Android SDKs and IOS are known as Native Apps.
33) What are Mobile Web Apps?
There are mobile web pages that are those web apps that are accessed with mobile browsers. In the case of the IOS platform, Appium supports Safari and for the Android platform, Chrome or any other built-in browser is used.
34) What are hybrid apps?
Those apps that are equipped with a wrapper around the web view are known as Hybrid app. This is native control that will facilitate the interaction with the web content.
35) Name the language that is used to write tests in Appium?
The tests of Appium are written in any language and this is because appium is nothing but an HTTP server. It is also important that the test should be interfaced with Appium and it uses HTTP libraries so that they can create HTTP sessions.
In order to create the right commands in Appium then all, you need to know the Selenium protocol.
36) What are the prerequisites to use Appium?
The pre-requisites that are used in Appium. They are listed below.
- Eclipse IDE
- Android SDK
- Web driver language binding library
- APK App Info on Google play
- Selenium server jar
- Appium for Windows
37) Write the advantages of using Appium?
The advantages of Appium are listed below:-
- Using the same API, Appium will allow you to write tests that are against mobile platforms.
- By using any kind of test framework or language you can write and run the tests.
- Appium is an open-source platform so you can contribute to it easily.
- For the hybrid mobile applications and Native, Appium provides cross-platform.
- Appium supports the JSON wire protocol.
- Appium does not require recompilation of App.
- Appium also supports automation tests on the physical devices and also for simulator or emulator both.
- Appium does not have any dependency on mobile devices.
38) Name the test frameworks that are supported by Appium?
Test frameworks are not supported by appium since there is no need to do it. All test frameworks can be used by Appium. Some examples are the .net unit test and NUnit. A test for Appium is written using one of the drivers so that the tests can interface with the appium in case of external dependency.
39) What are the disadvantages of Appium?
The disadvantages of Appium are listed below:
- The testing of that android that is lower than 4.2 is not allowed.
- Appium has limited support for hybrid app testing. You will not be able to test the action that allows switching of applications from native to web app and from web app to native.
- There is no support that will allow you to run an Appium Inspector on Microsoft Windows.
40) Name the Appium inspector?
Just like a selenium IDE playback and record tool, Appium consists of an inspector that is used to record and playback. With the help of this, you can record and play native application behavior which is achieved by inspecting DOM. It helps in generating the test scripts in any language that is preferred. But Appium Inspector is not good support Windows and they use UIAutomator viewer in the option.
41) Suppose you are testing App, how will the data be exchanged between your test and the App?
In Appium the Web driver specification is not made for the purpose of exchanging data with the app. But it is not totally impossible to exchange data. It is achievable and it will require you to build more layers of testability.
42) Which Language Should I Use To Write My Tests?
This is probably the best thing about Appium: you can write your tests in any language. Since Appium is nothing more than an HTTP server, a test which needs to be interfaced with Appium can simply use HTTP libraries to create HTTP sessions. You just need to know the Selenium protocol in order to compose the right commands and that’s it!
43) What Type Of Tests Are Suitable and Not Suitable For Appium?
When it comes to testing, especially webview-based apps, there are a lot of scenarios that can be tested also depending on the feature coverage you want to ensure. Appium is pretty handy for testing scenarios that users will go through when using your app.
But if you need to test more than UX simple interactions, then Appium will become a limitation. Think about features like keyboarding. It is not so easy when complex touch/keyboard mixed scenarios are involved, the probability of a false failure is high; do not misunderstand me on this: I am not saying it is impossible to do, just not so easy as you might think!
Another little nightmare with Appium is exchanging data. When your test needs to exchange data with your app (especially in the incoming direction), you will need to play some tricks. So always consider that sending and receiving information is not that straightforward. It is not Appium’s fault, the WebDriver specification was designed for automating stuff, not exchanging data!
44) List Out The Appium Abilities?
Appium abilities are:
Provides cross-platform for Native and Hybrid mobile automation
Support JSON wire protocol
It does not require recompilation of App
Support automation test on physical device as well as similar or emulator both
It has no dependency on mobile device.
45) List Out The Pre-requisite To Use Appium?
Pre-requisite to use APPIUM is:
Selenium Server JAR
Webdriver Language Binding Library
APPIUM EXE for Windows
APK App Info
46) What About Performance impact while running tests using Appium?
Appium is not a huge application and requires very little memory. Its architecture is actually pretty simple and light as Appium acts like a proxy between your test machine and each platform automation toolkit. Once up and running, Appium will listen to HTTP requests from your tests; when a new session is created, a component in Appium’s Node.js code called proxy will forward these Selenium commands to active platform drivers.
In the case of Android for example, Appium will forward incoming commands to the [chromedriver] (90% of cases, Appium will not even change commands while routing them), this happens because ChromeDriver supports WebDriver and Selenium. For this reason Appium will not allocate much memory itself, you will see a lot of memory being allocated by other processes like [adb], ChromeDriver or the iOS automation toolkit (called by Appium while testing and automating).
47) What Platforms Are Supported?
Appium currently supports Android and iOS, no support for Windows unfortunately.
48) Do I Need A Server Machine To Run Tests On Appium?
No! Appium promotes a 2-tier architecture where a test machine connects to a test server running Appium and automating the whole thing. However this configuration is not mandatory, you can have Appium running on the same machine where your test runs. Instead of connecting to a remote host, your test will connect to Appium using the loopback address.
49) List Out The Limitations Of Using Appium?
Appium does not support testing of Android Version lower than 4.2
Limited support for hybrid app testing. E.g., not possible to test the switching action of application from the web app to native and vice-versa
No support to run Appium Inspector on Microsoft Windows and you need to use UIAutomatorViewer supported by Android SDK
50) Explain How To Find Dom Element Or Xpath In A Mobile Application?
To find the DOM element use “UIAutomateviewer” to find DOM element for Android application and Appium Inspector for IOS Application
51What Language Does Appium Support?
- Packer Tutorials: Amazon Secrets Manager Data Source – amazon-secretsmanager - May 25, 2023
- Packer Tutorials: Amazon Data Sources – amazon-parameterstore - May 25, 2023
- What is DevSecTestOps? - May 25, 2023
Excellent! Thanks for providing set of questions n answers on Appium. Can we get this in document format?
For Appium jobs, the most frequently searched job titles are:
Automation Tester Contract
Selenium Automation Tester
Selenium Automation Engineer
Mobile Automation Test Engineer