How to run mobile testing using Appium in IntellIj

Why appium ?

  • Open Source
  • Cross Platform : By using appium, we can test applications, whether they are native, hybrid, or web apps, android applications, or iOS. Appium can also be installed on Windows, Mac, and Linux.
  • No Source Code : Most applications to test applications such as Selendroid or Robotium need access to the source-code / library of our application, in Appium we don’t need to do this, Appium can test applications only by using the application’s apk alone and applications that are already in the market
  • No Reinstallation : In several other automation testing applications, every time you start testing the application it will reinstall the application, but not in appium, every time you run appium you don’t need to reinstall the application again
  • Framework Support : Appium gives us the freedom to use whatever programming language we want to use when creating automation scripts
  • Community : Appium has a fairly large discussion community and is quite active compared to other application testing applications,
    so it can help us when there are difficulties in using Appium

How Appium Work ?

Appium Drivers

Install Appium

Appium can be installed in two ways :

  • Via NPM
  1. Download and Install node.js & NPM : https://nodejs.org/en/download/
    https://phoenixnap.com/kb/install-node-js-npm-on-windows (tutorial reference)
  2. Open command prompt as an administrator. Then type this command :
    npm install -g appium
  3. Check whether your appium has been installed succesfully by type this command : appium -v. Then it will show the version of appium
  4. To start appium, you can type command : appium. Then it will start the
    appium on 0.0.0.0 : 4723
  • By downloading Appium Desktop

Create Mobile Automation Testing

First create new project in intellij, pop up “New Project ” will be shown. Click on maven, choose project sdk, and then click checklist on Create from archetype

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>test</scope>
</dependency>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store