Your resource for web content, online publishing
and the distribution of digital products.
S M T W T F S
 
 
 
 
 
1
 
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
 
29
 
30
 

Mobile App Test Automation - Getting Started With Appium Part 1

DATE POSTED:October 24, 2024

\ If you have been avoiding mobile test automation because it sounds too complex or you are unsure where to start, fear not!

\ When it comes to end-to-end testing for mobile apps, it can feel a lot like preparing for a trek through an unknown jungle. Whether you are looking to test an Android app or an iOS app, this guide will simplify the setup process and get you kicking with mobile app test automation.

\ Without wasting much time, let’s dive into it.

What is Appium?

Appium is an open-source, free automation testing tool for mobile. It supports cross-platform testing, meaning it can test native apps and hybrid apps.

Pre-requisite

Before you begin, ensure you have met the following requirements:

\

  • Download and Install the latest version of nodejs from the official site here
  • Download and Install Java Development Kit (JDK) from the official site here
  • XCode Installed
  • Android Studio Installed

\ N/B: To verify you have installed node, in your terminal, write node -v which will tell you the current version installed.

Installing Appium
  • Open your terminal, and write this command npm install -g [email protected] to install Appium.
  • In your terminal write this command appium driver install [email protected] to install the UI Automator driver.
  • In your terminal write this command appium driver install [email protected] to install the XCUITest driver.
  • In your terminal write this command appium plugin install --source=npm [email protected] to install a wait plugin.
  • Download, and install Appium Inspector from here.

\ That’s it! You are good to go.

\ To run Appium, simply write appium in your terminal, and the server loads up.

\ Appium Server

\

Getting Started

Now that we have installed Appium, we can now write test scripts to test mobile apps. But before we can write any code, we need an IDE. An IDE is a code editor that allows us to write scripts to test and build software.

\ There are many IDEs out there, but for a quick start, we will be using IntelliJ IDE. You can download and install IntelliJ IDE here. You can make use of the community version.

\ Once you have downloaded and installed IntelliJ IDE, open the software.

\ IntelliJ IDE

\

Create a New Project on IntelliJ
  • Click on new project.

  • Ensure that “Java” is selected as shown below.

  • Give the project a name.

  • Select the build as Maven.

  • Select the JDK installed or registered when you click the drop-down.

  • Once you are done, click on the Create button.

    \

\ Creating a New Project on IntelliJ

\ You will be provided with a pom.xml file. Now, the pom.xml file is going to contain the necessary dependencies we need to use to run Appium.

\ Open the pom.xml file, and add the following dependencies:

\

io.cucumber cucumber-java 7.13.0 test org.testng testng 7.9.0 test io.appium java-client 8.6.0 org.seleniumhq.selenium selenium-remote-driver 4.24.0

\ Once you add the dependencies above in the pom.xml file, an “m” button may pop up by the top right corner, click on it so that it installs the dependencies.

Conclusion

So far, we have installed Appium with the related drivers and plugins we need to be able to successfully run Appium on our machine. We have also installed a code editor - IntelliJ. Finally, we have been able to create a new project on add dependencies in the pom.xml file.