Appium Testing Tutorial: Concepts & Framework
Appium is one such open-source automation system that by providing scalability and versatility, allows mobile app testing far more effective. In such a short time, it has gained momentum in the smartphone device industry with its comprehensive functionality.
Appium was also ranked among the top smartphone research tools by Bitbar, Testbytes, and Intuz, with over 35 percent market share in Android apps and over 40 percent share in iOS applications.
This guide aims to provide you with a comprehensive description of Appium, covering all the required information and advantages that could help you leverage your mobile apps with this great automation testing platform.
Appium uses the UIAutomator (or Selendroid) platform, which is intended to test the Android user interface for automating Android device applications. The bootstrap.jar file acts as a TCP server that with the aid of the UIAutomator or Selendroid system sends a test command to operate on the Android computer.
Appium also uses the JSON wire interface for iOS devices, close to that of Android devices. Here to automate applications on iOS devices, it uses Apple’s UIAutomation API to communicate with the user interface elements. The bootstrap.js file is a TCP server that, with the aid of Apple’s UIAutomation API system, sends a test command to operate on an iOS device.
What is Appium Testing?
Appium is an open-source project that helps you to perform smartphone device automation testing on multiple platforms such as Android, iOS, and Windows.
This automates the experimentation for:
- Native smartphone apps are written using SDKs from iOS, Android, or Windows
- Mobile Web Apps that can be accessed using mobile browsers such as Safari, Chrome, or Android devices’ built-in native browser applications
- Hybrid Smartphone Apps that have a native web view wrapper
Appium is a modular, cross-platform testing system that allows you to write test code using the same API on different platforms such as iOS, Windows, and Android. This means that you can use the same iOS code you wrote for Android, saving plenty of time and effort.
How Appium can be used?
Step 1-Java SDKK is the prerequisite for using Appium (minimum 1.6).
If your machine does not have Java enabled, then follow the steps below.
- JDK and JRE downloads from Oracle JavaSE
- Accept the license contract.
- Get JDK and JRE installed.
- As seen in the screenshot below, set the environment variable.
Step-2 Install Android Studio from SDK
- Double-click the home button and the installer will load.
- Continue with all options for default.
- ANDROID HOME setup.
Step-3 -Install photos and tools for Android.
Click on Manager of SDKs −
Pick the package that is required. For example, if we are building an app for Android 4.4.2, under the Tools section, make sure the following packages are tested.
- Tools for Android SDK rev 22.6.3.
- Android Platform-rev 19.0.1 tools
- Build-tools for Android SDK rev 19.1.
Step 4 -Build virtual devices for Android −
Open Android Studio, and from the toolbar, press AVD Manager. The AVDs allow us to test our Android apps and run them.
For a Nexus5 AVD, use the following settings −
- Device: Nexus 5 Device: (4.95, 1080 x 1920; xxhdpi)
- Target: Google x86 APIs (Google Inc.) – Level 19 APIs
- Make sure that the target with Google APIs in the name is selected.
- CPU: Intel Atom (x86) (x86) (x86)
- Check the Usage Host GPU check box
- Only click OK.
You should see the AVD that you have built in the AVD Manager now, where you can start, remove, or create a new one!
Stage 5: Appium jar files are downloaded from Appium
Advantages of Appium
- It’s free and it’s open-source (mostly).
- It has a Google community that is very well supported and successful.
- It’s in the Selenium 3 spec, so potential evidence should be in place.
- Both Android and iOS are supported by it.
- Nothing needs to be installed on the device-no server or code changes are needed.
Disadvantages of Appium
- No help for smart alerts.
- You can only run one test at a time per Mac on iOS.
- Restricted gesture help.
- Restricted Android support < 4.1
Appium Testing Framework:
Appium is an HTTP server written on the Node.js platform that has a REST (Representational State Transfer) API setup and supports the Selenium WebDriver. It operates on the architecture of a client/server. Appium requires you to use the WebDriver client that is available to start the tests.
The following acts are performed by the REST API:
- Receives a client-side link
- Listen to the order
- On a mobile computer, execute the order
- Responds to the state of order execution
Appium Testing services at AppSierra
AppSierra is a leading Appium testing company in India providing comprehensive Appium mobile testing services, Appium cloud testing, Appium web app testing, Appium automation testing.
The benefits of using Appium as a platform for automation:
- A cross-platform tool that makes code reuse using the same API (iOS, Android, Windows, etc.)
- Doesn’t need access to your library or source code
- Supports automation of software tests on emulators or simulators and physical mobile devices
Automation testing using Appium testing seems to be the best option to keep up with the demands of rapid and accurate testing that stretches across multiple platforms, devices, and variants. Appium, which is favored in the industry, provides feasibility, consistency, and cost-friendliness over other test methods, helping teams to produce excellent user experiences in the area of continuous delivery strategy.