What We Need to Know for Mobile Application Tests

Numanhan Duran
6 min readDec 19, 2021

Hello again. As we continue our testing journey, I would like to talk about the installations and tools we need for mobile application testing. In this article, we will make a small introduction to mobile application testing and talk about all the necessary sets. If our teas are ready, we can start.:)

Today, we will discuss the requirements of the Appium tool that we will use for mobile application testing. Appium is a tool developed for mobile application testing.

Appium, It is an open source test tool used in test automation using web driver in native, mobile web and hybrid applications on iOS mobile, Android mobile and Windows desktop platforms.
Main languages supported by Appium; Java, Objective-C, JavaScript, Node.js, PHP, Python, Ruby, C#, Clojure, Perl.

For Appium installation, we will need to install each of the tools that I will talk about shortly.

  • HomeBrew
  • Node&NPM
  • Appium Desktop Application
  • Java&JDK
  • Android Studio
  • Defining JAVA_HOME and ANDROID_HOME variables in .bash_profile
  • Installation the appium-doctor tool
  • Running AVD Manager and creating virtual device

HomeBrew

If you are working on MacOs system, there is a great tool that you can easily download external packages to your computer: Homebrew.

When you enter the HomeBrew site, it gives you a command line. You can easily install HomeBrew if you paste this command line into your terminal and run it.

Node & NPM

Our other addiction is Node. Node is a runtime environment developed for javascript. NPM is a package manager developed for node. After installing Node, npm will be automatically added to your environment.

If you want to make sure that the installations are successful, you can see the following command lines by running them in your terminal. If the version is displayed, congratulations you have successfully completed your installation.

Appium Desktop Application

You can also install the Appium desktop application on your computer via npm. But I think it is useful to install it by using Appium official site. At least you can see which version it is and you can install the most suitable version for your working environment.

Java & JDK

It’s time to install Java and JDK. In this step, the programming language you will actually choose is entirely up to you. I prefer to install java because I prefer to work with java.

You can install the version you see most suitable for your environment from Oracle’s official site.

For the test scenarios we run in test environments, the stable version has always been version 1.8. In this context, you can install it completely depending on your working environment.

Again, you can check whether there is a successful installation with version control on the terminal.

Android Studio

Next, there is the tool we need to install in order to see it live as soon as we run our tests, Android Studio. You can install it from the official site of Android Studio according to your own environment.

When we run our tests, Android Studio will raise a virtual machine and show us the results of our scenarios in accordance with the APK we have given.

https://developer.android.com/studio

Defining JAVA_HOME and ANDROID_HOME variables in .bash_profile

The next step will be to define the paths of the JAVA_HOME and ANDROID_HOME variables in the .bash_profile file. If we do not define these variables in the directory we specify, it may be impossible for us to launch any application or project. I would ask you to pay attention here.

When you open the terminal in your environment again, we will need to access the root directory ( ~/). Don’t worry, I will explain with pictures. With the ls command line, you can see whether your .bash_profile file exists on your computer or not. Assuming it doesn’t exist, we can create our file with the touch command.

  • cd ~/
  • touch .bash_profile
  • open .bash_profile

export JAVA_HOME=$(/usr/libexec/java_home)

export ANDROID_HOME=${HOME}/Library/Android/sdk

exportPATH=”${JAVA_HOME}/bin:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${PATH}”

Here I would like to explain a little what we are doing by adding these commands to our file.

We create a variable named JAVA_HOME and define the java_home directory as a result of the downloaded JDK to this variable. Then, we create a variable named ANDROID_HOME in the same way and assign the directory where the sdk is installed as a result of our Android Studio download to this variable. Finally, by adding the directories I defined to the existing PATH variable, we provide the opportunity to access these variables from the terminal.

Again, we should note that we may not be able to use these variables immediately after adding them to our file and saving them. To check this, we can check it with the source .bash_profile command.

Downloading the appium-doctor tool

In the next step, we will download the appium-doctor tool provided by Appium to the computer via the terminal. This tool is very useful for validating all Appium installations.

A useful tool for validating appium-doctor’s Appium setups. As you can see in the screenshot, it has very helpful commands to complete the ios and android installations. I will continue with Android because Android’s usage area is wider.

Running AVD Manager and Creating Virtual Device

Now it’s time to create a virtual device. First of all, let’s open Android Studio.

You can create a virtual machine with AVD manager by following the steps I have shown above. After this step, we can now start writing our UI tests for our mobile application using Gauge and BDD, which we will continue in our other articles.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Numanhan Duran
Numanhan Duran

Written by Numanhan Duran

Software Test Specialist — Somewhere in Europe

No responses yet

Write a response

Recommended from Medium

Lists

See more recommendations