0% found this document useful (0 votes)
8 views47 pages

Compatibility Testing: Through Black Box Technique

Uploaded by

Pavan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views47 pages

Compatibility Testing: Through Black Box Technique

Uploaded by

Pavan Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 47

Q #1) What is the difference between Mobile device testing and mobile application

testing?
Ans. Mobile device testing means testing the mobile device and mobile application testing
means testing of the mobile application on a mobile device.
Q #2) What are the types of mobile applications?
Ans. Mobile applications are of three types:
Native Application– Native app installed from application store like Android’s google play
and apple’ app store. The application which can be installed into your devices and run is
known as a native application for E.G. whats App, Angry birds etc.
Web Application– Web applications run from mobile web browsers like Chrome, Firefox,
Opera, Safari etc using mobile network or WIFI. E.G. of web browser applications are
m.facebook.com, m.gmail.com, m.yahoo.com, m.rediffmail.com etc.
Hybrid Application- Hybrid apps are combinations of native app and web app. They can
run on devices or offline and are written using web technologies like HTML5 and CSS. For
E.G. eBay, Flipkart etc
Q #3) How to test CPU usage on mobile devices?
Ans. There are various tools available in the market like google play or app store from
where you can install apps like CPU Monitor, Usemon, CPU Stats, CPU-Z etc these are an
advanced tool which records historical information about processes running on your device.
Q #4) What are the defects tracking tools used for mobile testing?
Ans. You can use same testing tool which you use for web application testing like QC, Jira,
Rally, and Bugzilla etc.
Q #5) What all major networks to be considered while performing application testing?
Ans. You should test the application on 4G, 3G, 2G, and WIFI. 2G is a slower network, it’s
good if you verify your application on a slower network also to track your application
performance.
Q #6) When performing sanity test on the mobile application what all criteria should
be taken into consideration?
Ans.
 Installation and uninstallation of the application
 Verify the device in different available networks like 2G, 3G, 4G or WIFI.
 Functional testing
 Interrupt testing- Able to receive the calls while running the application.
 Compatibility testing – able to attach the photo in message from gallery
 Test application performance on a different handset.
 Make some negative testing by entering the invalid credentials and test the behavior
of the application.
Q #7) Which things to consider testing a mobile application through black box
technique?
Ans.
 By testing your application on multiple devices.
 By changing the port and IP addresses to make sure the device is getting connected
and disconnected properly.
 By making calls and sending messages to other devices.
 By testing your web application on different mobile browsers like Chrome, Firefox,
opera, dolphin etc.
Q #8) What is the latest version of iOS?
Ans. iOS 15. (This changes quite often, so please check the apple site for most recent info)
Q #9) What is the latest version of Android?
Ans. 11– (also changes often). See all here.
Q #10) What is the extension of Android files?
.apk (Android application package)
Q#11) What is the extension of iOS files?
Ans. .ipa
Q #12) What is the full form of MMS?
Ans. Multimedia Messaging Services
Q #13) What are MT and MO in SMS?
Ans. Sending message is known as MO (Message originate) and receiving the message is
known as MT(Message Terminate)
Q #14) What is WAP?
Ans. WAP is Wireless Application Protocol used in network apps.
Q #15) What is GPRS and how it works?
Ans. GPRS is General Packet Radio Service which works on a mobile network with the
help of IP transmissions. GPRS provides the transmission of IP packets over existing
cellular networks. It provides you internet services on mobile.
Q #16) What is the latest version of Windows?
Ans. Windows 10 (see latest here)
Q #17) What do you mean by Streaming media?
Ans. Streaming is a process of downloading the data from the server. Streaming media is
the multimedia that is transferred from server or provider to the receiver.
Q #18) What are the automation tools available for mobile application testing?
Ans. There are many automation tools available in the market for mobile application testing
but iPhone Tester is one of the best tools to test the application on iPhones and screenfly
for android devices.
Q #19) What is the best way to test different screen sizes of the devices?
Ans. Using emulator. See example here.
Q #20) What is the basic difference between Emulator and Simulator?
Ans. The emulator is based on hardware and software where in simulator is based on
software. Simulation is a system that behaves similar to something else while emulation is a
system that exactly behaves like something else.
Q #21) What are the common challenges in mobile application testing?
Ans. Working on different operating systems, a variety of handsets, different networks, a
variety of screen size. Read more here => 5 Mobile testing challenges and solutions.
Q #22) What are the tools based on cloud-based mobile testing?
Ans. Seetest, Perfecto Mobile, BlazeMeter, AppThwack, Manymo, DeviceAnywhere etc.
Q #23) What web services are used by a mobile app?
Ans. They are many depend upon the application. SOAP and REST web services are used
but RESRful is more common now.
Q #24) What all devices have you worked till now?
Ans. Android, Symbian, Windows, iPhone etc.
Q #25) How to create Emulator on Android?
Ans. Give a name in name field -> select target API from the list -> enter the size -> select
the required skin section -> click on create AVD -> select the required AVD -> click on start
button -> launch it
Q #26) Does Selenium support mobile internet testing?
Ans. Yes, it does, Opera browser is used for Mobile internet testing.
Q #27) Does Selenium support Google Android Operating System?
Ans. Yes, Selenium 2.0 supports Android Operating System.
Q #28) Name debugging tools for mobile?
Ans. Errors can be verified by the generated logs. We can use configuration utility on iOS
and android monitor.bat on android. Here are few to name Android DDMS, Remote
Debugging on Android with Chrome, Debugging from Eclipse with ADT, Android Debug
Bridge, iOS simulator etc.
Q #29) Name mobile automation testing tools you know?
Ans. Paid tools:
Ranorex, Silk Mobile, SeeTest
Free tools:
Appium, Robotium, KIF, Calabash

Also, read => 5 best Android application testing tools.


Q #30) What is the strategy used to test new mobile app?
Ans.
 System integration testing
 Functional testing
 Installation and uninstallation of the app
 Test HTML control
 Performance
 Check in multiple mobile OS
 Cross browser and cross-device testing
 Gateway testing
 Network and Battery testing
Q #31) What does a test plan for Mobile App contain?
Ans. Test plan for mobile app is very similar to software app
1. Objective
2. Automation tools required
3. required features to be tested:
 network
 security
 performance
 size
 battery
 memory
4. features not to be tested
 display size
 resolution
5. Test cases
6. Test Strategy
7. Tested by
8. Time required
9. No. of resources required
Q #32) Why mobile phone has 10 digit numbers?
Ans. The number of digits in a mobile phone number decide the maximum mobile phones
we can have without dialing the country code.
Q #33) Explain critical bugs that you come across while testing in mobile devices or
application?
Ans. Explain the example as per your experience. Here are top 10 mobile app risks.
Q #34) Name mobile application testing tools
Ans.
 Android
 Android Lint
 Find Bugs
 iPhone
 Clang Static Analyzer
 Analyze code from XCode
Q #35) Full form of the various extensions
Ans.
 apk – Android Application Package File
 exe – Executable Files
 iPA –iOS App Store Package
 prc – Palm Resource Compiler
 jad – Java Application Descriptor
 adb – Android Debug Bridge
 Aapt – Android Asset Packing Tool
Q #36) How to test different screen sizes of the devices
Ans. Using Emulators.
Q #37) What is web service?
Ans. It is a component used in software to perform the task. It is like an interface between
one program to another.
Q #38) What are the roles and responsibilities on a current mobile application you are
testing?
Ans. Answer based on your experience on the current project you are working on. Also,
read mobile testing career guide.
Q #39) How to create the log file?
Ans. Using Log4j, CAT.
Q #40) How can we install the build on iPhones and iPads?
Ans. Using iTunes.
Q #41) Can we use QTP/UFT for mobile automation testing?
Ans. Yes, with the help of Seetest add-in.
Q #42) Is cloud base mobile testing possible? Name any?
Ans. Yes, Perfecto Mobile and Seetest.
Q #43) Where to perform forward compatibility testing?
Ans. This can be done with new versions of the mobile application.

1) Explain what is the difference between Web testing and WAP testing?

 WAP Testing: It is the testing the WAP (Wireless Application Protocol) used
in network applications
 Web Testing: It is related mainly to the testing of web applications such as
websites and portals

2) List out some of the automated mobile testing tools?

For mobile testing, two kinds of automation tools are available to test mobile
Applications.

 Object based mobile testing tools: Jama solution, Ranorex,


 Image based mobile testing tools: RoutinBot, Egg Plant, Sikuli

3) Explain what is the difference between simulator and emulator?

 Simulator: It is an electronic network simulation equipment or a base station


equipment for CDMA/CMA mobile phones. It helps in latching home networks
without roaming services and can make Voice; Data calls, SMS,
 Emulator: It is a software to test mobile application without a live handset

4) List out the types of mobile app testing?

The types of mobile app testing includes

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

5) Mention what is the Android testing strategy?

The standard Android testing strategy must include the following test

 Unit Test
 Integration Test
 Operation Test
 System Test

6) Explain Android testing framework?

Android 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 target application. It includes an SDK tools for building test and a tool
that provides APIs for writing program that control 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 target
application, while mock object includes mock data that will be used as sample
input for test cases.

7) List out the best practices for Android Testing?

 Developer should prepare the test cases at the same time when they are
writing the code
 Together with source code all test cases should be stored
 Use continuous integration and execute tests every time the code is changed
 Avoid using rooted devices and emulators

8) Mention what are the common bugs found while mobile testing?

 Critical: Your phone system crash when testing particular feature in your
device
 Block: Unable to do anything though phone is on unless you reboot your
device
 Major: Unable to perform a function of a particular feature
 Minor: Under minor bugs usually GUI bugs fall.

9) Explain what is Robo-electric testing framework?

Testing done on Android Testing Framework for emulators or device is difficult.


Running and building test case sometimes takes lots of development effort. Robo-
electric framework allows you to run Android test directly on JVM without the need of
a device or an emulator.

10) Explain how A/B testing is done for ios app?

A/B testing for ios includes three steps

 Configure a test: It prepares two versions of your iOS app (A&B) and test
metric
 Test: Tests two iOS versions above on devices simultaneously
 Analyze: It select and measure better version to release

11) While performing end to end mobile testing what are the major criteria, you
have to take in consideration?
 Installation
 Application launching without having network
 Uninstallation of app
 Orientation of app if it supports
 Testing application performance on a different kind of devices and network
scenarios
 Testing the application response how it is responding

12) List out the features does monkey tool provides?

Monkey tools provide features like

 Basic configuration options


 Operational constraints
 Event types and frequencies
 Debugging options

13) Mention what should be the selecting criteria for Test Automation Tool for
mobile Testing?

For mobile testing, the test automation tool should have following criteria

 Multi-platform support: Ensure that the tool does support your current and
future target platform
 Script Usability: Object-based tools provides a high degree of the script
usability
 Jailbreak Requirement: If the tool uses rooted devices, it may not support
latest OS version and may be incompatible with MDM policies
 Source Code Changes: Sharing source code may not be possible always
 Lead time for New OS version: How soon tool can support new
iOS/android/other OS version

14) When to choose automation testing and when 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
15) List out the most common problem that tester faces while doing mobile
testing in Cloud Computing?

Challenges that tester faces while doing mobile testing are

 Subscription model
 High Costing
 Lock-in
 Internet connectivity issues
 Automation is image based and time-consuming
 Automation cannot be used outside the framework

16) Explain what does mobile security testing includes?

Mobile security testing includes

 Checks for multi-user support without interfering with the data between them
 Checks for access to files stored in the app by any unintended users
 Decryption or Encryption method used for sensitive data communication
 Detect sensitive areas in tested application so that they do not receive any
malicious content

17) List out mobile App testing?

 Testing in all web browsers


 Browsers very significantly across the devices
 May support xHTML,HTML,WML,AJAX
 Difficulty in Benchmarking the performance due to highly fragmented Market
 Emulators do not capture all the attributes or characteristics of a device
 Implementation of the specification may not be consistent across vendors and
devices
 In some situation, transcoder may not respect user experience factors

18) Explain what is port testing?

This testing is done to test the same functionality on different devices with different
platforms. It is classified into two categories

 Device Testing
 Platform Testing

19) List out some iPhone and iPad testing tools?

 iPhone tester: Test your web interface in an i-phone sized frame


 Appium: It is a test automation tool used with native and hybrid ios application
 iPad Peek: Test your web application using an iPad interface
 Test Studio: It enables you to record, build and run automated tests for your
iPad and iPhone applications.

20) Explain how you can install SD card in emulator?

To install SD card in emulator, you have to use the command

MKsdcrd –I mySDCard 1024M mySdCardFile.img

1) Explain what is Appium?

Appium is a freely distributed open source mobile application UITesting framework.

2) 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 physical device as well as similar or emulator both
 It has no dependency on mobile device

3) List out the pre-requisite to use APPIUM?

Pre-requisite to use APPIUM is

 ANDROID SDK
 JDK
 TestNG
 Eclipse
 Selenium Server JAR
 Webdriver Language Binding Library
 APPIUM for Windows
 APK App Info On Google Play
 js

4) 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

5) 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.

6) 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 setup on our
machine that exposes a REST API
 It receives connection and command request from the client and execute 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.
Framework like
o Apple Instruments for iOS (Instruments are available only in Xcode 3.0
or later with OS X v10.5 and later)
o Google UIAutomator for Android API level 16 or higher
o Selendroid for Android API level 15 or less

7) What language does Appium support?

Appium support any language that support HTTP request like Java, JavaScript with
Node.js, Python, Ruby, PHP, Perl, etc.

8) Explain the pros and cons of Appium?

Pros:

 For programmer irrespective of the platform, he is automating ( Android or


iOS) all the complexities will remain under single Appium server
 It opens the door to cross-platform mobile testing which means the same test
would work on multiple platforms
 Appium does not require extra components in your App to make it automation
friendly
 It can automate Hybrid, Web and Native mobile applications

Cons:
 Running scripts on multiple iOS simulators at the same time is possible with
Appium
 It uses UIAutomator for Android Automation which supports only Android SDK
platform, API 16 or higher and to support the older API's they have used
another open source library called Selendroid

9) Explain what is APPIUM INSPECTOR?

Similar to Selenium IDE record and Playback tool, Appium has an "Inspector" to
record and playback. It records and plays native application behavior by inspecting
DOM and generates the test scripts in any desired language. However, Appium
Inspector does not support Windows and use UIAutomator viewer in its option.

10) Mention what are 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 to the Appium server over HTTP.
 Appium Session: You have to first initialize a session, as such Appium test
takes place in the session. Once the Automation is done for one session, it
can be ended and wait for another session
 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.

11) Mention what are the possible errors one might encounter using Appium?

The possible errors one might face in Appium includes

 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: openqa.selenium.SessionNotCreatedException: A new session could
not be created
 Error 4: How to find DOM element or XPath in a mobile application?

12) Do you need a server machine to run tests on Appium?


No, you don't need server machine to run tests on Appium. Appium facilitates a 2-
tier architecture where a test machine connects to a test server running Appium and
automating the whole thing. You can have Appium running on the same machine
where your test runs.

13) Is it possible to interact with my apps using Javascript while I am testing


with Appium?

Yes, it is possible to interact with App while using Javascript. When the commands
run on Appium, the server will send the script to your app wrapped into an
anonymous function to be executed.

14) Mention what are the most difficult scenarios to test with Appium?

The most difficult scenario to test with Appium is data exchange.

15) While using Appium can I run my tests in a multithreaded environment?

Yes, you can run the test in a multithreaded environment but you have to ensure
that no more than one test runs at the same time against the same Appium server.

16) In Android, do you need an app's .apk to automate using Appium or you
also need app in my workspace?

In Android, you only need .apk file to automate using Appium.

17) Explain what is Appium package master? How to create package?

Appium package master is a set of tools manage and create appium packages. For
example to create package you can use the code

# using es7/babe1

Gulp create-package –n <package-name>

#regular es5

Gulp create-package ---nobabe1 –n <package-name>

The package will be generated in the out/<package-name>

18) Explain how test frameworks are supported by Appium?

Appium does not support test framework as such there is no need to support them.
Appium can be used with any frameworks you want.
Q1) Explain Appium Vs Calabash?
Appium Vs Selenium
Features Appium Calabash
Python, javascript, ruby, java & all major
Language Support Only language Ruby is supported
languages
We need custom safari app for
iOS mobile web page Not well supported
automation
Custom ui commands & iOS
Hybrid iOS app Custom ui commands & iOS framework
uiautomator
Native iOS app Only the iOS uiautomator 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
Native android app Both android uiautometer & selendroid Android instrumentation - calabash android
Internal tools Android, iOS ui autometers & selendroid Android & iOS instrumentation framework

Q2) What are native Apps?Q: What is Appium?


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 which are on multiple platforms like Android and IOS.
They do this using the same API. This facility will enable you to do reuse of 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?


There are the mobile webs pages are those web apps that by are accessed with the mobile
browsers. In case of IOS platform, Appium supports Safari and for the android platform, Chrome or
any other built in browser is used.

Q4) What are hybrid apps?


Those apps that are equipped with wrapper around the web view is known as a 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?


The tests of Appium are written is any language and this is because appium is nothing but a HTTP
server. It is also important that the test should be interfaced with Appium and it use 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 frame works are .Net, C#, Java, Python, JavaScript and Ruby.
Q6) Which are the pre- requisites to use Appium?
The pre-requisites that are used in Appium. They are listed below.

1.EclipseIDE
2.AndroidSDK
3.TestNG
4.Webdriver 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 of Appium.
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 frame work 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 JSON wire protocol.
6. Appium do not require recompilation of App.
7. Appium also supports automation test 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 frame works that are supported by Appium.
Test frame works are not supported by appium since there is no need to do it. All test frame works
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?


The disadvantages of Appium are listed below:-
1. The testing of those android that are 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 Appium inspector on Microsoft windows.
Q10) What are the requirements to write Appium tests?
There are certain basic requirements when it comes to write 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 Appium over the HTTP.
2. Appium Session – Appium tests takes 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.
Just like a selenium IDE playback and record tool, Appium consist of an inspector that is used to
record and playback. With the help of this, you can record and play native application behaviour
which is achieved by inspecting DOM. It helps in generating the test scripts any language that is
preferred. But Appium Inspector is not a good support for Windows and they use UIAutomator
viewer in the option.

Q12) 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.

Q13) Explain the design of Appium?


Appium is considered as a 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 is completed the server is then setup on the machine which exposes a
REST API. Then the Appium also receives connections and command request from clients. These
commands are then executed on mobile devices. Generally appium respond backs with a HTTP
response. To execute the request, Appium uses mobile test automation frame works so that it can
drive the user interface of the apps. Some of the mobile automation frame works 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 case of a mobile application?
In order to find the path between DOM elements or X path elements you can make use of
"UIAutomateviewer" in case of Android application.

Q15) What are the pros and cons of Appium?


Pros-
Irrespective of the platform, programmer will be able to automate all the complexities which remain
under a single Appium server. Also Appium helps in providing a 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 UIAutomator in case of Android automation which only supports Android SDK
platform and those API which are 16 more than that. For using 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.
1. Error type one – These types of error occurs when there is the need of 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 error occurs when you cannot find adb. To avoid this type of
error can be avoided by setting Android Home environment variable with Android SDK root directory
path.
3. Errors type three – This falls under the category of
penqa.selenium.SessionNotCreatedException which will not allow you to create a new session.
Q17) Is there a need for a server machine to run tests on Appium?
In order to run tests on Appium there is no need of server machine. 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 java script while you are
testing the Appium?
While you are testing the Appium it is possible for you to interact with the apps using Java script.
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?
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?
It is indeed possible to run tests on multithreaded environment but you have to make sure that no
two tests are running simultaneously on the same Appium server.

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

Q22) What is an appium package master? How can you create an Appium Package?
A set of tools that is required to create and manage appium packages are defined as Appium
Package master. In order to create package use this 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?
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 Native Android App?
With the help of the UIAutomator tool that in 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?
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?


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?


With the help of using 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?


You can make use of User Agent in order to identify objects in 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?
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?


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.

Check Out Appium Tutorials


Q31) Do I need Appium?
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 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?


The assumption is that Appium comes with a 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?


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
platform 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!
World is not black and white!
Q34) What is Appium’s most considerable limitation?
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?
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 by 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?


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 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 on 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 which resets ADB after some time so that devices will not disconnect.
Q37) Tests on emulators or simulators?
On the other hand emulators/simulators will never disconnect from Appium. They also offer nice
options like the ability of choosing 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?
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 being 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?


Of course it depends by 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?
Here is one piece of advice. Since your tests will mostly consist in 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 in 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?
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 appium tesing
running?
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?
However your Javascript interaction can get more advanced as your script can return a value which
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?
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?


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?


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?


Selenium provides commands do 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 yourJSON 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?
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, than just throw Appium away).
Appium is very nice because it will let you write tests once for all platofrms 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?
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?
No 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 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), that will be hit everytime 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?
CORDOVA is a very famous system that enables you to develop webview-based apps for all
platforms in short time. Appium does not explicitely say that Cordova is supported, even though they
do it implicitely 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 acknowledgement 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?
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 textboxes.
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 webview. 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?
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?


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 testMOBILE 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?
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?
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.

1. Question 1. What Are The Advantages Of Using Appium?


Answer :
1. It allows you to write tests against multiple mobile platforms using
the same API.
2. You can write and run your tests using any language or test
framework.
3. It is an open-source tool that you can easily contribute to.
2. Question 2. What Is Appium's Strongest Point?
Answer :
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 ([csharp], [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.
3. Question 3. What Is The Appium Philosophy?
Answer :
R1. Test the same app you submit to the marketplace
R2. Write your tests in any language, using any framework
R3. Use a standard automation specification and API
R4. Build a large and thriving open-source community effort
4. Question 4. Why Do The Appium Clients Exist?
Answer :
We have the Appium clients for 3 reasons:
1) There wasn't time to go through a full commit and release cycle for
Selenium once we'd set a release date for 1.0
2) Some of the things that Appium does, and which its users really find
useful, are never going to be an official part of the new mobile spec. We
want a way to make these extensions available
3) There are some behaviors whose state is as yet unknown. They might
make it into the spec and get deleted from the clients, or they might be in
category #2
Ultimately, the only reason for the clients will be #2. And even that is
actually evidence that we are conforming to the WebDriver spec (by
implementing the extension strategy it recommends) rather than
departing from it. The Appium clients are the easiest and cleanest way to
use Appium.
5. Question 5. Explain What Is Appium?
Answer :
Appium is a freely distributed open source mobile application UI testing
framework.
6. Question 6. What Are Main Advantages Of Using Appium On Sauce
Labs?
Answer :
1. You save the time it takes to set up the Appium server locally.
2. You don't have to install/configure the mobile
emulators/simulators in your local environment.
3. You don't have to make any modifications to the source code of
your application.
4. You can start scaling your tests instantly.
7. Question 7. Which Language Should I Use To Write My Tests?
Answer :
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!
However, as you can imagine, there are already some libraries doing this
for the most common languages and development frameworks out there:
C#, [dotnet], [java], Ruby, [python] and Javascript are just few examples;
and they all are open source projects.
8. Question 8. What Type Of Tests Are Suitable For Appium?
Answer :
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!
9. Question 9. List Out The Appium Abilities?
Answer :
Appium abilities are:
1. Test Web
2. Provides cross-platform for Native and Hybrid mobile automation
3. Support JSON wire protocol
4. It does not require recompilation of App
5. Support automation test on physical device as well as similar or
emulator both
6. It has no dependency on mobile device.
10. Question 10. List Out The Pre-requisite To Use Appium?
Answer :
Pre-requisite to use APPIUM is:
1. ANDROID SDK
2. JDK
3. TestNG
4. Eclipse
5. Selenium Server JAR
6. Webdriver Language Binding Library
7. APPIUM for Windows
8. APK App Info On Google Play
9. Js
11. Question 11. What About Performance?
Answer :
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).
12. Question 12. What Platforms Are Supported?
Answer :
Appium currently supports Android and iOS, no support for Windows
unfortunately.
13. Question 13. Do I Need A Server Machine To Run Tests On
Appium?
Answer :
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.
14. Question 14. List Out The Limitations Of Using Appium?
Answer :
1. Appium does not support testing of Android Version lower than 4.2
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
3. No support to run Appium Inspector on Microsoft Windows.
15. Question 15. How Can I Test Android Tablets?
Answer :
The best way to test on different Android emulators screen sizes is by
using the different Android Emulator Skins . For instance, if you use our
Platforms Configurator you'll see the available skins for the different
Android versions (e.g Google Nexus 7 HD, LG Nexus 4, Samsung Galaxy
Nexus, Samsung Galaxy S3, etc). Some of these skins are tablets, for
example the Google Nexus 7C is a tablet which has a very large resolution
and very high density.
16. Question 16. How Can I Run Manual Tests For My Mobile
Native App Or Mobile Hybrid App?
Answer :
Sauce Labs doesn't support manual tests for mobile native app or mobile
hybrid app tests.
17. Question 17. What Type Of Keyboard And Buttons Do The
Android Emulators Have?
Answer :
Android Emulators have software buttons and a hardware keyboard. In a
regular Android emulator the device buttons are software buttons
displayed on the right size of the emulator. For the Android emulators with
different skins (e.g Google Nexus 7 HD, LG Nexus 4, Samsung Galaxy
Nexus, Samsung Galaxy S3, etc) the device buttons are also software
buttons that are overplayed on top of the skin. For instance, if you hover
the mouse around the edges of any of our Android emulators with an
specified skin, a hover icon will appear and you should be able to find
whatever buttons actually exist on the device that the skinned emulator is
trying to emulate (e.g power button along the top, volume buttons along
the edge, back/home buttons right below the screen, etc).
18. Question 18. Explain How To Find Dom Element Or Xpath In A
Mobile Application?
Answer :
To find the DOM element use “UIAutomateviewer” to find DOM element for
Android application.
19. Question 19. Explain The Design Concept Of Appium?
Answer :
1. 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
2. When Appium is downloaded and installed, then a server is setup
on our machine that exposes a REST API
3. It receives connection and command request from the client and
execute that command on mobile devices (Android / iOS)
4. 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. Framework like
5. Apple Instruments for iOS (Instruments are available only in Xcode
3.0 or later with OS X v10.5 and later)
6. Google UIAutomator for Android API level 16 or higher
7. Selendroid for Android API level 15 or less
20. Question 20. What Language Does Appium Support?
Answer :
Appium support any language that support HTTP request like Java,
JavaScript with Node.js, Python, Ruby, PHP, Perl, etc.
21. Question 21. Explain The Pros And Cons Of Appium?
Answer :
Pros:
1. For programmer irrespective of the platform, he is automating
( Android or iOS) all the complexities will remain under single
Appium server
2. It opens the door to cross-platform mobile testing which means
the same test would work on multiple platforms
3. Appium does not require extra components in your App to make it
automation friendly
4. It can automate Hybrid, Web and Native mobile applications
Cons:
5. Running scripts on multiple iOS simulators at the same time is
possible with Appium
6. It uses UIAutomator for Android Automation which supports only
Android SDK platform, API 16 or higher and to support the older
API’s they have used another open source library called
Selendroid.
22. Question 22. I Already Have Platform-specific Tests For My
App, What Should I Do To Migrate To Appium?
Answer :
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 being told, you will probably need to write your tests
from the beginning, what you can do is actually reusing your existing
components.
23. Question 23. How Much Time Does It Take To Write A Test In
Appium?
Answer :
Of course it depends by 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.
24. Question 24. Any Tips Or Tricks To Speed Up My Test Writing
Activity Or My Migration Process?
Answer :
Here is one piece of advice. Since your tests will mostly consist in
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 in 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).
25. Question 25. What Test Frameworks Are Supported By
Appium?
Answer :
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!
26. Question 26. Can I Interact With My Apps Using Javascript
While I Am Testing With Appium?
Answer :
Yes! 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; when the commands runs on Appium, the server will send the
script to your app wrapped into an anonymous function to be executed.
27. Question 27. Is It Returning The Values?
Answer :
How ever your Javascript interaction can get more advanced as your script
can return a value which 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.
28. Question 28. How Can I Exchange Data Between My Test And
The App I Am Testing?
Answer :
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.
29. Question 29. What Data Exchange Is?
Answer :
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.
30. Question 30. Is It Exchanging Data Through Javascript?
Answer :
Selenium provides commands do 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.
31. Question 31. 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?
Answer :
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.
32. Question 32. I Need To Debug Appium, Is It Difficult?
Answer :
No 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 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), that will be hit everytime commands are sent to
platform-specific components to be translated into automation commands.
33. Question 33. Explain What Is Appium Inspector?
Answer :
Similar to Selenium IDE record and Playback tool, Appium has an
“Inspector” to record and playback. It records and plays native application
behavior by inspecting DOM and generates the test scripts in any desired
language. However, Appium Inspector does not support Windows and use
UIAutomator viewer in its option.
34. Question 34. What Are The Basic Commands That I Can Use In
The Selenium Protocol?
Answer :
Google's Selenium provides a collection of commands to automate
your app. With those commands you can basically do the
following:
1. Locate web elements in your webview-based app's pages by using
their ids or class names.
2. Raise events on located elements like Click().
3. Type inside textboxes.
4. Get or set located element's attributes.
5. Execute some Javascript code.
6. Change the context in order to test the native part of your app, or
the webview. 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.
7. Detect alert boxes and dismiss or accept them.
35. Question 35. I Want To Run My Tests In A Multithreaded
Environment, Any Problems With That?
Answer :
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.
36. Question 36. Mention What Are The Basic Requirement For
Writing Appium Tests?
Answer :
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 to the Appium server over HTTP.
Appium Session: You have to first initialize a session, as such Appium
test takes place in the session. Once the Automation is done for one
session, it can be ended and wait for another session
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.
37. Question 37. How Can I Run Android Tests Without Appium?
Answer :
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").
38. Question 38. How Can I Run Ios Tests Without Appium?
Answer :
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.
39. Question 39. What Mobile Web Browsers Can I Automate In
The Android Emulator?
Answer :
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.

1. What is Appium Mobile Automation Tool?

Answer: Appium is a mobile automation tools. Mobile automation here refers


to the automation of mobile applications. Applications may be Native apps,
Mobile web apps or Hybrid apps. Appium is cross-platform and open source tool.

Cross-platform means we can write tests in appium in multiple platforms i.e.


android and ios using the same API. Thus, we can use the same code to run our
test suite on iOS or Android platforms. It’s one of the most useful advantage of
Appium tool

2. How Appium Setup is done on Android Devices?

Answer:

Using Appium on Android devices has some pre-requisites. You need to have
following in order to use appium for android:

JDK 7 or higher – Install JDK first on your system

Android SDK – Install Android SDK version 17 or higher on your system

Packages – Install any required package for you Android platform version in the
Android SDK Manager
AVD – Android Virtual Device is an emulator that is similar to the android device

Appium.exe/ Appium.app – Install Appium executable on your system which


provides a GUI based tool available for using appium. If you wish to use the
latest Appium, install Appium from Source and run it from the command line.

3. What are prerequisites of Appium.

Answer: The prerequisite of using Appium are based upon the environment,
browser and libraries. Following are the basic prerequisites for using Appium
that you should know about and should install on the required platforms.

Android Requirements

 Android SDK API >= 17 (Additional features require 18/19)


 Appium supports Android on OS X, Linux and Windows. Make sure you
follow the directions for setting up your environment properly for
testing on different OSes

iOS Requirements

 Mac OS X 10.7 or higher


 XCode >= 4.6.3
 Apple Developer Tools (iPhone simulator SDK, command line tools)

Firefox OS Requirements

 Firefox OS Simulator

4. What is Appium Inspector?

Answer:
Appium Inspector is a GUI tool similar to Selenium IDE. It enables the user to
check out the hierarchy of the mobile application. Appium Inspector is used for:

 To understand the element hierarchy


 To find the xpath, name and value of the objects
 To record the manual actions

5. Explain Appium architecture.

Answer:

At the heart of Appium lies a web server that exposes a REST API -receives
connections from a client, listens for commands, executes those commands on a
mobile device and responds with an HTTP response representing the result of
the command execution.

Since it’s a client server architecture, there are numerous possibilities of using
writing test code in our preferred language that consist of http client API. Thus,
you can use any of the option from the available Appium client libraries to write
your test code.

6. What are the advantages of Appium?

Answer:

Below are few of the main advantages of Appium Automation:

 Due to Json Wire Protocol usage, we can use any programming


language
 Testing of Native, Hybrid and Web Apps is possible using appium
 Appium supports multiple frameworks
 It’s an open source and cross-platform tool
 It’s compatible with CI tool like Jenkins as well
 Uses selenium API thus no need to learn from scratch
 Can be used with Emulators as well as real devices

7. What are limitations of Appium ?

Answer:

Below are few limitations or challenges of Appium:

 It takes lot of initial efforts for configuring appium both on Android and
iOS platforms
 Image comparison is not possible using Appium
 Unexpected errors are observed quite often which sometimes takes
time for resolution
 Android API level < 17 is not supported by Appium (Selendroid needs to
be used otherwise)
 Execution of scripts is slow on iOS platform
 Limited gesture support is available in Appium

8. Should we test apps on real devices or on simulators, which is more


preferable?

Answer: It’s preferable always to test the applications on real devices.


However, due to the increasing number of devices, it’s quite difficult to test the
applications on every new device, thus it’s much better to use emulators in such
cases. Emulators configuration is easy and quick.

Hence, if the device is available it’s better to use the device only otherwise go
for Emulator.

9. What are the languages supported by Appium?

Answer:
 Objective C
 Javascript with Node.js
 PHP
 Python
 Ruby
 C#
 Clojure
 Perl

10. How do we identify elements of any mobile app using Appium.

Answer: You can use Appium Inspector which is a GUI based tool similar to
Selenium IDE. It shows the hierarchy of the mobile application elements that is
being automated. So you can get all the properties for each element using the
inspector.

11. Can we use Javascript in Appium to perform app automation?

Answer:

Yes, we can use JavaScript to automate applications using Appium. Any


language that supports HTTP request can be used with Appium. The reason
behind this is simple, Appium is an Http server thus it accepts http request in
the form of Http sessions for execution of Appium commands.

Other languages like Java, Ruby, PHP, Python, Perl, Node.js are other examples
of the languages which support Http request.

12. What type of Mobile apps can be automated using Appium.

Answer: You can automate Native, Web and Hybrid mobile applications using
Appium
13. Can we perform Parallel tests using Appium.

Answer:

We can set multiple Android sessions on a single machine using Appium. All you
have to do is to start multiple Appium servers with different flags. There are
number of important flags for automating multiple android session on the
system:

-p : the main Appium port

-U : the device id

-bp : the appium bootstrap port

–chromedriver-port : the chromedriver port (if you are using webviews or


chrome)

–selendroid-port: the selendroid port (if you are using selendroid)

For automating 2 devices with IDs 12345 and 54321, you need to use the below
commands to achieve parallel testing.

node -p 4492 -bp 2251 -U 54321

node -p 4491 -bp 2252 -U 12345

As long as your Appium and Appium bootstrap ports lie in the range of 0 to
65536, the only requirement is that these port should be different so that the
appium servers listen to different ports. You need to make sure that you use -u
flag with the correct device id. Appium can connect to unique device in this way
only.
For chromedriver or selendroid, you need to set different port for each server.

# In order to perform parallel testing on iOS device, you have to use Sauce since
appium doesn’t have a direct support for parallel testing on iOS devices.

14. What are Appium.app and Appium.exe

Answer:

Appium supports desktop apps on OS X and Windows using Appium.app and


Appium.exe. There are ready to run versions of Appium. There is no need to run
the source code if we use these executable files directly on the system.

These executables are primarily GUI wrappers around the Appium server. These
files contains everything that is required to run the Appium server including the
Appium Inspector. Thus there is no need to go into the technicality of Node.

15. What is fruitstrap. What is its use?

Answer:

Fruitstrap is a third-party tool to deploy the application build on a real iOS


devices. For automation, Appium installs the testing application on the iOS
device using Fruitstrap.

16. Can mobile gestures be automated using Appium?

Answer: Yes, Mobile gestures can be automated using Appium. Using


TouchActions api, mobile gestures can be automated. TouchActions is similar to
Actions class in Selenium. In addition, JSON wire protocol extensions are also
enabled in TouchActions.

Gestures like tap, flick, swipe, scroll, shake can be automated using appium.
17. What is the default port number used for Appium Server?

Answer:

Default port number used for Appium Server is 4723. You need to mention the
same while writing desired capabilities in the initial lines of code.

18. What is Appium Philosophy?

Answer:

Appium was designed to meet mobile automation needs according to a


philosophy outlined by the following four tenets:

1. You shouldn’t have to recompile your app or modify it in any way in


order to automate it.
2. You shouldn’t be locked into a specific language or framework to write
and run your tests.
3. A mobile automation framework shouldn’t reinvent the wheel when it
comes to automation APIs.
4. A mobile automation framework should be open source, in spirit and
practice as well as in name!

19. Name the Appium Client Libraries.

Answer:

Java, Ruby, Python, PHP, Javascript(Node.js) and C# are the appium client
libraries used for extension to the WebDriver protocol. You can use these
libraries in order to use your favorite language for automating your mobile
application.

20. What are Appium Desired Capabilities and what are they used for?
Answer:

Desired capabilities are nothing but a kind of SET data structure as we use in
Java. It may be a Map or Hash. Basically, these are used to send sets of keys
and values to the Appium server to let it know what kind of automation session
we want to start up.

Also the desired capabilities can be used to modify the server behavior while
automation is running.

Few of the commonly used desired capabilities are:

 platformName: To notify the appium server the platform we will be


using for automation (e.g. values you can use are android/ios etc)
 autoLaunch: To notify Appium server whether to automatically install
and launch the application or not.
 browserName: To notify the name of mobile web browser to be used
for automation. If you are not using any app, keep the value as empty
string.
 safariAllowPopups: To allow use of Javascript popups while using
Safari automation session.

There are number of desired capabilities that can be used for android and iOS
platforms. Refer this link to know them all: http://appium.io/slate/en/v1.0.0/?
ruby#appium-server-capabilities

21. What is the limitation of running Appium on Linux.

Answer:

You can’t install .app executable on Linux machine. It means that you won’t be
able to test iOS applications using Appium on a Linux machine.
22. What are advantages of using Appium on Sauce Labs.

Answer:

1. You save the time it takes to setup the Appium server locally.
2. You don’t have to install/configure the mobile emulators/simulators in
your local environment.
3. You don’t have to make any modifications to the source code of your
application.
4. You can start scaling your tests instantly.

23. How can we use Appium from Command line.

Answer:

http://testdroid.com/news/appium-tip-7-mastering-appium-through-the-
command-line

Follow the below steps in order to run Appium from Command line:

1. Download and compile the source code of Appium from this link first
– https://github.com/appium/appium
2. Once compiled you need to build it, Appium comes with a script to
handle the build process. It can be little tedious to build if you are
building for the first time. Check how to do enviroment setup for
Appium first in case you face any problem while building the compiled
source code.
3. Run appium-doctor.js from bin folder to check if your machine is ready
for the automation.
4. Use this command to support all the usual automation needs for both
Android and iOS: $ ./reset.sh –android –selendroid –ios –real-safari –
verbose
5. Once the Appium Server built is complete, now you need to connect
your device and accept all the Trust related dialogs which come. Make
sure Developer and USB debugging options are enabled (in case of
android). For iOS devices, you need to enable UI Automator in the
Developer option as long as the device is visible in XCode devices
window (cmd + shift + 2 on mac). Also open up Instruments from
Xcode and select your device as the active one.
6. Use Appium.js to run the sever.You can connect multiple android
devices but only one iOS device at a time.
7. Your appium server should be running now. You just need to point to
this server from your tests in order to perform execution.If the server is
running in your local host and in the default port following is the
address which your webdriver should be pointed
towards: http://localhost:4723/wd/hub

24. How to debug appium tests?

Answer:

Debugging Appium tests is not a very difficult task. Its a Node.js application.
Thus, in its core it has javascript. The free source code can be downloaded from
the Github. Debugging deeper is required sometimes if the issue is complex.
One way to go for easy debugging is to set breakpoint at key points. For e.g.
setting a breakpoint for the “proxy” component. In the source code, refer from
the file from the path “appium/lib/server/proxy.js” set a breakpoint for the
function doProxy(req,res). This will enable the compiler to hit at this breakpoint
every time the commands are sent to platform-specific components. The are the
commands which gets converted into automation commands.

25. Can we do data exchange using Appium?

Answer: This is one of the weakest point of Appium. The data exchange part is
quite a complex task to perform using Appium. Simple data exchange is possible
easily using the available Appium and Selenium APIs like writing data in the
fields etc. However for complex data exchange such as fetching the state of
application or data exchange by complex objects in the web-view of
applications, Appium is not much useful for such cases and it’s a better
approach to go for manually writing the test cases specific to every platform.

26. Mention the possible errors you might encounter while using
Appium.

Answer:

Below are few error examples which are usually observed in Appium.

 Failed to start Appium session, Instruments did not launch successfully


 Android hybrid mobile app: Getting Unhandled error: Error: getaddrinfo
ENOENT in appium, wherein a session could not be created #6610
 Appium v1.3.0-beta1 & xCode 6.1, Failed looking up pid of launched
process
 Clicking on Inspector icon nothing is happening
 error: Failed to start an Appium session, err was: Error: Could not find
zipalign in tools, platform-tools, or supported build-tools under
“/Applications/AndroidStudio.app/sdk”; do you have android SDK or
build-tools installed into this location? Supported build tools are: 17.0.0,
18.0.1, 19.0.0, 19.0.1, android-4.2.2, android-4.3, android-4.4

You might face similar errors even more while using Appium. An automation
enginner is always expected to solve such issues. In order to resolve the issues,
google such issues first or try to do some changes in your code and do trial and
error or look for some configuration changes which might resolve the issues.

27. Explain Appium Philosophy. In other words, what are the main
principles on which Appium mobile automation is based upon.
Answer: Appium was basically built up for mobile automation. To meet the
requirements of mobile automation, four principles were followed upon. These
principles are called nothing but Appium Philosophy. These are:

1. For automating your mobile application, you should not be required to


recompile or modify it in any form.

It means you should be able to automate the mobile application in the same
state in

which it is built up originally without doing any changes or modifications in it.

2. There should not be any binding of any specific language usage or


usage of any

specific framework in order to automate your mobile application using Appium.

3. No need of any new APIs for Appium. There should not be any need
to create new

Set of APIs for Appium. It should be possible to use any existing API set to
automate

mobile applications (Thus the use of Selenium Webdriver APIs in Appium


happened)

4. The concept of Open Source should be in existence for the mobile


automation

Framework built. There should be no bindings on the framework usage and its

code should open source so that anyone can use it.

28. Is it difficult to do Appium Setup?


Answer:

The real answer to this question is Yes. Initially you may find setting up the
Appium environment quite tedious. However, once understood, you will find it
quite easy to setup appium as per your needs.

Setup differs with the operation system like Android and iOS and there are
several things to be taken care of while configuring appium such as using proper
values in desired capabilities, providing proper device ids etc.

29. Does Appium requires a Server Machine to be used?

Answer:

No, Appium doesn’t require any server machine in order to perform automation.
It’s a client based architecture wherein both the test client and the test server
can be setup on a single system thereby avoiding the need of any kind of
remote machine acting as a server.

30. Mention one of the critical thing to automate using appium?

Answer:

Data exchange is one of the critical area for Appium since Appium is not
designed in a way to exchange complex data. Sending data in the app is
possible using Appium but exchange of data between complex objects of
webview of the application is quite a critical thing to do using Appium.

You might also like