Saturday 14 September 2019

Setting up Genymotion with Oracle Virtual Box for Android Automation





In this tutorial, we will see how to setup Genymotion with Oracle Virtual Box for Android automation.


Prerequisites:

  • Appium must be installed in your mac machine. To check the version and verify Appium is installed or not. Go to terminal and type: appium and press return key. It should show Welcome message and show REST HTTP interface is listening on 4723 port which is default port for appium.

[Appium] Welcome to Appium v1.14.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723


What is Android Emulator?

Emulator emulates real device software, hardware, and Operating System. They fulfill the need to test Applications under test against different versions of android.

The need for Android Emulator?

We need Android Emulator to test our application on different versions of android.

Creation of Android Emulator

For this demonstration, we will use Genymotion instead of the Android SDK emulator, as Genymotion is reliable, simple, easy to use. It also supports GPS and wifi connectivity in real-time.

So let's get started.....


  1. Go to the Application folder and open Genymotion. On the first time when you open it, you don't have virtual devices added to Genymotion.
  2. To add a virtual device you need to sign with the genymotion account created. On successful login, it will communicate with the cloud and list down all virtual devices. You can choose devices depending on your preferences.
  3. Set environment variables in your bash_profile file present under your home directory.
cd /Users/user.name
edit existing ./bash_profile file and create and then add the following lines in this file.

export PATH=$PATH:/Users/user.name/Library/Android/sdk/platform-tools/
export ANDROID_HOME=/Users/user.name/Library/Android/sdk/
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/tools/bin:$PATH

4. Set Android SDK path in GenyMotion,
Go to Genymotion-->Preferences-->select ADB in setting tab, and provide path of Android SDK folder in Android SDK under "use Custome Android tools"




5. Select the device in Genymotion. For example, I have selected these 3 devices. You can start the device from as,

The same device will be available in Oracle Virtual Box.


After clicking on start option the selected device will be up as follows:



So now you can navigate through virtual device manually or through your appium based automation script. 

Please share, comment if you like this tutorial and will add more tutorials in this space. Thanks and Happy Learning !!

Wednesday 11 September 2019

Basic Setup for iOS automation with Appium on Mac






Hello Friends,

As we all know that Appium is an open-source mobile test automation tool to test Android and iOS applications. We can test native, mobile web and Hybrid mobile applications. Appium uses WebDriver interface. It supports C#, Java, Ruby, and many other programming languages that belong to WebDriver Client library.

But for beginners, sometimes it is a bit difficult to setup running appium along with other third-party applications.

 So to ease the process, I am listing down the steps required while installing an appium on the Mac machine.

The steps are as follows:
Setup of iOS automation:

Step 1: Installation of Xcode from App Store
Xcode is an Integrated Development environment by Apple. It comprises of suites of software required to build iOS and OSX applications.
It can be downloaded from AppStore free of charge.

Step 2: Installation of Appium Desktop on Mac
Follow the following URL: 
You should consider the latest stable release. Download the .dmg file as we are installing it on Mac.

Step3: Installation of brew
You can install brew following https://brew.sh/

Step4: Installation of libmobiledevice using brew
Run the following command on terminal

brew install libimobiledevice --HEAD

Step5Installation of Carthage
WebDriver agent which is WebDriver server implementation for iOS that can be used to remote control iOS devices requires Carthage dependency manager.
It can be downloaded from brew as,

brew install carthage

Step6: Creating Maven Java project with the addition of dependencies like Appium java client, testing etc in IDE like eclipse.

Step7: A compiled version of the iOS app. The extension for the compiled app is .app. You can also take help from developers who build this app.

If you follow above-mentioned steps, I guarantee you that you will have working Appium with all required third party apps.

Thanks…

Setting up Genymotion with Oracle Virtual Box for Android Automation

In this tutorial, we will see how to setup Genymotion with Oracle Virtual Box for Android automation. Prerequisites: Appium must ...