Appium has garnered a lot of traction in the mobile app testing industry. As a result, Appium professionals are in high demand. The purpose of this blog is to familiarise you with the often asked Appium interview questions that you might encounter during a job interview!
If you're looking for Appium Interview Questions for Experienced or Freshers, you are in right place. There are a lot of opportunities from many reputed companies in the world. According to research, Appium has a market share of about 8%. So, You still have the opportunity to move ahead in your career in Appium Engineering. Mindmajix offers Advanced Appium Interview Questions 2024 that helps you in cracking your interview & acquire a dream career as Appium Engineer.
Ans:
Features | Appium | Calabash |
Language Support | Python, javascript, ruby, java & all major languages | Only language Ruby is supported |
iOS mobile web page | We need a custom safari app for automation | Not well supported |
Hybrid iOS app | Custom UI commands & iOS UI Automator | Custom UI commands & iOS framework |
Native iOS app | Only the iOS UI Automator | iOS instrumentation - calabash iOS |
Android Mobile web app | Only automates chrome browser | Not well supported |
Hybrid Android app | Only the selendroid app | Android instrumentation - calabash android |
Native Android app | Both android UI Autometer & selendroid | Android instrumentation - calabash android |
Internal tools | Android, iOS UI Autometer & selendroid | Android & iOS instrumentation framework |
Ans: An open-source tool that is required for mobile web, automating Native and hybrid application on Android and IOS platform is known as Appium which was in 2012. Appium is considered to be a cross-platform that will low you to write tests that are on multiple platforms like Android and IOS. They do this using the same API. This facility will enable you to do reuse codes between Android and IOS test sites.
Those Apps are written by using Android SDKs and IOS are known as Native Apps.
Want to become a certified Appium? then Enrol here to get Appium Online Training & Certification Course from Mindmajix |
Ans: There are mobile web pages that are those web apps that are accessed with mobile browsers. In the case of the IOS platform, Appium supports Safari and for the Android platform, Chrome or any other built-in browser is used.
Ans: Those apps that are equipped with a wrapper around the web view are known as Hybrid app. This is native control that will facilitate the interaction with the web content.
Ans:
Ans: The pre-requisites that are used in Appium. They are listed below.
Related Article: Difference b/w Appium Vs Selenium Vs Calabash |
Ans: The advantages of Appium are listed below:
Ans: Test frameworks are not supported by appium since there is no need to do it. All test frameworks can be used by Appium. Some examples are the .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.
Ans: The disadvantages of Appium are listed below:
There are certain basic requirements when it comes to writing Appium tests and they are:-
Ans: Just like a selenium IDE playback and record tool, Appium consists of an inspector that is used to record and playback. With the help of this, you can record and play native application behavior which is achieved by inspecting DOM. It helps in generating the test scripts in any language that is preferred. But Appium Inspector is not good support Windows and they use UIAutomator viewer in the option.
Ans: In Appium the Web driver specification is not made for the purpose of exchanging data with the app. But it is not totally impossible to exchange data. It is achievable and it will require you to build more layers of testability.
Ans: Appium is considered as an HTTP server that is written using the Node.js platform. It runs on both android and IOS sessions with the help of web driver JSON wire protocol. After the download and installation of the Appium are completed the server is then set up on the machine which exposes a REST API.
Then the Appium also receives connections and command requests from clients. These commands are then executed on mobile devices. Generally, appium respond backs with an HTTP response. To execute the request, Appium uses mobile test automation frameworks so that it can drive the user interface of the apps. Some of the mobile automation frameworks are
Ans: In order to find the path between DOM elements or X path elements, you can make use of "UIAutomateviewer" in the case of the Android application.
Ans:
Pros-
Irrespective of the platform, the programmer will be able to automate all the complexities which remain under a single Appium server. Also, Appium helps in providing cross-platform mobile testing which signifies that the same test pattern will work on multiple platforms.
With the help of Appium, there will be no need for extra components in the app to make it more users friendly. Appium can also automate hybrid, web, and native mobile applications.
Cons -
It is not possible to run scripts on multiple IOS simulators simultaneously. With the help of Appium, you are able to use UI Automator in the case of Android automation which only supports the Android SDK platform and those API which is 16 more than that. For using an older version of APIs you will have to use another open-source library which is known as Selendroid.
Ans:
Ans: In order to run tests on Appium, there is no need for a server machine. The 2-tier architecture is facilitated with Appium. It is in this 2-tier architecture that the test machine gets connected to a test server that is running on Appium and also automating the whole thing. Appium can be run on the same machine where you are running the tests.
Ans: While you are testing the Appium it is possible for you to interact with the apps using Javascript. During the time when the commands are being run on Appium, the server will then send the script to the app that is wrapped in an anonymous function that is to be executed.
Ans: Data exchange is the most difficult scenario that one might face while testing Appium.
Ans: It is indeed possible to run tests on the multithreaded environment but you have to make sure that no two tests are running simultaneously on the same Appium server.
Ans: In the case of the android platform, to automate using Appium you will require only a .apk file.
Ans: A set of tools that are required to create and manage appium packages are defined as Appium Package master. In order to create a package using the following code:-
#using es7/babe1 Gulp create-package –n #regular es5 Gulp create-package ---nobabe1 –n The package will be created in the out/
Ans: The underlying selenium API is followed by Appium so that it can automate test cases. It is said that since all the selenium APIs are present in Appium as well so Appium is an extension to the selenium.
Ans: With the help of the UI Automator tool that is present in Android SDK, you will be able to access those object locators that are part of the Android Native app.
Ans: With the help of the scrollTo () method, you will be able to scroll down in App. Also, such a method will help you to automatically scroll until the specific text is not match.
Ans: It is possible to start an appium server programmatically. Generally, the commands that are being entered to the command prompt are written in note pad and it is saved with .bat extension and you can click the bat file.
Ans: With the help of using an Appium inspector that is a GUI-based tool, you can identify elements on IOS apps. These GUI-based tools are quite similar to that of selenium IDE.
Ans: ou can make use of User-Agent in order to identify objects in the Mobile browser. It is done by using the user agent and then changing the browser as the mobile proxy and thus gets an object.
Ans: With the help of the command driver. find element (By.className) it is possible to identify the elements uniquely.
Ans: The simulator is used for calling IOS virtual devices that will launch from Xcode in MAC. The emulator is used for calling Android virtual devices.
Ans: The answer to such a question is always: “It depends on what you need!”. So the actual question becomes: “Which conditions make Appium suitable for me?”. The most important assumption is that you are developing apps (pretty obvious I know).
If you are developing an app for a specific platform (and have no intention of supporting others in the future), Appium is not really required and this is basically the answer you are looking for. Appium becomes meaningful only when you have apps targeting more than one platform (Windows, Android, or iOS to cite some). Appium becomes essential if you have a web view-based app (necessarily) targeting many platforms out there.
Ans: The assumption is that Appium comes with not-so-tiny documentation, so users are not really left alone. However, it is not so straightforward to set up Appium to work on a Windows or Mac machine (did not try on Unix so far).
In my experience, instead of installing the GUI-based application, it is much better to install the command-line application (which is released more often). Also beware [sudo], as Appium will surely bite you back late in time if you installed it as a [superuser] (this is probably the clearest point in the documentation)
Ans: This is an implied question in this question. The answer is No (in general). As I said before Appium is not suitable for all types of tests you might want to write (this depends on the functionalities you need to cover). There are some scenarios that can be difficult to test and some of them are so platformed specific that you will need to write some suites just for Android or iOS for example.
Remember that you can always get to do something no matter how hard it is, so you can test all your difficult scenarios using Appium, but always keep in mind one question: is it worth the time and the pain? Having Appium testing some scenarios leaving a few tests to other approaches is fine too! The world is not black and white!
Ans: Hand down my chin starting to think 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.
Ans: Appium is available on GITHUB and there you can find all you need. The Appium team is responsible for developing many different subsystems revolving around Appium (like APIs for different languages), thus I can tell you that this product is alive and very active.
The team is also pretty well responsive and once you open an issue you will find a reply after no more than 36 hours (this ETA comes from my personal experience). The community around Appium is also pretty large and growing every month.
Ans: This is a tough question because both options offer different levels of testability and flexibility when testing. There are also many problems associated with each. So my answer will be again: “It depends on your needs!”.
Running the test on a device is, always in my opinion, the best solution because it offers a testing environment completely aligned with the running environment: tests run on those devices where your apps will be used once published in stores. However devices must be connected to the Appium server via USB at least, and this is not always a very nice thing.
ADB has a known issue for which a device disconnects after a while (even though it remained plugged all the time): because of this your tests might fail after a while and Appium will report that a device could not be found! I had to write a component that resets ADB after some time so that devices will not disconnect.
Ans: On the other hand, emulators/simulators will never disconnect from Appium. They also offer nice options like the ability to choose the orientation or other hardware-related configurations.
However, your tests will run much slower (sadly, my tests ran 3 times slower), and do expect some crazy behavior from the Android emulator which sometimes shuts down unexpectedly. Another problem is that emulators tend to allocate a lot of memory.
Ans: Unfortunately, there is not a magic formula to translate your tests into Selenium tests. If you developed a test framework on different layers and observed good programming principles, you should be able to act on some components in your tests in order to migrate your suites to Appium.
Your current tests are going to be easy to migrate if they are already using an automation framework or something close to a command-based interaction. Truth be told, you will probably need to write your tests from the beginning, what you can do is actually reusing your existing components.
Ans: Of course, it depends on the test. If your test simply runs a scenario, it will take as many commands as the number of interactions needed to be performed (thus very few lines). If you are trying to exchange data, then your test will take more time for sure and the test will also become difficult to read.
Ans: Here is one piece of advice. Since your tests will mostly consist of automation tasks (if this condition is not met, you might want to reconsider using Appium), make interactions reusable! Do not write the same sub-scenarios twice in your tests, make a diagram of what your scenarios are and split them into sub-activities; you will get a graph where some nodes are reachable from more than one node.
So make those tasks parametric and call them in your tests! This will make your test writing experience better even when you need to migrate from existing tests (hopefully you already did this activity for your existing suites).
Ans: Appium does not support test frameworks because there is no need to support them! You can use Appium with all the 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!
Ans: Yeah, It is possible! Selenium has commands to execute Javascript instructions on your app from your tests. Basically, you can send a JS script from your test to your app; while the running commands on Appium, the server sends the scripting to the apps you used by wrapping it into an anonymous function that has to be executed.
Ans: However, your Javascript interaction can get more advanced as your script can return a value that will be delivered to your test when the HTTP response is sent back by Appium once your Javascript has finished running.
However this scenario comes with a limitation: your Javascript can send back only primitive types (integers, strings), not complex objects. The limitation can be overtaken by passing objects as JSON strings or by modifying Appium’s or Selenium’s code to support specific objects.
Ans: Appium, actually the WebDriver specification, is not made for exchanging data with your app, it is made to automate it. For this reason, you will probably be surprised in finding data exchange is 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.
Ans: When I say “data exchange” I am not referring to scenarios like getting or setting the value of a textbox. I am also not referring to getting or setting the value of an element’s attribute. All these things are easy to achieve in Appium as Selenium provides commands just for those. By “data exchange” I mean exchanging information hosted by complex objects stored in different parts of your review-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.
Ans: In order to make things better, as a developer, what you can do is adding testability layers to your app. The logic behind this approach is simply having some test-related objects in your app which are activated only when your tests run. I learned about this strategy from one of my colleagues Lukasz and such a technique can be really powerful. Enable your testability layers when testing in order to make data exchange easy.
Ans: Selenium provides commands to execute Javascript on the app, it is also possible to execute functions and have them return data (only basic types). If you exchange JSON strings it should be fine as JSON.stringify(str) will turn your JSON string into an object on the app side, while on the test side (depending on the language you are using), you can rely on hundreds of libraries to parse the string you receive.
Ans: Appium is not suitable for all types of tests. There is a particular scenario that will make your tests more difficult to write: data exchange. I already said it but I will repeat the same thing because it is very important: Appium and WebDriver are designed to automate stuff… not to exchange data with them. So what if we need to exchange information with our app during tests?
Should we give up on Appium and write our tests manually for each platform? I am not saying this, but there are cases where you should consider this option (not nice I know, but if the effort of writing tests for Appium is higher than the benefits, then just throw Appium away).
Appium is very nice because it will let you write tests once for all platforms instead of writing as many tests as the number 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.
Ans: If you think about it, what really is required from you is writing tests. Then the fact that you must deploy an Appium server somewhere is something more. If you want to skip this part, you can rely on some web services that already deployed a whole architecture of Appium servers for your tests. Most of them are online labs and they support Selenium and Appium.
Ans: Not really! Appium is a NODE.JS application, so it is Javascript in the essence. The code is available on GITHUB and can be downloaded in a few seconds as it is small and not so complex. Depending on what you have to debug, you will probably need to go deeper in your debugging experience, however, there are some key points were setting a breakpoint is always worth:
the proxy component is worth a mention. In appium/lib/server/proxy.js you can set a breakpoint in function doProxy(req, res), which will be hit every time commands are sent to platform-specific components to be translated into automation commands.
Ans:
Ans:
Google’s SELENIUM provides a collection of commands to automate your app. With those commands you can basically do the following:
Ans: Yes! You need some special care when using Appium in a multithreaded environment. The problem does not really rely on the fact of using threads in your tests:
you can use them but you must ensure that no more than one test runs at the same time against the same Appium server. As I mentioned, Appium does not support multiple sessions, and unless you implemented an additional layer on top of it to handle this case, some tests might fail.
Ans:
Ans:
Ans: Currently, the only browser that can be automated in our Android emulators is the stock browser (i.e Browser). The Android stock browser is an Android flavor of ‘chromium’ which presumably implies that its behavior is closer to that of Google Chrome.
Explore Appium Sample Resumes! Download & Edit, Get Noticed by Top Employers!