Appium Interview Questions & Answers

4 avg. rating (80% score) - 1 votes

Appium Interview Questions & Answers

Searching for Appium jobs? Need interview questions to prepare well for the job interview. Then you are at the right place. We have provided a detailed and tricky Appium Interview Questions and Answers in our page. Introduction to Appium. Appium is an open-source tool for automating native, mobile web, and hybrid applications on iOS mobile, Android mobile, and Windows desktop platforms. There are many leading companies that offer jobs in various positions of Appium few of them are Senior Software engineer, test engineer, Quality Analyst, Mobile automation along with these roles there are many other roles for freshers and experienced candidates. Looking for a job can be stressful and tiring, especially if you don’t know how to apply and where to search and how prepare well for the job interviews. So, to clear all your confusions visit our site wisdomjobs.com.

Appium Interview Questions

Appium Interview Questions
    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 :

      • You save the time it takes to set up the Appium server locally.
      • You don't have to install/configure the mobile emulators/simulators in your local environment.
      • You don't have to make any modifications to the source code of your application.
      • 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:

      • 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.

    10. Question 10. List Out The Pre-requisite To Use Appium?

      Answer :

      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

    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 :

      • 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.

    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 :

      • 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

    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:

      • 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.

    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:

      • 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.

    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.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Mobile Testing Tutorial