Mobile App Test Automation – Getting Started With Appium Part 1

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. Follow this guide to get started with mobile app test automation.


This content originally appeared on HackerNoon and was authored by Joseph Cole-Showers

\ 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 appium@2.11.4 to install Appium.
  • In your terminal write this command appium driver install uiautomator@3.7.2 to install the UI Automator driver.
  • In your terminal write this command appium driver install xcuitest@7.26.4 to install the XCUITest driver.
  • In your terminal write this command appium plugin install --source=npm appium-wait-plugin@2.0.3 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:

\

<dependencies>
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>cucumber-java</artifactId>
        <version>7.13.0</version>
        <scope>test</scope>
    </dependency>

    <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.9.0</version>
            <scope>test</scope>
        </dependency>

    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>8.6.0</version>
    </dependency>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-remote-driver</artifactId>
        <version>4.24.0</version>
    </dependency>
</dependencies>

\ 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.


This content originally appeared on HackerNoon and was authored by Joseph Cole-Showers


Print Share Comment Cite Upload Translate Updates
APA

Joseph Cole-Showers | Sciencx (2024-10-24T20:57:33+00:00) Mobile App Test Automation – Getting Started With Appium Part 1. Retrieved from https://www.scien.cx/2024/10/24/mobile-app-test-automation-getting-started-with-appium-part-1/

MLA
" » Mobile App Test Automation – Getting Started With Appium Part 1." Joseph Cole-Showers | Sciencx - Thursday October 24, 2024, https://www.scien.cx/2024/10/24/mobile-app-test-automation-getting-started-with-appium-part-1/
HARVARD
Joseph Cole-Showers | Sciencx Thursday October 24, 2024 » Mobile App Test Automation – Getting Started With Appium Part 1., viewed ,<https://www.scien.cx/2024/10/24/mobile-app-test-automation-getting-started-with-appium-part-1/>
VANCOUVER
Joseph Cole-Showers | Sciencx - » Mobile App Test Automation – Getting Started With Appium Part 1. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/10/24/mobile-app-test-automation-getting-started-with-appium-part-1/
CHICAGO
" » Mobile App Test Automation – Getting Started With Appium Part 1." Joseph Cole-Showers | Sciencx - Accessed . https://www.scien.cx/2024/10/24/mobile-app-test-automation-getting-started-with-appium-part-1/
IEEE
" » Mobile App Test Automation – Getting Started With Appium Part 1." Joseph Cole-Showers | Sciencx [Online]. Available: https://www.scien.cx/2024/10/24/mobile-app-test-automation-getting-started-with-appium-part-1/. [Accessed: ]
rf:citation
» Mobile App Test Automation – Getting Started With Appium Part 1 | Joseph Cole-Showers | Sciencx | https://www.scien.cx/2024/10/24/mobile-app-test-automation-getting-started-with-appium-part-1/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.