Mobile Testing (Appium)

Appium is an open source test automation framework for use with native, hybrid and mobile web apps. If you are preparing for an Interview in Software Testing, then you must go through these interview questions to prepare well.

Q.1 What do you understand by MAT and MT in context of mobile application and testing?
MAT expands to Mobile Application Testing and MT expands to Mobile Testing. Both MAT and MT are different and refers to what is being tested. MAT is about the testing of an application on mobile devices whereas MT is about testing of native application like Media player, SMS, etc
Q.2 Does mobile platform specific test can be migrated to Appium?
No, mobile platform specific test cannot be migrated to Appium but should be re-written so that they can conform to the Appium environment but if there is automation framework in those tests then it will be easier to port to Appium.
Q.3 How you will perform testing of software patches if the software is in production?
Any changes in the software are tested by conducting regression testing and hence, software patches need to undergo regression testing. But if time is short and patches need to be released early then we can conduct sanity tests on the software patches before being released.
Q.4 List the tests to be done on a general mobile application
Multiple tests need to be performed on the application as per the test requirements beginning with testing the installation, interrupting the installation, checking for network related application calls checking for version upgrades, navigation in the application, functionality of the application and compatibility with different phone hardware and mobile operating system versions.
Q.5 What is the time frame in which tests in Appium can be developed?
Developing tests depends upon the test requirements, complexity in making the test cases, the level of testing to be done. Test requirements can range from simple UI testing to testing specific tasks requiring multiple elements and network data exchange which makes the tests complicated and needs more time to develop.
Q.6 List the test frameworks which Appium supports
Appium has no in-built support for any test framework but many test frameworks can easily integrate or be used with Appium like NUnit and .NET Unit Test Framework. Test in Appium are interface with Appium using a specific driver.
Q.7 How to debug Appium?
Appium can be debugged as any other JavaScript application as Appium is a Node.js application written in JavaScript. Further being open source, its source code is accessible. Further like any JavaScript application, breakpoints can be attached for debugging.
Q.8 List the programming languages being supported by Appium for developing test cases and interfacing with Appium
Appium supports and can be interfaced by any programming languages which supports HTTP request and includes Java, JavaScript with Node.js, Python, Ruby, PHP, Perl, etc.
Q.9 How many machines are needed to run Appium and Appium server?
Appium has client-server architecture and both can install and function on the same machine. Hence, a single machine is needed to run Appium and Appium server though it is suggested that both be on different machines.
Q.10 Can JavaScript be used to interact with the mobile application under test in Appium?
Yes, JavaScript can interact with the mobile application under test in Appium as the Appium server will be sending the JavaScript script code as an anonymous function for execution.
Q.11 Does Appium can test in a multithreaded environment?
Yes, Appium can test in a multithreaded environment. Multithreading enables simultaneous execution of two or more parts of a program so that CPU is utilized to the maximum and each single such part is called a thread.
Q.12 Which element of a mobile application is needed to automate using Appium for testing?
The .apk file of a mobile application is needed to automate using Appium for testing and not the mobile application in my workspace for testing the mobile application under test.
Q.13 Describe Appium Inspector
Appium Inspector is an application to run Appium tests without the need of Node or NPM as it is bundled in the Appium Inspector. Appium Inspector is a GUI test creation tool which can use record and playback for test creation as the Selenium IDE.
Q.14 Differentiate between simulator and emulator
An emulator duplicates both the hardware and software features of the real physical device which is to be emulated. Whereas a simulator mimics the behavior and configurations of a real physical device by creating an environment for the same. Simulators do not mimic the hardware.
Q.15 What is meant by desired capabilities in Appium?
Desired Capabilities refers to the combination of keys and values which are encoded in a JSON object. These desired capabilities are sent by the Appium clients to the Appium server for starting a new automation session with specified configuration. Desired capabilities enlist specific details to the Appium drivers especially the manner in which the test should work. Some capabilities instruct for change in the behavior of the server during automation.
Q.16 What is needed for inspecting elements of the Native Android mobile application by Appium?
The UIAutomator tool present in the Android SDK can be used to inspect elements of the Native Android mobile application by Appium. Older version of Appium supported the UIAutomator tool for automation.
Q.17 What is meant by native mobile applications in Appium based testing?
Native apps are the mobile applications which are developed in the SDK or software development kit as provided by the mobile operating system. For Android the Android SDK and for IOS, the IOS SDK is used to develop the native mobile applications. They are more tightly integrated with the operating system with access to core libraries. They are specific to the mobile platform but execute fast.
Q.18 What do you understand by Mobile Web Applications?
Mobile Web Applications are applications use the mobile web browser for execution. As mobiles these days have a mobile web browser hence, these mobile applications are portable and will run from different web browsers like for IOS the Safari web browser and Chrome web browser for Android.
Q.19 Explain hybrid mobile applications
Hybrid mobile applications are the mobile applications which install similar to a native mobile application as they are wrapped in the native mobile application. They execute in a mobile web browser. They are developed in HTML5. Though they are not fast than native mobile applications but are portable to different mobile operating systems/
Q.20 Describe the Appium Client/Server Architecture
Appium at its core is an HTTP server or web server which exposes a REST API. The server connects with Appium client and listens to commands from the Appium client which are executed and result is sent on HTTP to the client by the server. The architecture provides the benefit of developing the test code in any programming language having an http client API. We can also use the Appium client libraries as well. The server can run on any machine but connect to client with HTTP.
Q.21 List the API being used by Appium
API expands to Application Programming Interface, and it is the interface which enables Appium's client and server talk to each other. The Appium server uses REST API for interacting with the client. Selenium API is used by Appium for test automation.
Q.22 List the desired capability in Appium which is used for defining the type of mobile device or emulator to use
The desired capability name deviceName is used for defining the type of mobile device or emulator to use. Desired capabilities enlist specific details to the Appium drivers and are sent by the Appium clients to the Appium server for starting a new automation session with specified configuration.
Q.23 List the Appium function which is used for navigating to the URL: https://www.gmail.com
The get function is Appium is used for navigating to the specified URL as the input to the function. the Appium function is applicable for all programming languages inccluding Java, Python, C#, etc.
Q.24 List the Appium function which is used for long press on Android
longPress is the Appium function which is used for long press on the touch screen using finger motion events for Android mobile testing. It is supported by all the Appium clients for Java, Python, JavaScript, Ruby, etc
Q.25 Which API is used by Appium for communication on Apple iOS?
The Application Programming Interface or API which is used by Appium for communication on Apple iOS is UIAutomation. To start a session using the UIAutomation driver we need to configure the platformName capability
Q.26 List the framework which is used by Appium for communication on Android
Appium uses the UIAutomator framework which is used by Appium for communication on Android. The framework uses Google's UiAutomator technology to launch automation sessions on a device.
Q.27 List the web browsers which are supported by Appium
Appium is open source project which supports most of the popular web browsers which includes Firefox, Chrome and Safari
Q.28 List the mobile operating systems for which we can create tests in Appium
Appium being an open source project has the support for most of the popular mobile operating systems which includes iOS, Android and Windows Phone.
Q.29 Which type of mobile applications can be tested by Appium software?
Appium is a flexible testing framework which is based on Node.js. Appium can be used to test all the different types of mobile applications by Appium software and which includes native mobile applications, mobile web mobile applications and hybrid mobile applications.
Q.30 What is the name of identifier which is used for session identifier in Appium mobile testing framework?
Appium mobile testing framework uses specific identifiers for specific purpose. The identifier used for session identifier in Appium mobile testing framework is sessionId.
Q.31 In Appium when does the automationName desired capability has the value of Selendroid?
If the working version of the Android software development kit (SDK) version is less than 17 then the automationName desired capability has the value of Selendroid
Q.32 Which desired capability is used to install and launch the mobile application automatically in Appium?
Appium supports automatic launch and installation of the mobile application. The autoLaunch desired capability is used to install and launch the mobile application automatically
Q.33 List the name of the desired capability which is used to configure the language on the simulator or emulator in Appium
The Appium mobile testing framework uses desired capability to configure various aspects of the testing environment. The desired capability named language is used in Appium mobile testing framework to configure the language on the simulator or emulator
Q.34 What stores the unique device identifier in Appium?
The Appium mobile testing framework assigns unique device identifier for unique identification of the device. The udid desired capability is used by the Appium mobile testing framework for storing the unique device identifier.
Q.35 How can you select the AVD to be launched in Appium GUI for Windows?
The Appium mobile testing framework provides an Appium GUI for Windows for GUI based interaction. The Android Settings menu in Appium GUI for Windows has the option for selecting the AVD to be launched.
Q.36 Write the code for ID locator for element with ID as list1 in Appium
The Appium mobile testing framework provides various element searching options. To list the ID locator for element with ID as list1 is: By.id("list1")
Q.37 List the code for Name locator for element with ID as list1 in Appium
The Appium mobile testing framework supports locating an element by name. To list the code for Name locator for element with ID as list1 is: By.name("list1")
Q.38 What will be the valid Xpath locator for element with id as list1 in Appium
The Appium mobile testing framework supports locating an element by various means like ID, name or xpath. The code for Xpath locator for element with ID as list1 in Appium is: By.xpath("//input[@id='list1']"
Q.39 List all the critical desired capabilities required for Android to test native and hybrid mobile applications
The Appium mobile testing framework provides the option of behaviour configuration by desired capabilities. Desired capabilities which are needed for Android to test native and hybrid mobile applications include: Application path, Package and Launch Activity,
Q.40 Identify all the essential desired capabilities which are needed for Android to test the web mobile application
The Appium mobile testing framework has many desired capabilities for various configuration of the testing environment. The required desired capabilities needed for Android to test the web mobile application are: PlatformVersion, Device Name and Browser
Q.41 What advantage does native mobile applications testing in Appium, provides?
The native mobile applications testing provides many distinct advantages in Appium as the native mobile application can work offline, take advantage of the device’s features and can also be installed through the application store.
Q.42 What benefit do web mobile applications testing provide for testing in Appium?
The Appium mobile testing framework supports testing of web mobile applications. Web mobile applications provides many benefit which includes can be run on any device or platform, only requires a web browser and don’t need to install the web mobile application.
Q.43 List the function in Appium mobile testing framework which is used to type into the password box element for testing.
The Appium mobile testing framework provides various functions for various tasks. The sendKeys function is used to type into the password box element while testing in the Appium mobile testing framework.
Q.44 Why should we use Appium for testing mobile application?
The Appium mobile testing framework provides various advantages for testing mobile application which includes no requirement of application recompilation for different mobile OS, support of many popular programming languages and it uses existing automation API for testing.
Q.45 What you think is shortcoming of Appium?
The Appium mobile testing framework though open source, flexible and widely used has many disadvantages as there is no in-built Alert handling, in-built image recognition support and in-built mobile gestures support in the Appium mobile testing framework .
Q.46 What is the use of Appium Inspector?
Appium Inspector plays an important role in the Appium mobile testing framework as it can be used to records and play native application behavior by inspecting DOM and generating the test scripts in any desired programming language.
Q.47 What is Xcode for Appium mobile testing framework?
Xcode is an IDE or integrated development environment which is used for OS X and iOS operating system by Apple. The Xcode integrates well with Appium mobile testing framework.
Q.48 What is Appium Doctor?
Appium Doctor in Appium mobile testing framework is a very useful tool as provided by Appium. The Appium Doctor is a tool to verify the installation of the Appium mobile testing framework.
Q.49 List the command to install Appium Doctor
The Appium mobile testing framework is a Node.js application and installation of the Appium Doctor in the Appium mobile testing framework can be done as installation of NPM package as: npm install appium-doctor -g
Q.50 What is the file type of a POM file in Appium
POM file is used for test framework automation in the Appium mobile testing framework . The POM file is a JSON file type.
Q.51 Why POM file is used in Appium mobile testing framework?
The POM file is used for configuring the project in MAVEN in Appium mobile testing framework. The POM file stores all requisite configurations for the purpose.
Q.52 Does the Scripts are reusable in Appium mobile testing framework
Yes, both the framework and the scripts are reusable in Appium mobile testing framework as this facility provides automation and removal of repetitive work.
Q.53 How you will locate DOM elements and finding XPath in Appium?
The Appium mobile testing framework provides various tools and facilities for quick and effective mobile application testing. The UIAutomateviewer tool is provided by the Appium mobile testing framework to locate DOM elements and finding XPath.
Get Govt. Certified Take Test