Thursday, March 10, 2016

My Most Favorite iOS Automation Tools!

Automation! I am a huge huge fan of automation. Whether it’s Mobile or Desktop … whether you use open source technologies or in-house built frameworks. Does not really matter :) Being a big believer in automation as ultimate solution for “need for speed”, I love following 3 iOS automation tools.

I was super happy when Google open-sourced Earl-Grey! Let us look at that first...


Google has open sourced it, Internally Google has used this framework for some of it’s products like Youtube, Calendar or photos et al

This is a native iOS automation framework which enables you to write clear tests. This framework gets integrated with XCode’s test navigator to run your tests from XCode itself.

One of the key feature is it’s built-in synchronization mechanism. This mechanism makes your tests run fast and provides improved performance. The built-in synchronization makes the test scripts to wait for UI events to occur.  

Then features like Visibility checks, use like interactions enables framework to be more richer and scalable over any other framework.

This framework is very easy to set up, just follow the instructions accurately provided on GitHub.

This one is an instrument. The one you can use for automating your user interface tests through some written test-scripts. This is mostly utilized for functional testing and it is provided by Apple.

You write tests in Javascript which differs from Obj-C. Since not many folks using it and neither Apple keeps updating it, any problem occurs, you don’t get much help with automation.

We had tried using it in one of my previous companies for UI functional automation however looking at various difficulties we had switched to something better.


This is an integration testing framework. It uses XCTest testing framework to write tests.
KIF is an open source by Square which allows you to write tests using Obj-C. KIF supports all functionalities like tap, swipe, drag, click etc etc The tests are usually executed against iPhone or iPad simulators and usually gets executed speedier.

KIF is easy to set-up, install it, turn on the Accessibility inspector and configure it. The KIFTestController is nothing but a test runner. And KIFTestScenarios stores all the steps to perform a test scenario.

KIF provides an ability to integrate with Jenkins. After every Dev-Check-In or Commit, you can have a smoke test suite, written using KIF, gets executed to ensure nothing obviously is broken. KIF allows you to support and configure continuous deployment for frequent launches of your commits.

Thursday, March 3, 2016

Is Quality time-consuming entity?

Lets first look at….What’s Quality? Is it just identifying defects by expert test team? That’s not quality, that’s just a way to get your product to a viable condition so you can release to world. And I agree it could be time consuming process.


How can we avoid it.


For that let us first even understand what is the meaning of “achieve quality”. Quality has always been associated with business context. The product concept need to be discussed thoroughly. Chalk out any imperfection right that step than coming into development cycle.


At the development phase, let us adopt test-driven design concept. The more effective unit tests you have, the early you will identify imperfections/flaws. This will allow you to move faster rather than waiting for test team to come into picture and find defects.


Follow an agile/lean process. That means literally eliminate anything that’s not adding any value! Get rid of unnecessary meetings, and the documentations. Adapt to user acceptance and short stories. Also avoid what we “need in future” as requirements / UI keep ever changing then why to even waste time in “need for future”


Use an On-demand Cloud Infrastructure.  Cloud is everywhere and we all know what are the benefits of using the same. Maintenance hazard is first and foremost thing we can avoid with this model. Provides flexibility, ensure data integrity, increases efficiency et al
Set up Continuous Deployment. I totally understand getting continuous deployment could be time consuming if there are hurdles faced. However get it clear that it is one time investment but benefits are for life time! This gives you a flexibility to “Build frequently and launch frequently”. Basically it equips you to get a small piece of functionality or feature done with TDD approach and get it out.


Opt-In for Parallel Executions. You can set up multiple important platforms running at the same time. Have your tests seamlessly integrated to run against these multiple combinations (you care about and/or identified from Marketing analysis et al) simultaneously.


Go for Usability Sessions. These are the best sessions. Having real users looking at your product and running through it, will help with finding UI issues/ simplification issues right away. So you can have your real users test it to identify exploratory defects. All of this can be done directly on Prod. You can always use A/B test mechanism.

Frequent Alpha-Beta Launches. You can start conducting alpha releases within your team itself or with little larger audience which constitutes product owners during development process. Alpha launch does not mean you have to have a viable and stable product. Once you are close to getting a stable product, you can opt in for beta launches. These sessions will help identify things way early to keep you moving faster!

Wednesday, February 24, 2016

From An Idea to Minimum Viable Product!

While working in Silicon Valley learnt about the concept of MVP Stands for Minimum Viable Product.

Let’s look at what MVP means:

In product development, MVP is described as getting minimum features developed just enough to get trusted customer feedback quickly.  This equips product members and various stakeholders to make quick decisions about their awesome idea or concept.

Usually various start-ups built MVP to know more about adaptability and revenue that their concept might generate.



Here’s how to go about achieving MVP to launch successfully and quickly:

Idea – Have an idea in mind... Just pen it down. Penning down your idea or concept would help you draw vision and audience base. It will help eliminate unknowns and uncertainties. This will also help you get align with focus.

Be Intelligent – Now you have vision, focus, and concept. What’s the next step? Figure out the problem. What pain-point you are trying to solve? Is this really needed? Should it really be built? Answer yourself to build the confidence! As the confidence, the positivity and the believe in idea will take you miles in the run…

Priority - Outlining relevant and important aspect for MVP is key.  As initial step, first identify what exactly you need out of features from your concept. Get it prioritized based on market analysis and trend.

Develop – Once you know what you want to reach users quicker, building the concept into actuality becomes a critical step. As you are building solution towards identified problem, in the process, you are learning too. Ensure to have metrics/analytics in place. As measurement and leanings will shape up your startup’s engine.

Cloud – With AWS, Google upcoming Cloud Solution, Micrsoft Cloud Solution…world is moving towards cloud and eventually scalability! However there are many cloud orgs which can help you pay for what you use model. These will help save tons of money providing sustainability and scalability.

YouTube – Yes Youtube! You might have heard that a video worth of million dollar words! J Youtube allows you to advertise with them. So instead of getting a heavy duty demo for your product or way too many pages to advertise, get a video built. Craft it carefully and message it smartly. Videos go viral now a days and it would be like mouth-publicity for your product to reach millions in no time…

Duration – As you need to get your idea quickly in market, you are short on time. In such cases focus on Mobile as thats the new and hot industry which will help you run your marathon and not a sprint. Focus on getting something out quickly on iOS and Android. You can put website/ support for all browsers et al to rest for now and build the mobile version first. Also buidling mobile version first help getting a web version up and running down the line.

Conclusion - Getting a Minimum viable product is key for your startup's success. Getting it tested by real end users helps you get feedback right away to modify or revisit the idea. 

JASMINE - A Unit Testing Framework

Any small or medium or large App does require unit tests to verify quality of the code during development stage itself. And this provides flexibility to easily change or modify code without worrying about breaking any regressions.

Before even getting into let’s understand BDD S/W development process.  BDD as it stands for behavior-driven development emerged from Test-driven development. BDD comprises of techniques and principles of TDD to provide ease on collaboration.

Jasmine, a JS unit test BDD framework, for validating JS functions. Jasmine does not have any dependency on DOM elements nor depends on any other JS unit test framework. This comes with it’s own syntax to write efficient tests.

Here’s you can get code for Jasnmine:

Jasmine provides flexibility either to use Ruby or Python. Once the setup is done as per above given instructions, you can start developing unit tests. It is advisable to develop your unit tests first and then write code.

Angular framework has written by keeping testability in mind. Jasmine whole-heartedly support any app built using Angular just like Mocha or qunit etc

You want to write a unit test for a simple mathematics equation

Sample code:
Describe (‘Maths, function () {

//necessary
it(‘should add two numbers accurately’, function() {});
it(‘should subtracts two numbers accurately’, function() {});

});

describe() method describes test suite. It() describes spec.

For Angular’s simple controller you can write below unit test:
var myApp = angular.module('myApp',[]);  myApp.controller('GreetingController', ['$scope', function($scope) {   $scope.greeting = 'Hola!'; }]);

describe(‘GreetingsController Example’, function() {
var GreetingController,
scope;
beforeEach(inject(function ($rootScope, $controller) {
scope = $rootScope.$new();
.
.
.
.});

Now you have an example of basic unit test using Jasmine. You can run all your tests on every commit. These tests are very lightweight, and executes faster.
Achieving Continuous deployment makes it easy.

On Jenkins, you can install a command line with grunt plugin. Add the command line argument in your Jenkins config file.

You can see a sample output here: