- July 11, 2018
- Posted by: Mahesh Kulkarni
- Category: Blogs
Wearable technology is on the rise in both personal and business use. In the consumer space, sales of smart wristbands and watches are on an exponential growth path. With the rise in wearable devices, there’s a rush to make existing apps usable for smartwatches and bands. There’s a need to have more robust development and testing practices for such apps.
This was the motivation for going for a POC for Android Wear 2.0, one of the most popular platforms for wearables in the smartwatch category. The intention was to see how existing tools can be leveraged for the automation of wearable-only apps and apps which are available on both Mobile and Android Wear platforms. The following write-up gives an overview of the POC conducted.
Application Under Test (AUT)
The POC deals with the automation of Android Wear 2.0 apps –
- A standalone ‘Calculator’ app
- A Mobile + Smartwatch app ‘Google Keep’.
Calculator app on Android Wear
This is a simple calculator app that can be used to perform basic math operations on the Android watch. Here’s the link to the app.
The POC involves launching the app and performing some basic operations like addition, subtraction, etc. and verifying the results.
Google Keep App on Mobile & Android Wear
This POC takes into consideration an end to end flow in using the Google Keep app. The steps performed are as follows
- Create a checklist on the mobile ‘Keep app.’
- Verify the whether the checklist syncs on the Android wear device or not.
- Mark all items as checked on the wearable device.
- Verify all items as checked on the wearable device.
- Refresh keep a list on a mobile device
- Verify if all items are checked on a mobile device in the ‘keep app.’
- Delete the keep checklist to clean up the data.
App Screenshots on Android Wear Emulator and Mobile device
Automation Tools Used
Library – Appium
Appium is the most popular automation library when it comes to the automation of mobile devices. A few of the benefits of using this library are:
- The app source or apk is not required for automation.
- The app does not require any instrumentation i.e. the production apk can be used as it is, giving more confidence in the tests.
- A familiar Selenium based API is used for automation reducing the learning curve.
In the POC the Java client of the Appium library was used for automation of both the ‘Android Mobile Google Keep App’ and the ‘Android Wear Google Keep App.’
Framework – TestNg
TestNg is a widely used automation framework for the Java language. It’s based on Junit and provides a powerful feature for test configuration, execution, and reporting which makes it robust and easy to use.
Environment – AVD (Android Virtual Device) + Physical device
The environment consists of actual devices (physical, virtual, emulators) used for automation. Some of the options considered for automation were:
- Android Virtual Devices (AVD) for both Mobile and Android Wear.
- Real device for Mobile & AVD for Wear.
- Real devices for Mobile and Android Wear.
The second option was chosen considering the easy availability of an Android Mobile device and the unavailability of a real Android wearable device.
The crucial part here is to set up the environment such that the physical Android device and Android Wear device sync up to have the same Google accounts. This can be done by forwarding ports using the following command –
adb -s <android device id>forward tcp:5601 tcp:5601
There is definately a lot to know about this topic. I love all of the points you made.|
If some one needs expert view on the topic of running a blog after that i suggest him/her to pay a visit this weblog, Keep up the pleasant work.|
Great post! We will be linking to this great article on our site. Keep up the good writing.|
I was able to find good info from your content.|
We absolutely love your blog and find almost all of your post’s to be what precisely I’m looking for. can you offer guest writers to write content for yourself? I wouldn’t mind creating a post or elaborating on a lot of the subjects you write about here. Again, awesome blog!|
Hmm it seems like your blog ate my first comment (it was super long) so I guess I’ll just sum it up what I submitted and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to everything. Do you have any points for beginner blog writers? I’d really appreciate it.
Sweet blog! I found it while searching on Yahoo News. Do you have any tips on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Many thanks