An Overview of mobile application : Moving forward to automation

mobileOSTypes
Its been a while we are well settled with native and web automation on desktop . The war between tools , technologies is almost at its saturation point for this. We have a set of chosen tools / technologies already taking care of cost, ROI etc etc.

What’s next??

Where the world is moving now ??

Mobiles / Tablets / Wearable Devices ??   A smart phone , a smart watch , Smart Glass, Internet of things – Buzzing everywhere.

Are we concerned to quality of these products?

Manufacturing of these smart toys is not confined to big players like Google , Microsoft , Apple now a days. A large number of investors / innovators looking forward to let these devices change the way people consume internet and its services.

From QA perspective now this is a challenge to narrow down tools and technologies which can take care of the quality of these smart devices when development and customization go rapid.

What is in the heart of these devices ??

Android , iOS , Blackberry OS, Windows Phone OS and a lot more.

When tool makers are struggling hard to give support for various platforms in diversities, some open source tools are really enriched with 360 degree APIs for automation for a single platform or more.

Well, before moving forward to any particular tool for automation, lets understand the classification of mobile applications irrespective of platforms:

Mobile applications are of following types:

1.  Native
2. Mobile Web
3. Hybrid

1. Native:

Every mobile OS platform has its SDK with a set of APIs/ methods to develop applications intended for that particular platform only. For example android SDK has a set of APIs.
e.g  android.View class . Official documentation says – “This class represents the basic building block for user interface components”

So all the sub classes of View class (e.g EditText, ImageView etc etc) represents UI elements of the mobile application – we all are habitual with.

So when these view class and its sub classes only used to build the application without any HTML or WEB component – we say it native app. So this kind of application consumed the native features of the platform (android) , hence it can be run with android OS only, because iOS is not going to recognize the View class(android) it consumed from android SDK to be built.

So simply an .apk file is native to android and .ipa is native to iOS. They consume their respective SDK APIs.

2. Mobile Web:

There is nothing new in it. This is simply web application designed for mobile browsers taking care of responsiveness and rendering of various web elements. It can be an HTML document hosted in a web server.

We access this kind of application using mobile browsers by navigating to respective URLs.

However this can be platform independent as HTML/WEB interpretation is what a browser’s job is. No matter it is iOS or Android, we can access it as there is no involvement of native components in these apps.

3. Hybrid:

Name suggests it all. This is a combination of Native and Web features.

It is possible to put HTML/WEB contents in native wrappers. For example in android a WebView (Itself is a native component) can hold HTML contents.

So an application can be built with a combination of native APIs and web contents in-cubed in native wrapper – we call it Hybrid application.

With the variations in application types, there are variants of mobile OS platforms. Instead of all these they all share the basic idea of UI components and its properties to define shape, size, colour , text etc etc.

A comparison between WEB and Mobile application components:

Lets take an example of text field:

Representations:

Web:
gmail

a <input> tag – <input type=”text” name=”username” maxlength=”32″>
Here input is the tag name and type , name , maxlength etc are attributes which describe the text field appearance,    maximum characters to accept etc.

Mobile:
EditText

In android – android.widget.EditText represents an editable text field.
attributes :
android:background This is a drawable to use as the background.
android:contentDescription This defines text that briefly describes content of the view.
android:id This supplies an identifier name for this view,
android:onClick This is the name of the method in this View’s context to invoke when the view is clicked.
android:visibility This controls the initial visibility of the view.

So mapping with Web :

<input> <–> android.widget.EditText
Similar stuff goes with attributes too.

In web automation we look into HTML source or inspect DOM to get access to tags and attributes to build locators which can be used to automate the application. Similarly we are going to inspect various components of mobile application screen – can be termed as class names and its attributes/properties. There are a number of ways to get access to these application components in mobile for various mobile platforms . Some of these tools are included in respective SDKs and some are 3rd party tools.

How to get locators of native components?  How to inspect web components running in the mobile browser?
What to use for Android ? What is for iOS?

Lets look into this in the next blog.

Happy Testing!! 🙂