Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 34

Appium has seen widespread acceptance in the mobile application testing industry.

Testing as a discipline has garnered great importance in today’s world so that


enterprise-level applications can be delivered. This has led to the demand for
professionals well versed with Appium. None the less, this blog is aimed to prep you
up for questions you might face in a job interview related to Appium!

Below you will find 50 different Appium Interview Questions, that have been
classified into:

 Easy Questions
 Intermediate Questions
 Advanced Questions

This will make sure you’re thoroughly prepared for any sort of question you might
face.
Appium Interview Questions and Answers 2021 | Edureka

This Edureka video on Top 50 Appium Interview Question will help you to prepare
yourself for Software Testing Interviews. It covers questions for beginners,
intermediate and experienced professionals.

Easy Questions
Question 1. What Is Mobile Application Testing And How Is It Different
From Mobile Testing?

Mobile Application Testing (MAT) is the testing of an application on mobile devices


and it is different from Mobile Testing (MT) in the term that, in MT we focus on the
native application features of Mobile devices like Call, SMS, Media Player, etc.
Meanwhile, in MAT we focus only on the functionality & features of the application
under Test. 

Question 2. Explain The Difference Between Simulator And Emulator?

Emulation is the process of mimicking the outwardly observable behavior to match


an existing target. The internal state of the emulation mechanism does not have to
accurately reflect the internal state of the target which it is emulating.

Simulation, on the other hand, involves modeling the underlying state of the target.
The end result of a good simulation is that the simulation model will emulate the
target which it is simulating.

Ideally, you should be able to look into the simulation and observe properties that
you would also see if you looked into the original target. In practice, there are some
shortcuts to the simulation for performance reasons — that is, some internal aspects
of the simulation may actually be an emulation.

Question 3. List out the types of mobile app testing.

The types of mobile app testing include:

 Usability testing
 Compatibility testing
 Interface testing
 Services testing
 Low-level resource testing
 Performance testing
 Operational testing
 Installation tests
 Security testing

Question 4. Explain the general structure of mobile application testing


frameworks?
Mobile application testing framework includes three segments:

Application Package: It is the target application that requires to be tested.

Instrumentation TestRunner: It is a test case runner that runs test cases on the
target application. It includes an SDK tool for building test and a tool that provides
APIs for writing a program that controls an Android device, for example,
MonkeyRunner.

Test Package: It includes two classes, Test case classes, and Mock objects. Test
case classes include test methods to perform on the target application, while the
mock object includes mock data that will be used as sample input for test cases.

Question 5. Mention what are the common bugs found while mobile
testing?
Question 6. Full form of various application extensions.

 iPA: iOS APP Store Package


 APK: Android Application Package file
 exe: Executable File
 jad: Java Application Descriptor
 prc: Palm Resource Compiler

Question 7. Mention the Different Types of Mobile Applications.


Mobile applications can be broadly categorized into three categories i.e, Native app,
Web app and Hybrid App.

Native App: Native app is developed specifically for one platform, which is coded
with a specific programming language (like Objective C for iOS, Java for Android)
and installed directly onto the device and can take full advantage of all the device
features. Native apps can use the device’s notification system and can work offline.
Native apps are installed through an application store (such as Google Play or
Apple’s App Store). Native mobile apps provide fast performance and a high degree
of reliability. Example of native apps: Temple Run, Candy Crush, etc.

Web App: Web applications are mobile web portals that are designed, customized
and hosted specifically for mobiles. They are accessed through the mobile device’s
web browser using a URL. Web apps became really popular when HTML5 came
around and people realized that they can obtain native-like functionality in the
browser. Mobile web applications cannot use device functionality. Example of web
app: google.com, m.snapdeal.com, m.yahoo.com, etc.

Hybrid App: Hybrid Apps are web apps embedded in a native app, run on the
device, and are written with web technologies (HTML5, CSS, and JavaScript). Hybrid
apps run inside a native container and leverage the device’s browser engine (but not
the browser) to render the HTML and process the JavaScript locally. A web-to-native
abstraction layer enables access to devices capabilities that are not accessible in
mobile web applications, such as the accelerometer, camera, and local storage. A
hybrid app is NOT tied to any platform or any particular mobile device. So, it can run
on any device once built. Example of a Hybrid app: Flipkart, Facebook, Twitter, etc.

Question 8. What is the Appium philosophy?


These are the four philosophies Appium is based around-
 Test the same app you submit to the marketplace
 Write your tests in any language, using any framework
 Use a standard automation specification and API
 Build a large and thriving open-source community effort

Question 9. What Is Appium’s Strongest Point in your opinion?

Appium is based on Selenium which is an HTTP protocol by Google designed to


automate browsers. The idea is actually very nice as automating an app (especially
a webview-based one) is not so different (in terms of required APIs) from automating
a browser.

Appium is also designed to encourage a 2-tier architecture: a machine runs the test
written in one language (C#, Ruby, JavaScript are only a few among the many
supported ones) and another one (the test server) actually executes it. Furthermore
the WebDriver protocol targets scalability (because based on HTTP), this makes
Appium very scalable as well; remember that you will need to write your test once,
Appium will be in charge of executing it on more platforms.

Question 10. What Is Appium?

Appium is an open source, cross-platform automation testing tool. It is used for


automating test cases for native, hybrid and web applications. The tool has a major
focus on both Android and iOS apps and was only restricted to the mobile
application testing domain. Recently, a few updates back, Appium also announced
that they will support the testing of desktop applications for windows. Appium is
developed and maintained by Sauce Labs. Currently, Appium version 1.10 is being
distributed. Appium first started off as a command line based testing service that can
be installed using Node.js. In their latest release, named ‘Appium desktop’ they have
released a robust and refined tool with an intuitive graphical user interface. 

Question 11. What are the main advantages Of Using Appium On


Sauce Labs?
Question 12. List Out The Appium Abilities.

Appium abilities are:

 Test Web
 Provides cross-platform for Native and Hybrid mobile automation
 Support JSON wire protocol
 It does not require recompilation of App
 Support automation test on a physical device as well as simulator or emulator
both
 It has no dependency on a mobile device

Question 13. Can you comment about the performance of 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).

Question 14. List Out The Limitations Of Using Appium?


Question 15. Do you 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.
Intermediate Questions
Question 16. What Type Of Tests Are 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.

Software Testing Fundamentals Course

 Instructor-led Sessions
 Real-life Case Studies
 Assessments
 Lifetime Access

Explore Curriculum

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!

Question 17. List some issues Faced With Cross-Platform Testing?

Generally, the issue depends upon the different OS/device version. It might be that
the same application is working on one OS while it might not work on another
version. For example, we 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 application
crashes and the same happened with 2.3.5 Vs.

Question 18. Explain The Design Concept Of Appium.


 Appium is an “HTTP Server” written using Node.js platform and drives iOS
and Android session using Webdriver JSON wire protocol. Hence, before
initializing the Appium Server, Node.js must be pre-installed on the system
 When Appium is downloaded and installed, then a server is set up on a
machine that exposes a REST API.
 It receives connection and command request from the client and executes
that command on mobile devices (Android / iOS)
 It responds back with HTTP responses. Again, to execute this request, it uses
the mobile test automation frameworks to drive the user interface of the apps.
 Apple Instruments for iOS (Instruments are available only in Xcode 3.0 or later
with OS X v10.5 and later).
 Google UIAutomator for Android API level 16 or higher
 Selendroid for Android API level 15 or less

Question 19. I Already Have Platform-specific Tests For My App, What


Should I Do To Migrate To Appium?

Unfortunately, there is no magic formula to translate your tests into Selenium tests. If
you developed a test framework on different layers and observed good programming
principles, you should be able to act on some components in your tests in order to
migrate your suites to Appium.

Your current tests are going to be easy to migrate if they are already using an
automation framework or something close to a command-based interaction. Truth be
told, you will probably need to write your tests from the beginning.

Question 20. When Performing End To End Mobile Testing What Major
Criteria Are Taken Into Consideration?

Major areas are

 Installation of the application.


 First time launching an application without having network access.
 Uninstallation of the app.
 The orientation of the app if it is supported.
 Testing application performance on different kinds of devices and network
scenarios.
 Testing the application response and how it responds when an invalid user
credential is provided.

Also, if your application is accessing any network then you must check the logs
generated during that period so that the sensitive information should always go in an
encrypted form.

Question 21. How Do You Test Patches Intended For An App Already
In Production?

We generally do regression testing of a relative module and mainly focus on the area
which is related to the bug fixes as per the developer. This is because we cannot
perform complete regression testing in a very short span of time. So, we just
perform sanity tests on the rest of the application, but only for high priority devices.
High priority devices are systems that are running the latest versions of the operating
system. 

Question 22. What Kind of Testing Would You Perform For a General
Application?

The very first test we have to perform is installation. After that, we check the basic
functionality and following which, we check the connectivity of the application with its
peripherals. Then we uninstall the build and verify how the application responds
when we interrupt it during installation. We also check interruption scenarios when
our application requests a network call.

We also perform low network/poor connectivity testing during a network call. The
process of upgrading from an older version to a newer version is also tested.
Navigation in the application without a network is an important feature that is tested
in general testing. Also, the compatibility of the app on different kinds of phones is a
major criterion in general testing.

Question 23. How Much Time Does It Take To Write A Test In


Appium?

Of course, it depends on the test. If your test simply runs a scenario, it will take as
many commands as the number of interactions needed to be performed (thus very
few lines). If you are trying to exchange data, then your test will take more time for
sure and the test will also become difficult to read.

Question 24. What Test Frameworks Are Supported By Appium?

Appium does not support test frameworks because there is no need to support them.
You can use Appium with all sorts of testing frameworks. NUnit and .NET Unit Test
Framework are just a few examples. You will write your tests using one of the drivers
for Appium, thus your tests will interface with Appium just in terms of an external
dependency. 

Question 25. What Is Data Exchange?

When I say “data exchange” I am not referring to scenarios like getting or setting the
value of a textbox or an elements attribute. All these things are easy to achieve in
Appium as Selenium provides commands just for those. By “data exchange” I mean
exchanging information hosted by complex objects stored in different parts of your
webview-based app like the window object.

Consider the scenario when you dispatch and capture events. Your app can possibly
perform many functions and the way the flow of data can be handled are many.
Some objects might also have a state and the state machine behind some scenarios
in your app can be large and articulated. For all these reasons you might experience
problems when testing.
Question 26. What Are The Features And Benefits Of Quick Test
Pro(qtp)?

The following are the features and benefits of Quick Test Pro:
Question 27. Consider A Scenario Where You Don’t Want To Setup A
Whole Infrastructure, And Neither Spend Money. Can Appium Help
Out In Such A Scenario?

If you think about it, what really is required from is the test script. The fact that you
must deploy an Appium server somewhere is just an extra feature. If you want to
skip this part, you can rely on some web services that have already deployed a
whole architecture of Appium servers for your tests. Most of them are online labs and
they support Selenium and Appium. In this way, you don’t spend exorbitant amounts
of money and you also don’t invest time and effort on new infrastructure. 

Question 28. Is Debugging Appium Difficult?

No. Appium is a Node.js application, therefore, in essence, it is Javascript. The code


is available on GitHub and can be downloaded in a few seconds as it is small and
not so complex. Depending on what you have to debug, you will probably need to go
deeper in your debugging experience. However, there are some key points were
setting a breakpoint is always worth it, for example, the proxy component is worth a
mention. In appium/lib/server/proxy.js you can set a breakpoint in
function doProxy(req, res), that will be hit every time commands are sent to
platform-specific components to be translated into automation commands.

Question 29. Mention The Basic Requirement For Writing Appium


Tests.

For writing Appium tests you require:

 Driver Client: Appium drives mobile applications as though it were a user.


Using a client library you write your Appium tests which wrap your test steps
and sends them to the Appium server over HTTP.
 Appium Session: You have to first initialize a session, as such Appium test
takes place in that session. Once the Automation is done for one session, it
can be ended.
 Desired Capabilities: To initialize an Appium session you need to define
certain parameters known as “desired capabilities” like PlatformName,
PlatformVersion, Device Name and so on. It specifies the kind of automation
one requires from the Appium server.
 Driver Commands: You can write your test steps using a large and
expressive vocabulary of commands.

Question 30. What Are The Risks Associated In Automation Testing?

The risks of Automation Testing are:

 Do you have skilled resources? Automation testing demands resources


with some knowledge about programming. Firstly, focus on resources and
then identify whether the resources have proper knowledge for automation
testing. Are they capable to adapt easily to the new technologies? These
measures are to be well assessed for building an automation testing team.
 The initial cost for automation is high. The initial cost for automation is too
high for the initial setup. It includes the cost of automated tools to be
purchased, training and maintenance of the test scripts. The unsatisfied
customer base is high for automation testing their products. It should be
ensured that the cost compensates the testing results.
 If UI is not fixed, do not think about automation: Prior to automating the
user interface, it should be strongly be determined that, whether the UI is
changing extensively or the cost of the automated script maintenance is high
or not.
 Stop automating the tests which run once: Ensure that certain test cases
might be running once and not included in the regression testing. Avoid
automating such test modules.

Question 31. How Can I Run Android Tests Without Appium?

For older versions of Android, Appium might not be supported. For instance, Appium
is only supported for Android versions 4.4 or later for Mobile Web Application tests,
Android versions 2.3, 4.0 and later for Mobile Native Application and Mobile Hybrid
Application tests.

For those versions in which Appium is not supported, you can request an emulator
driven by Webdriver and Selendroid. All you need to do is, use the Platforms
Configurator and select Selenium for the API instead of Appium. In the Sauce Labs
test, you will notice that the top of the emulator says “AndroidDriver Webview App”.
In addition, you will notice that you will get a “Selenium Log” tab which has the output
of the Selendroid driver.

Software Testing Fundamentals Course

Watch The Course Preview

With an emulator driven by Webdriver & Selendroid, you will be able to test Mobile
Web Application only. You should be able to select any Android emulator version
from 4.0 to the latest version and any Android emulator skin (e.g “deviceName”:
“Samsung Galaxy Tab 3 Emulator”).

Question 32. How Can I Run iOS Tests Without Appium?

For older versions of iOS, Appium might not be supported. For instance, Appium
supports foriOS versions 6.1 and later. For earlier versions of iOS, the tool or driver
used to drive your mobile applications automated test is called iWebdriver.
To obtain a simulator driven by iWebdriver use the Platforms Configurator and select
Selenium for the API instead of Appium. With an emulator driven by iWebdriver, you
will be able to test Mobile Web Application only. In addition, in the Sauce Labs test,
you will notice a “Selenium Log” tab which has the output of iWebdriver.

Question 33. Can You Explain The Filters That You  Create While
Checking Logs?

Filters help you in finding relevant information about your application and you can
create a filter based on the application package name like com.abc.com. You can
save this filter by any name. When you click on this filter, you will see only those logs
which are from your application.

You can create a filter based on log tag which is related to a  particular line of code,
for example, if you have placed system.out to print the output then you can create a
filter by a tag System.out. Then it will shortlist all the print output in the code. You
can create a filter by Choreographer which helps in finding the skipped frames if
you want to see them. You can create filters corresponding to your PID and log
message.

Question 34. Mention The Selecting Criteria For Test Automation Tool
For Mobile Testing.

For mobile testing, the test automation tool should have the following criteria
Question 35. List Out The Most Common Problem That A Tester Faces
While Performing Mobile Testing In Cloud Computing?

Challenges that a tester faces while performing mobile testing are:

 Subscription model
 High Costing
 Lock-in
 Internet connectivity issues
 Immense consumption of time in image-based automation testing.
 Automation is restricted by the framework

Question 36: What Would You Prefer To Test Your Application On –


Real Devices Or Use Simulators/Emulators?

It’s one of the most commonly asked Appium interview questions. You’ve to be a
little logical and practical while answering it. Don’t just simply answer “It would
depend on what you need.”, because it would be a layman answer which interviewer
won’t expect from you. Rather you should explain it by an example. You can answer
by saying that it’s always best to test on real devices. As it would allow you to catch
errors that you may not detect otherwise, but, you have to configure the device
smartly with the Appium server so that it can detect the device. Sometimes the
ADB(Android Debug Bridge) may disconnect from the device even if it remains
plugged in, and it can cause your tests to fail. To handle such issues, you can write a
module which resets the ADB after some time to re-connect to the devices.

Question 37: What Is Appium Inspector And Why Is It Used?

It is similar to the Selenium IDE plugin and enables the record and playback support
in Appium. It captures the moves of a native application by inspecting DOM and
produces the test scripts in any desired language. However, Appium Inspector does
not support Windows and uses the <UIAutomator> viewer.

Question 38: What Are The Probable Errors You Might Come Across
While Working With Appium?

The following are the errors you might observe with Appium.

 Error#1: Missing desired capabilities e.g. Device Name, PlatformName.


 Error#2: Couldn’t locate ADB. You may have missed setting
the <ANDROID_HOME> environment variable.
 Error#3: Selenium
exception <openqa.selenium.SessionNotCreatedException>. It indicates a
failure in creating a new session.
 Error#4: Failure in locating a DOM element or determining the XPath.

Question 39. What Are The Problems Faced While Running A Test In
A Multithreaded Environment?

You need special care while using Appium in a multithreaded environment. The
problem does not rely on the fact of using threads in your tests. You can use them
but, you must ensure that no more than one test runs at the same time against the
same Appium server. Appium does not support multiple sessions, and unless you
have implemented an additional layer on top of it to handle this case, multiple tests
might fail.
Advanced Questions
Question 40: List The Selenium Commands That Work With Appium.

There are a number of Selenium commands that work with Appium tool.

 Locate commands using ID or class names.


 Raise events on elements e.g. Click().
 Text commands like type().
 Get/Set element properties.
 Commands to run JavaScript.
 Switch context between different web views like switching <iFrames> in
Selenium Webdriver.
 Commands to manage alert boxes

Question 41: List OneThing Which You Cannot Do With Emulators But
You Can Do With A Real Device.

You can test the interrupts like

 Phone calls & Messages


 Battery drains out while using the application under test
 Low battery scenarios
 Memory card mount/unmount scenarios
 Actual performance of your application 
 Bluetooth related testing.

Question 42: Which Tools Are For Performance Testing And


Automation?

For performance testing of web services, you can use JMeter. It is an open source
tool which can be used to test the API’s performances.

For automation, there are several paid tools available in the market like SeeTest,
Ranorex, Silk Mobile etc while free automation tools are Calabash, Appium,
Robotium for Android, KIF for iOS.

Question 43: What Are The Tools Used In Debugging?

We generally use logs to see the cause of the issue, where the failure is occurring.
So for iOS – iPhone configuration utility & for Android Monitor.bat, etc can be
used. If you provide logs from these tools to the developer, they can easily
understand the cause of the issue.

Question 44: Explain What Does Mobile Security Testing Includes.

Mobile security testing includes


Question 45: When To Choose Automation Testing And When To
Choose Manual Testing?

Manual Testing
 If the application has new functionality
 If the application requires testing once or twice

Automate Testing

 If the regression tests are repeated


 Testing app for complex scenarios

Question 46: Mention Few Disadvantages of Automation Testing.

Designing the tools and tests to run software takes a lot of manual, human effort,
though there are frameworks and tests ready-made for engineers to use. Even with
automated testing, human error is still a factor – tools can be buggy, inefficient,
costly, and sometimes even technologically limited in what kinds of tests they can
run on their own.

Question 47.: What Are The Pre-requisites To Start Automation


Testing?

The first step is to segregate the different test cases that are to be automated.
Following this, you must prepare test data as per the needs of the test cases.
Reusable functions need to be written which are frequently used in those test cases.
Later test scripts are prepared by using reusable functions and applying loops and
conditions wherever necessary.

Question 48: What Are The Differences Between Open Source Tools,
Vendor Tools, And In-house Tools?

Open source tools are free to use frameworks and applications. Engineers build the
tool and have the source code available for free on the internet for other engineers to
use.

Software Testing Fundamentals Course

Weekday / Weekend BatchesSee Batch Details

Vendor tools are developed by companies that come with licenses to use, and often
cost money. Since they are developed by an outside source, technical support is
often available for use. Example vendor tools include WinRunner, SilkTest, Rational
Robot, QA Director, QTP, LR, QC, RFT, and RPT.
An In-house tool is a tool that a company builds for its own use, rather than
purchasing vendor tools or using open source tools.

Question 49. Is Automation Testing A Complete Replacement For


Manual Software Testing?

No. Proper automation requires as little intervention from humans as possible since
the tools used are built to run tests once they are set up. As convenient as this might
be, it should not be a complete replacement for manual testing – only for repetitive
tasks like load testing, where thousands of virtual users are required.  Engineers
should not automate things like test scripts if those scripts can only be expected to
run occasionally, nor should they automate code reviews, or bug testing for new
builds of software that might require human interaction to detect issues. We can
conclude by saying that large-scale, repetitive tasks are a better fit for automation.

Question 50. What Are The Points That Are Covered In The Planning
Phase Of Automation?

During the planning phase of automation, the points to be considered are as follows:

 Selection of the “right” Automation tool


 Selection of Automation Framework if required
 List of in scope and out of scope items for automation
 Test Environment Setup
 Preparing the Gantt Chart of Project timelines for test script development &
execution.
 Identify Test Deliverables

Q1) Explain Appium Vs Calabash?

Ans: 

Features Appium Calabash

Python, javascript, ruby, java & all


Language Support Only language Ruby is supported
major languages

We need a custom safari app for


iOS mobile web page Not well supported
automation

Custom UI commands & iOS UI


Hybrid iOS app Custom UI commands & iOS framework
Automator

Native iOS app Only the iOS UI Automator iOS instrumentation - calabash iOS

Android Mobile web app Only automates chrome browser Not well supported

Hybrid Android app Only the selendroid app Android instrumentation - calabash android
Both android UI Autometer &
Native Android app Android instrumentation - calabash android
selendroid

Android, iOS UI Autometer &


Internal tools Android & iOS instrumentation framework
selendroid

Q2) What are native Apps?

Ans: 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.

Q3) What are Mobile Web Apps?

Ans: 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.

Q4) What are hybrid apps?

Ans: Those apps that are equipped with a wrapper around the web view is known as Hybrid app.
This is native control that will facilitate the interaction with the web content.

Q5) Name the language that is used to write tests in Appium?

Ans: 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 Selenium protocol. 
The most sought after development frameworks are .Net, C#, Java, Python, JavaScript, and
Ruby.

Q6) What are the prerequisites to use Appium?

Ans: The pre-requisites that are used in Appium. They are listed below.
1. Eclipse IDE
2. Android SDK
3. TestNG
4. Web driver language binding library
5. JS
6. JDK
7. APK App Info on Google play
8. Selenium server jar
9. Appium for Windows

Q7) Write the advantages of using Appium?

Ans: The advantages of Appium are listed below:-

1. Using the same API, Appium will allow you to write tests that are against mobile
platforms.
2. By using any kind of test framework or language you can write and run the tests.
3. Appium is an open source platform so you can contribute to it easily.
4. For the hybrid mobile applications and Native, Appium provides cross-platform.
5. Appium supports the JSON wire protocol. 
6. Appium does not require recompilation of App.
7. Appium also supports automation tests on the physical devices and also for simulator or
emulator both.
8. Appium does not have any dependency on mobile devices.

Q8) Name the test frameworks that are supported by Appium?

Ans: 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 .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.

Q9) Write down the disadvantages of Appium?

Ans: The disadvantages of Appium are listed below:


1. The testing of that android that is lower than 4.2 is not allowed. 
2. 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.   
3. There is no support that will allow you to run an Appium Inspector on Microsoft
Windows.

Q10) What are the requirements to write Appium tests?

Ans: There are certain basic requirements when it comes to writing Appium tests and they are:-

1. Driver client – Mobile applications are driven by Appium like that of a user. With the
help of a client library, Appium tests can be written and these will wrap the steps of a test
and then send it to Appium over the HTTP.
2. Appium Session – Appium tests take place within a session so it is important to
initialize an appium session first. Once there is an end to the automation of a session it will
be ended and wait again for the next session.
3. The desired capabilities – In order to initialize an appium session it is very important to
design some parameters which are known as desired parameters. These parameters are
platform version, platform name, device name, and many more. This also helps in
specifying the type of automation that is required from the Appium server. 
4. Driver Command – In Appium you have the facility to write the tests by using a big and
expressive collection of commands.

Q11) Name the Appium inspector?

Ans: 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 for Windows and they use
UIAutomator viewer in the option.

Check Out Appium Tutorials

Q12) Suppose you are testing App, how will the data be exchanged between your test and the
App?
Ans: 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. 

Q13) Explain the design of the Appium?

Ans: Appium is considered as an HTTP server that is written using Node.js platform. It runs on
both android and IOS session with the help of web driver JSON wire protocol. After the download
and installation of the Appium are completed the server is then set up on the machine which
exposes a REST API. Then the Appium also receives connections and command requests from
clients. These commands are then executed on mobile devices. Generally, appium respond
backs with an HTTP response. To execute the request, Appium uses mobile test automation
frameworks so that it can drive the user interface of the apps. Some of the mobile automation
frameworks are 

1. Google UIAutomator for Android API of level 16 or more than that


2. Apple instruments for IOS platform
3. For android API level 15 or lesser than that, Selendroid is used. 

Q14) How can you find the DOM element or X path in the case of a mobile application? 

Ans: In order to find the path between DOM elements or X path elements you can make use of
"UIAutomateviewer" in the case of Android application. 

Q15) What are the pros and cons of Appium? 

Ans:

Pros-

Irrespective of the platform, the programmer will be able to automate all the complexities which
remain under a single Appium server. Also, Appium helps in providing cross-platform mobile
testing which signifies that the same test pattern will work on multiple platforms. 
With the help of Appium, there will be no need for extra components in the app to make it more
users friendly. Appium can also automate hybrid, web and native mobile applications. 
Cons - 

It is not possible to run scripts on multiple IOS simulator simultaneously. With the help of Appium,
you are able to use UI Automator in case of Android automation which only supports the Android
SDK platform and those API which is 16 more than that. For using an older version of APIs you
will have to use another open source library which is known as Selendroid.

Q16) Name the types of errors that you can face in Appium?

Ans:

1. Error type one: These types of errors occur when there is the need for desired capabilities
but they are not provided. Missing of Device name or platform name is considered to be part of
this error type.

2. Error type two: These types of errors occur when you cannot find adb. To avoid this type of
error can be avoided by setting the Android Home environment variable with the Android SDK
root directory path. 

3. Error type three: This falls under the category of penqa.selenium.Session Not Created
Exception which will not allow you to create a new session.

Q17) Is there a need for a server machine to run tests on Appium?

Ans: In order to run tests on Appium there is no need for a server machine. The 2-tier
architecture is facilitated with Appium. It is in this 2-tier architecture that the test machine gets
connected to a test server which is running on Appium and also automating the whole thing.
Appium can be run on the same machine where you are running the tests.  

Q18) Do you think it is possible to interact with the apps by using javascript while you are
testing the Appium?

Ans: While you are testing the Appium it is possible for you to interact with the apps using
Javascript. During the time when the commands are being run on Appium, the server will then
send the script to the app that is wrapped in an anonymous function which is to be executed.
Q19) What are the most difficult scenarios that one might face while testing Appium?

Ans: Data exchange is the most difficult scenario that one might face while testing Appium.

Q20) Is it possible to run tests in a multithreaded environment while you are using Appium?

Ans: It is indeed possible to run tests on the multithreaded environment but you have to make
sure that no two tests are running simultaneously on the same Appium server.

Q21) In the case of the Android platform is it necessary to have an app’s .apk so that it can
automate using Appium or do we also need an app in the workspace?

Ans: In the case of the android platform, to automate using Appium you will require an only .apk
file.

Q22) What is an Appium package master? How can you create an Appium Package?

Ans: A set of tools that are required to create and manage appium packages are defined as
Appium Package master. In order to create a package use the following code:-

#using es7/babe1

Gulp create-package –n

#regular es5

Gulp create-package ---nobabe1 –n

The package will be created in the out/


Q23) What is the underlying API that Appium follows?

Ans: The underlying selenium API is followed by Appium so that it can automate test cases. It is
said that since all the selenium APIs are present in Appium as well so Appium is an extension to
the selenium. 

Q24) How can you inspect elements that are present in the Native Android App?

Ans: With the help of the UI Automator tool that is present in Android SDK, you will be able to
access those object locators that are part of the Android Native app.

Q25) Mention the method with which you can scroll down in App?
Ans: With the help of the scrollTo () method, you will be able to scroll down in App. Also, such a
method will help you to automatically scroll until the specific text is not match.

Q26) Is it possible to start an Appium server programmatically?

Ans: It is possible to start an appium server programmatically. Generally, the commands that are
being entered to the command prompt are written in note pad and it is saved with .bat extension
and you can click the bat file. 

Q27) How can you inspect elements on the IOS apps?

Ans: With the help of using an Appium inspector that is a GUI based tool you can identify
elements on IOS apps. These GUI based tools are quite similar to that of selenium IDE.

Q28) How is it possible to identify Mobile browser objects?

Ans: You can make use of User Agent in order to identify objects in the Mobile browser. It is
done by using the user agent and then changing the browser as the mobile proxy and thus gets
an object.

Q29) Write the command that will allow you to identify objects uniquely when there are
multiple objects within the same class name using Appium?

Ans: With the help of the command driver.findElements (By.className) it is possible to identify


the elements uniquely. 

Q30) Give the difference between emulator and simulator?

Ans: The simulator is used for calling IOS virtual devices that will launch from Xcode in MAC.
The emulator is used for calling Android virtual devices.

Q31) Do I need Appium?

Ans: The answer to such a question is always: “It depends on what you need!”. So the actual
question becomes: “Which conditions make Appium suitable for me?”. The most important
assumption is that you are developing apps (pretty obvious I know). If you are developing an app
for a specific platform (and have no intention of supporting others in the future), Appium is not
really required and this is basically the answer you are looking for. Appium becomes meaningful
only when you have apps targeting more than one platform (Windows, Android or iOS to cite
some). Appium becomes essential if you have a webview-based app (necessarily) targeting
many platforms out there.

Q32) How difficult is it to set up a working environment?

Ans: The assumption is that Appium comes with not-so-tiny documentation, so users are not
really left alone. However, it is not so straightforward to set up Appium to work on a Windows or
Mac machine (did not try on Unix so far). In my experience, instead of installing the GUI-based
application, it is much better to install the command-line application (which is released more
often). Also beware [sudo], as Appium will surely bite you back late in time if you installed it as a
[superuser] (this is probably the clearest point in the documentation)

Q33) Can Appium be used for all my tests?

Ans: This is an implied question in this question. The answer is No (in general). As I said before
Appium is not suitable for all types of tests you might want to write (this depends on the
functionalities you need to cover). There are some scenarios that can be difficult to test and
some of them are so platformed specific that you will need to write some suites just for Android
or iOS for example. Remember that you can always get to do something no matter how hard it is,
so you can test all your difficult scenarios using Appium, but always keep in mind one question:
is it worth the time and the pain? Having Appium testing some scenarios leaving a few tests to
other approaches is fine too! The world is not black and white!

Q34) What is Appium’s most considerable limitation?

Ans: Hand down my chin starting thinking and mumbling. If I had to provide one single thing you
should be aware of about Appium before starting using it, it would surely be multiple session
handling. Since Appium is a server, it serves HTTP requests; you might have two different
computers running a test each against the same Appium server: what happens? As for now,
Appium does not support this scenario and the second test will be aborted. This is a considerable
limitation because no queuing system comes with Appium. If you need to support multiple
sessions, you will need to implement this feature by yourself.

Q35) How active is Appium?


Ans: Appium is available on GITHUB and there you can find all you need. The Appium team is
responsible for developing many different subsystems revolving around Appium (like APIs for
different languages), thus I can tell you that this product is alive and very active. The team is also
pretty well responsive and once you open an issue you will find a reply after no more than 36
hours (this ETA comes from my personal experience). The community around Appium is also
pretty large and growing every month.

Q36) Which approach is the best? Testing on real devices or simulators/emulators?

Ans: This is a tough question because both options offer different levels of testability and
flexibility when testing. There are also many problems associated with each. So my answer will
be again: “It depends on your needs!”.
Running the test on a device is, always in my opinion, the best solution because it offers a testing
environment completely aligned with the running environment: tests run on those devices where
your apps will be used once published in stores. However devices must be connected to the
Appium server via USB at least, and this is not always a very nice thing. ADB has a known issue
for which a device disconnects after a while (even though it remained plugged all the time):
because of this your tests might fail after a while and Appium will report that a device could not
be found! I had to write a component that resets ADB after some time so that devices will not
disconnect.

Q37) Tests on emulators or simulators.

Ans: On the other hand, emulators/simulators will never disconnect from Appium. They also offer
nice options like the ability to choose the orientation or other hardware-related configurations.
However, your tests will run much slower (sadly, my tests ran 3 times slower) and do expect
some crazy behavior from the Android emulator which sometimes shuts down unexpectedly.
Another problem is that emulators tend to allocate a lot of memory.

Q38) I already have platform-specific tests for my app, what should I do to migrate to
Appium?

Ans: Unfortunately, there is not a magic formula to translate your tests into Selenium tests. If you
developed a test framework on different layers and observed good programming principles, you
should be able to act on some components in your tests in order to migrate your suites to
Appium. Your current tests are going to be easy to migrate if they are already using an
automation framework or something close to a command-based interaction. Truth be told, you
will probably need to write your tests from the beginning, what you can do is actually reusing your
existing components.

Q39) How much time does it take to write a test in Appium?

Ans: Of course, it depends on the test. If your test simply runs a scenario, it will take as many
commands as the number of interactions needed to be performed (thus very few lines). If you are
trying to exchange data, then your test will take more time for sure and the test will also become
difficult to read.

Q40) Any tips or tricks to speed up my test writing activity or my migration process?

Ans: Here is one piece of advice. Since your tests will mostly consist of automation tasks (if this
condition is not met, you might want to reconsider using Appium), make interactions reusable! Do
not write the same sub-scenarios twice in your tests, make a diagram of what your scenarios are
and split them into sub-activities; you will get a graph where some nodes are reachable from
more than one node. So make those tasks parametric and call them in your tests! This will make
your test writing experience better even when you need to migrate from existing tests (hopefully
you already did this activity for your existing suites).

Q41) What test frameworks are supported by Appium?

Ans: Appium does not support test frameworks because there is no need to support them! You
can use Appium with all test frameworks you want. NUNIT and.NET UNIT TEST FRAMEWORK
are just a few examples; you will write your tests using one of the drivers for Appium; thus your
tests will interface with Appium just in terms of an external dependency. Use whatever test
framework you want!

Q42) Is it possible to interact using Javascript with my apps, while the appium testing
running?

Ans: Yeah, It is possible! Selenium has commands to execute Javascript instructions on your


app from your tests. Basically you can send a JS script from your test to your app; while the
running commands on Appium, the server sends the scripting to the apps you used by wrapping
into an anonymous function that have to be executed.

Q43) Is it Returning the values?


Ans: However your Javascript interaction can get more advanced as your script can return a
value that will be delivered to your test when the HTTP response is sent back by Appium once
your Javascript has finished running. However this scenario comes with a limitation: your
Javascript can send back only primitive types (integers, strings), not complex objects. The
limitation can be overtaken by passing objects as JSON strings or by modifying Appium’s or
Selenium’s code to support specific objects.

Q44) How can I exchange data between my test and the app I am testing?

Ans: Appium, actually the WebDriver specification, is not made for exchanging data with your
app, it is made to automate it. For this reason, you will probably be surprised in finding data
exchange not so easy. Actually, it is not impossible to exchange data with your app, however, it
will require you to build more layers of testability.

Q45) What data exchange is?

Ans: When I say “data exchange” I am not referring to scenarios like getting or setting the value
of a textbox. I am also not referring to getting or setting the value of an element’s attribute. All
these things are easy to achieve in Appium as Selenium provides commands just for those. By
“data exchange” I mean exchanging information hosted by complex objects stored in different
parts of your webview-based app like the window object. Consider when you dispatch and
capture events, your app can possibly do many things and the ways data flows can be handled
are many. Some objects might also have a state and the state machine behind some scenarios
in your app can be large and articulated. For all these reasons you might experience problems
when testing.

Q46) What are Testability layers?

Ans: In order to make things better, as a developer, what you can do is adding testability layers
to your app. The logic behind this approach is simply having some test-related objects in your
app which are activated only when your tests run. I learned about this strategy from one of my
colleagues Lukasz and such a technique can be really powerful. Enable your testability layers
when testing in order to make data exchange easy. 

Q47) Is it Exchanging data through Javascript?


Ans: Selenium provides commands to execute Javascript on the app, it is also possible to
execute functions and have them return data (only basic types). If you exchange JSON strings it
should be fine as JSON.stringify(str) will turn your JSON string into an object on the app side,
while on the test side (depending on the language you are using), you can rely on hundreds of
libraries to parse the string you receive.

Q48) What are the most difficult scenarios to test with Appium?

Ans: Appium is not suitable for all types of tests. There is a particular scenario that will make
your tests more difficult to write: data exchange. I already said it but I will repeat the same thing
because it is very important: Appium and WebDriver are designed to automate stuff… not to
exchange data with them. So what if we need to exchange information with our app during tests?
Should we give up on Appium and write our tests manually for each platform? I am not saying
this, but there are cases where you should consider this option (not nice I know, but if the effort
of writing tests for Appium is higher than the benefits, then just throw Appium away).
Appium is very nice because it will let you write tests once for all platforms instead of writing as
many tests as the numbers of platforms you need to support. So if you need to exchange data
with your app while testing it and this data flow is the same for all platforms, then you should
probably keep on using Appium and find a way to write a layer on top of it to handle data.
Depending on your needs this might take time, but, in my experience, it is really worth it.

Q49) I don’t want to set up a whole infrastructure for my tests and I don’t want to spend
money on HW. Can Appium help me?

Ans: If you think about it, what really is required from you is writing tests. Then the fact that you
must deploy an Appium server somewhere is something more. If you want to skip this part, you
can rely on some web services that already deployed a whole architecture of Appium servers for
your tests. Most of them are online labs and they support Selenium and Appium.

Q50) I need to debug Appium, is it difficult?

Ans: Not really! Appium is a NODE.JS application, so it is Javascript in the essence. The code


is available on GITHUB and can be downloaded in a few seconds as it is small and not so
complex. Depending on what you have to debug, you will probably need to go deeper in your
debugging experience, however, there are some key points where setting a breakpoint is always
worth: the proxy component is worth a mention. In appium/lib/server/proxy.js you can set a
breakpoint in function doProxy(req, res), which will be hit every time commands are sent to
platform-specific components to be translated into automation commands.

Q51) I build my apps with CORDOVA, is it supported by Appium?

Ans: CORDOVA is a very famous system that enables you to develop webview-based apps for
all platforms in a short time. Appium does not explicitly say that Cordova is supported, even
though they do it implicitly as some examples using apps built with Cordova are provided on
Appium’s website. So the answer is that Cordova should not be a problem. Why am I being so
shy about it? Because anything can happen and it actually happened to me!
Cordova and Appium are two different projects that are growing up separately and
independently, of course, a mutual acknowledgment is present, but both teams do not really talk
to each other when pushing features. So problems can occur (I am currently dealing with a
problem concerning Cordova’s new version which is causing my tests to fail).

Q52) What are the basic commands that I can use in the SELENIUM protocol?

Ans: Google’s SELENIUM provides a collection of commands to automate your app. With those
commands you can basically do the following:
Locate web elements in your webview-based app’s pages by using their ids or class names.
Raise events on located elements like Click().
Type inside text boxes.
Get or set located element’s attributes.
Execute some Javascript code.
Change the context in order to test the native part of your app or the web view. If your app uses
more webviews, you can switch the context to the webview you desire. If your webview has
frames or iframes inside, you can change context to one of them.
Detect alert boxes and dismiss or accept them. Be careful about this functionality, I experienced
some problems.

Q53) I want to run my tests in a multithreaded environment, any problems with that?

Ans: Yes! You need some special care when using Appium in a multithreaded environment. The
problem does not really rely on the fact of using threads in your tests: you can use them but you
must ensure that no more than one test runs at the same time against the same Appium server.
As I mentioned, Appium does not support multiple sessions, and unless you implemented an
additional layer on top of it to handle this case, some tests might fail.
Q54) How can I run Android tests without Appium?

Ans: For older versions of Android Appium might not be supported. For instance, Appium is only
supported in Android versions 4.4 or later for MOBILE WEB APPLICATION tests, and Android
versions 2.3, 4.0 and later for MOBILE NATIVE APPLICATION and MOBILE HYBRID
APPLICATION tests.
For those versions in which Appium is not supported you can request an emulator driven by
Webdriver + Selendroid. All you need to do is use our PLATFORMS CONFIGURATOR and
select Selenium for the API instead of Appium.
In the Sauce Labs test, you will notice that the top of the emulator says “AndroidDriver Webview
App”. In addition, you will notice that you will get a “Selenium Log” tab which has the output of
the Selendroid driver.
With an emulator driven by Webdriver + Selendroid, you will be able to TEST MOBILE WEB
APPLICATION only. You should be able to select any Android emulator version from 4.0 to the
latest version and any Android emulator skin (e.g “deviceName”:”Samsung Galaxy Tab 3
Emulator”).

Q55) How can I run iOS tests without Appium?

Ans: For older versions of iOS Appium might not be supported. For instance, Appium is
supported in iOS versions 6.1 and later. For earlier versions of iOS the tool or driver used to drive
your mobile applications automated test is called iWebdriver.
To obtain a simulator driven by iWebdriver use our PLATFORMS CONFIGURATOR and select
Selenium for the API instead of Appium. With an emulator driven by iWebdriver you will be able
to test MOBILE WEB APPLICATION only. In addition, in the Sauce Labs test, you will notice a
“Selenium Log” tab which has the output of iWebdriver.

Q56) What mobile web browsers can I automate in the Android emulator?

Ans: Currently the only browser that can be automated in our Android emulators is the stock
browser (i.e Browser). The Android stock browser is an Android flavor of ‘chromium’ which
presumably implies that its behavior is closer to that of Google Chrome.

You might also like