Compatibility Testing: Through Black Box Technique
Compatibility Testing: Through Black Box Technique
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
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
For mobile testing, two kinds of automation tools are available to test mobile
Applications.
Usability Testing
Compatibility Testing
Interface testing
Services testing
Low-level resource testing
Performance Testing
Operational testing
Installation tests
Security Testing
The standard Android testing strategy must include the following test
Unit Test
Integration Test
Operation Test
System Test
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.
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
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
Manual Testing
Automate Testing
Subscription model
High Costing
Lock-in
Internet connectivity issues
Automation is image based and time-consuming
Automation cannot be used outside the framework
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
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
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
ANDROID SDK
JDK
TestNG
Eclipse
Selenium Server JAR
Webdriver Language Binding Library
APPIUM for Windows
APK App Info On Google Play
js
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
To find the DOM element use "UIAutomateviewer" to find DOM element for Android
application.
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
Appium support any language that support HTTP request like Java, JavaScript with
Node.js, Python, Ruby, PHP, Perl, etc.
Pros:
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
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?
11) Mention what are the possible errors one might encounter using Appium?
Error 1: The following desired capabilities are needed but not provided:
Device Name, platformName
Error 2: Could not find adb. Please set the ANDROID_HOME environment
variable with the Android SDK root directory path
Error 3: openqa.selenium.SessionNotCreatedException: A new session could
not be created
Error 4: How to find DOM element or XPath in a mobile application?
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?
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?
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
#regular es5
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
Those Apps are written by using Android SDKs and IOS are known as Native Apps.
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.
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.
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.
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.
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.
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.
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.
Answer:
Using Appium on Android devices has some pre-requisites. You need to have
following in order to use appium for android:
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
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
iOS Requirements
Firefox OS Requirements
Firefox OS Simulator
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:
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.
Answer:
Answer:
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
Hence, if the device is available it’s better to use the device only otherwise go
for Emulator.
Answer:
Objective C
Javascript with Node.js
PHP
Python
Ruby
C#
Clojure
Perl
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.
Answer:
Other languages like Java, Ruby, PHP, Python, Perl, Node.js are other examples
of the languages which support Http request.
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:
-U : the device id
For automating 2 devices with IDs 12345 and 54321, you need to use the below
commands to achieve parallel testing.
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.
Answer:
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.
Answer:
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.
Answer:
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.
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
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.
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
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.
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.
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:
It means you should be able to automate the mobile application in the same
state in
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
Framework built. There should be no bindings on the framework usage and its
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.
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.
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.