APPIUM ARCHITECTURE :
Appium is an HTTP server which is being written in node.js. It starts a “test case” on the device that gives rise to a server and listens for proxied commands from the main Appium server. The tester writes the Test scripts to perform on device or Emulator. Various webdriver sessions for several platforms such as Android and IOS are created and handled by the Appium.
Test Scripts written by the tester performs on the Emulator or device by sending them as requests to the Appium server. Each vendor, like IOS or Android, has a distinct method and mechanism to perform test cases on the device. Thus, the test case performs after listening commands from the Appium server. Appium uses JSON wire protocols to send command requests to Appium server.
HOW APPIUM WORK?
• When the Appium is installed, a server is also installed with it on our machine that exposes the REST API.
• It receives connection requests and commands from the client and performs that command on devices like Android or iOS.
• It replies with the HTTP responses.
• To perform requests, it uses a mobile test automation framework to run the user interface of the app. For Example –
(a) Apple instruments used for iOS.
(b) Selendroid used for Android API 15 or less.
(c) UIAutomator used for Android API 16 or higher.
NOTE : Remember that Appium uses another open-source library Selendroid to support older APIs as UIAutomator only supports API 16 or higher.
APPIUM IN IOS :
APPIUM IN ANDROID :
On Android, Appium proxies the command to a UIAutomator script running on the device. UIAutomator is a native UI automation framework of Android that allows you to run Junit test cases directly into the device using command line. Although it uses Java programming language, but Appium allows to run it from any WebDriver supported language. Android uses bootstrap.jar, which works as a TCP server. It is used to send the test commands to perform the actions on Android device using UIAutomator.
TYPES OF MOBILE APPLICATIONS :
(1) NATIVE APPLICATIONS : These are software programs that are developed by keeping a certain platform in mind. These applications are developed using a specific software development kit. Native apps are developed for use on a specific device and can be installed from the App Store, such as Google Play Store or Apple’s App Store. They can work offline and can also use the device notification system. Some native application examples are – Pinterest, Skype, Snapchat, etc.
PREREQUISITES TO USE APPIUM :
• Install Java (JDK).
• Install Android Studio.
• Install additional Android SDK tools
Install Appium jar file.
• js (Not required – It by default comes with “node.js” and “NPM”, whenever the Appium server is installed. Therefore, it is not required to install node.js and NPM separately. It is already included in current version of Appium.)
• Install Appium Desktop Client.
• Install Eclipse IDE for Java.
* Checkout our previous "APPIUM TESTING (1)" blog to learn more about Appium Testing.