Frequently Asked Appium Interview Questions Part – 2
Do I Need A Server Machine To Run Tests On Appium?
No! Appium promotes a 2-tier architecture where a test machine connects to a test server running Appium and automating the whole thing. However this configuration is not mandatory, you can have Appium running on the same machine where your test runs. Instead of connecting to a remote host, your test will connect to Appium using the loopback address.
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.
How Can I Test Android Tablets?
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.
How Can I Run Manual Tests For My Mobile Native App Or Mobile Hybrid App?
Sauce Labs doesn’t support manual tests for mobile native app or mobile hybrid app tests.
What Type Of Keyboard And Buttons Do The Android Emulators Have?
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).
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.
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
Apple Instruments for iOS (Instruments are available only in Xcode 3.0 or later with OS X v10.5 and later)
Google UIAutomator for Android API level 16 or higher
Selendroid for Android API level 15 or less
What Language Does Appium Support?
Appium support any language that support HTTP request like Java, JavaScript with Node.js, Python, Ruby, PHP, Perl, etc.
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.
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.
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.
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).
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!