More about Appium Architecture.
How to Set up Appium in Windows.
1) What is Appium?
• Appium is an open-source tool for automating Native, Mobile Web, and Hybrid applications on iOS and Android platforms. More
• Appium is “cross-platform”: it allows us to write tests for multiple platforms (iOS, Android), using the same API. This enables code reuse between iOS and Android test suites.
• Appium was launched in 2012.
2) What are Native Apps?
Native apps are those written using the iOS or Android SDKs.
3) What are Mobile Web Apps?
Mobile web apps are web apps accessed using a mobile browser.
Note: Appium supports Safari on iOS and Chrome or the built-in ‘Browser’ app on Android.
4) What are Hybrid Apps?
Hybrid apps have a wrapper around a “webview” — a native control that enables interaction with web content.
5) Which language is used to write tests in Appium?
• We can write our 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!
6) What are the pre-requisite to use APPIUM?
Pre-requisite to use APPIUM is
• ANDROID SDK
• Eclipse IDE
• Selenium Server JAR
• Webdriver Language Binding Library
• APPIUM for Windows
• APK App Info On Google Play
7) What are the Advantages of Appium?
• Appium allows us to write tests for multiple mobile platforms using the same API.
• We can write and run our tests using any language or test framework.
• It is an open-source tool that we can easily contribute to.
• Provides cross-platform for Native and Hybrid mobile automation.
• Support JSON wire protocol.
• It does not require recompilation of App.
• Support automation test on the physical device as well as similar or emulator both.
• It has no dependency on the mobile device.
8) What are the limitations of 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.
9) What test frameworks are supported by Appium?
• Appium does not support test frameworks because there is no need to support them.
• We can use Appium with all test frameworks we want.
• NUnit and .NET Unit Test Framework are just a few examples.
• We will write our tests using one of the drivers for Appium; thus our tests will interface with Appium just in terms of an external dependency.
10) What are the basic requirements to write Appium tests?
To write Appium tests we 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) 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.
12) How can we exchange data between our test and the App we are testing?
• Appium, actually the WebDriver specification, is not made for exchanging data with our app.
• Actually it is not impossible to exchange data with our app, however, it will require us to build more layers of testability.
13) Explain the design of Appium?
• Appium is an “HTTP Server” written using the Node.js platform and drives iOS and the Android session using Webdriver JSON wire protocol.
• When Appium is downloaded and installed, then a server is set up on our machine that exposes a REST API.
• Appium receives connection and command request from the client and executes that command on mobile devices (Android / iOS).
• Appium responds back to HTTP responses. Again, to execute this request, it uses the mobile test automation frameworks to drive the user interface of the apps.