December 8, 2020

Getting Started with Appium - Here Are the Things You Need to Know

What is Appium?

Appium is an automation tool for testing mobile web, native, and cross-platform or hybrid applications based on Selenium.

Pros of Using Appium

  1. Since Appium is an open-source automation testing tool, it can be used free of charge.

  2. Appium supports both native and hybrid apps.

  3. Appium supports both iOS and Android.

  4. Appium runs on real iOS and Android devices, emulators, or simulators.

  5. Appium supports both Safari and Chrome web browsers.

  6. Appium allows the use of the Robot Framework.

  7. Appium uses JSON wire protocol.

  8. Appium allows test scripts written in Java, Python, Ruby, C#, JavaScript, and PHP or any language that supports Selenium.

  9. Appium allows multiple devices testing with different OS simultaneously.

  10. Appium desktop GUI is easy to use.

The fact that Appium is free and open-source is a big plus for me. Many paid software automation tools have a free community version but the key features are hidden behind a pay-wall making it nearly impossible to master the software without paying a fee. Multi-language support is another plus. In cases where the test scripts are longer and more complicated, I discovered that using a programming language such as Java over Python will help speed up the script execution times.

Cons of Using Appium

  1. Setting up Appium to test on real devices is challenging.

  2. Testing on real iOS devices requires an active paid Apple developer account.

  3. Appium test execution is slow.

  4. Locating some apps objects is difficult.

  5. Android versions below 4.2 are not supported.

  6. Appium cannot switch between testing mobile app features and web app features in the same test script.

I had issues setting up Appium to test on a real iOS device. Since Apple removed the restriction that prevented non-paid developer accounts from running apps on real devices, I let my paid developer membership lapse. My initial excitement of executing a test script on a real iOS device turned into frustration. After a phone call to support, I learned that the free developer account only allows for the installation of apps created and built using Xcode. The iOS simulator does not allow the installation of third-party apps such as Amazon Mobile, Facebook, or Twitter. A paid Apple developer account is a must for executing test scripts for third-party apps on a real iOS device!

Skills Needed To Use Appium

  1. Basic knowledge of a programming language supported by Appium is required. Knowledge of Selenium is helpful but not required.

  2. Good manual testing skills.

  3. Some experience using automation tools.

  4. Good critical thinking skills.

  5. Good troubleshooting skills.

  6. Ability to write test scripts.

System Requirements for Using Appium

Testing Android Apps

  1. A computer with Windows 10 or macOS X 10.7 or later.

  2. Java Development Kit (JDK) or Java SE version 8 or later.

  3. A simulator or real iOS device.

  4. Node and npm version 10+ or later.

  5. An emulator or real Android device.

  6. Appium or Appium Desktop.

  7. Integrated development environment (IDE).

Testing iOS Apps

  1. A computer with macOS X 10.7 or later.

  2. The latest version of Xcode.

  3. Java Development Kit (JDK) or Java SE version 8 or later.

  4. Homebrew.

  5. Node and npm version 10+ or later.

  6. A simulator or real iOS device.

  7. An active paid Apple developer account is needed to run Appium on a real iOS device.

  8. Appium or Appium Desktop.

  9. Integrated development environment (IDE).

Tips for Using Appium

  1. Read the Appium documentation - http://appium.io/docs/en/about-appium/intro/.

  2. Run Appium Doctor.

  3. Write efficient test scripts. Writing redundant code slows down the execution of the test script.

  4. Use Appium Inspector or UiAutomatorViewer to get the element locator. The UiAutomatorViewer only supports Android.

  5. Whenever possible, avoid using Xpath. Using Xpath slows down the execution of the test script. Xpath depends on the hierarchical structure of the app. If the hierarchical structure of the app changes, the test will fail.

  6. Make use of the accessibility ID locators.

I initially installed the Appium Desktop. The GUI interface makes it easy to write scripts and locate elements. In my excitement, I wrote a test script using the GUI only to have it fail due to a missing component. Appium doctor identified the missing component right away.

Appium is a useful tool for automated mobile app testing. Appium’s multi-language support gives Appium a low learning curve. With practice, it is easy to become an expert in Appium in no time. Happy Testing!

References

Banner Image - Pixabay Image by Photo Mix from Pixabay

Group 9
Group 9