Tuesday, March 31, 2015

Appium for Mobile Application Test Automation

Recently I came across an opensource mobile testing framework named Appium. The great thing about appium is that it works for native iOS, Android or even hybrid mobile web apps. I tested out Appium for iOS and below is a quick guide to the setup process. The appium documentation is a bit scattered so I thought it better to note down the process I followed here,

Step 1:

Install Appium application on mac by downloading the dmg from http://appium.io/. You can also run Appium from the source code if you like.


Step 2:

Launch the installed Appium application and run the 'doctor' (the icon with a stethoscope) to verify all pre-requisites for Appium are installed and setup already. If you see any errors in the doctor console, first fix them. In my case I needed to set the ANDROID_HOME path before the doctor gave me full approval.

Step 3:

Setup Appium settings to run iOS tests. In order to be able to this you need to have Xcode and Command Line tools installed on your mac. In the iOS settings (the dialog launched when you click on the Apple icon), set the 'App Path' and the 'Bundle Id' for the app you want to test. Also make sure that the Xcode path is set. All the other settings are optional. Note that for the 'App Path' you should give the path to the debug version of the .app file of your app, so that it can be run on the simulator. On OSX Maverick the path to this file can be found in the following location ~/Library/Developer/Xcode/DerivedData/.

Step 4:

Write your Appium test. I used the Appium Java API to write my test. I based my test on an example test provided by Appium ( https://github.com/appium/sample-code/blob/master/sample-code/examples/java/junit/src/test/java/com/saucelabs/appium/SimpleTest.java ). Note that you can use the Appium Inspector to determine the xpaths of elements in your application. Given below is the code I wrote to execute a login test.


Step 5:

Now you can run your test. Make sure you launch Appium first by clicking on the Launch button of Appium. The junit test you write requires Appium to be running in order to execute.


Wednesday, March 25, 2015

Hosting multiple Cordova plugins in the same git repository

The norm for hosting custom cordova plugins is one plugin per git repository. However there are instances when you would want to host multiple custom plugins inside the same repository. The cordova command for adding such plugins into a cordova project is as given below :

cordova plugin add [GIT_REPO_URL]#[BRANCH_NAME]:[FOLDER_PATH]

example :

cordova plugins add https://harinis@bitbucket.org/harinis/gtnexuscordovaplugins.git#master:attachmentHandler


Note that the FOLDER_PATH should point to the main plugin folder that contains the plugin.xml file.

Saturday, January 24, 2015

Google Summer of Code Reunion 2014


This post is long overdue. I've pretty much given up blogging lately. This however needs to be written because of the amazing event that it is about!:)

In late October last year I had the amazing opportunity to participate at the Google Summer of Code 10 year reunion at San Jose, California. I was one of the past 10000+ GSoC students who randomly won the lottery to the event. Also, I was fortunate enough to be in the US (in New York) around the same time for a work related training. Big thank you to our company VP Developer Evangelists in New York, Brian Carelli for enabling me to attend this event. Thanks to him I was able to take a short flight (5hrs) from New York to San Jose on 23rd October 2014 to attend the biggest and most awesomest tech meetup/conference I have ever attended! Sorry if I am inventing adjectives here!:D

The conference was held at the Marriot Hotel in San Jose, California. I was quite overwhelmed by the conference gathering. There were about 500 participants from all over the world. Developers from some of the awesomest (I am using this word too much here!!) open source products in the world, from Google (they were the hosts after all) to VLC to Wikipedia. Products that make everyones day to day life so much easier and more fun. There were also developers from smaller projects/products that were just as exciting. I cannot list it all here because the list was that extensive. All I can say is that it was the largest gathering of open source developers you can imagine (500 is a lot!).

I met so many interesting people at the conference. There were fresh grads and even undergrads. My roommate was an undergrad at UCBerkley and one the youngest participants at the conference. There were university professors and PhD students. I really enjoy meeting people from diverse backgrounds and cultures. It's always so inspiring. I suppose the most inspiring person at the conference was Linus Torvalds, who was the guest of honor at the conference opening ceremony. I was secretly hoping Larry Page or Sergey Brin would show up. I am a little too young to idolize Linus. The other guest for the opening ceremony was Peter Norvig (Director of research at Google) and pretty much one of the biggest names when it comes to AI. All these big names aside, for me the best meetup at the conference was meeting my GSoC 2010 project mentor KaiRo (Robert Kaiser) from the Mozilla foundation. He had also won the lottery for the event and he even did a session at the conference on test automation. KaiRo said that I was his only GSoC student. I suppose I demotivated him a bit from mentorship since I didn't carry forward with the development team after the GSoC project ended. I regret that I could not continue due to various other obligations. However I hope he will decide to take up GSoC mentorship again because he was an excellent mentor and he has such a wide knowledge in programming and technology in general that any student would be lucky to learn from him:) I know I learnt a lot from the project I did! I am posting the picture I took with him at the conference here, I hope he won't mind:)




There were so many exciting sessions at the reunion 'Unconference' that I would probably need another blog post to cover it all. I hope I get around to blogging all that someday soon because I know it is going to help me out with my work as well. Oh, and the other great thing about the conference was that we got to visit The Google HQ. Unfortunately it was a Sunday so we didn't see many employees but it was still great to see the massive expanse of the Googleplex and take pics with the cool android statues and we even had one of the most energetic Googlers and conference organizers, Stephanie Taylor give us a guided tour!:)




All in all the GSoC 10 Year Reunion conference was an amazing event and I am so happy to have participated. I am posting a pic of one of my favorite conference moments of all here. My Google Glass moment. One of the developers at the conference was kind enough to lend his glass for me to try out. I usually hate glasses but surprisingly I loved Google Glass! Not enough to spend a crazy amount of money and buy one but perhaps 5 years from now when glass is just as commonplace as an iPhone, I just might!:)












Sunday, August 10, 2014

Running Kura on Raspberry Pi over Equinox and Concierge

Given below are screenshots of the Kura web console running on my RPi device. It gives a comparison of Kura running over Equinox vs Concierge.

My RPi configuration:

RPi Model B
RAM 512MB
Memory 4GB (SanDisk Ultra 30MB/s)
Raspbian OS

Initial memory usage is ~195MB


Kura over Equinox ~300MB


Kura over Concierge ~330MB