28
May

Automation Testing – Part 1

Sailfin 0 comment
Hello friends, here I am with a blog on Automation Testing in IT industry. Basically, this blog came to my mind after a question from one of my friend. Now a day there is a lot of buzz about AI in Software testing. Many Big shot companies have started working on the AI fundamentals in software testing. So, this friend of mine is not comfortable with the Automation Testing itself, let’s leave alone the question of AI.

Consider this as first installment out of three in Automation Testing blog followed by two more in the series. In this part I would like to introduce you with the Basic fundamentals and answer few basic questions which buzzes in our minds whenever we think of learning Automation Testing or try to put a step forward in this area.

Today I will be touching 8 basic level questions:

Let’s pick up the first question: “What is automation Testing?” Type this on google and you will get lot of answers. Most common answer is “Software automation testing is the process of software verification in which the basic function and test steps, such as running, initialization, execution, analysis and delivery of results are performed automatically by tools for automated testing.” But here I would like to break this into two parts: “Automation” and “Testing”. Let’s understand them separately first and then combine them together. Automation: Any machinery which knows where to start, where to end and which path to follow from starting point to reach the end is called Automation. To build this complete package i.e. machinery, start point, end point and path to trace from start to end point is called automation or automating something. Testing: It is a process to check and validate that a specific machinery built is working/behaving as per requirement or say set of rules defined. Automation Testing: Combining the above two definition we get to know that Automation testing is nothing but building a machinery which can check/validate the working pattern/behavior of a functionality developed as per the set of rules/requirements.

So, basically Automation Testing is like building a robot to test another robot. Doesn’t that sound funny. Yes, this sounds a bit funny, but this is what we do in automation testing. We write a bunch of codes to test another bunch of codes of a stable product.

Moving on to next question, “Why Automation testing?” From many people I have talked to, the most generic answer I got is “Automation Testing provides greater consistency, saves time, increases productivity, increases the Testing Coverage thus elevating the Quality of software built.”

The statement above stands true, but my question is: Are these all the benefits? From my experience till now I see it this way, the most important thing is that it is a one-time investmenti.e. Automate a testing process for a product, next time run it and forget it. The manual effort saved can be invested in learning some new tool or technology to achieve new goal or target. So, in a way it is a win-win situation for both organization and an employee.

Our next question “When to adopt Automation Testing?” may clear some clouds of doubts.

Many among us have knowledge of automating the test scripts, but they constantly ponder on- Shall I start automating the test script or shall I still wait.

Unlike manual QA processes which starts at a very early stage of Requirement gathering for a product, the automation process starts very late in SDLC. To start Automation of the test script for the product, one need to ensure that the product is very stable within itself and the chance of code change or requirement change is very minimal or negligible. This means that there is hardly any story in the current or near future sprint. This assurance is necessary because we are writing a code to validate the behavior of code written by a developer i.e. we are writing a code above a code. A slight change in the product code will produce a cascading effect in the Automation code written. Frequent changes in the product code may trigger a never ending vicious cycle of Automation code changes ending up with increased product cost, nose-dived productivity graph and poor quality of software built. So, an incorrect decision on Automation testing phase may convert all the positive aspect of Automation to negative.

And now, the million-dollar questions “What are the tools for Test Automation?” and “How to select an Automation tool?” stands before us challenging our will and motivation.

There are various tools in the market to automate test scripts out of which I have selected best 5 tools and tried to compare them on some important parameters. As an Automation tester I should consider few questions before selecting an automation tool.

  • For what kind of application do I have to automate the testing?
  • Whether your organization is willing to buy a licensed tool or not?
  • Will my application be supported by various platforms or will run on one platform?
Product Selenium Katlan Studio Unified Functional Testing Test Complete Watir
Available since 2004 2015 1998 1999 2008
Application Under Test Web Apps Web(UI,API), Mobile Apps Windows Web(UI,API),Mobile,Desktop Apps Web Apps
Pricing Free Free Licensed. Heavily priced Licensed. Moderately Priced Free
Suported Platform Windows, Linux, OS X Windows, Linux, OS X Windows Windows Windows, Linux, OS X
Scripting languages Java, C#, Perl, Python,Javascript,Ruby,PHP Java, Groovy VB Script Javascript,VB Script, Python,Jscript,Delphi,C++,C# Ruby
Programming skills Advance skills needed to integrate various tools Not Required. Recommended for advanced test scripts Not Required. Recommended for advanced test scripts Not Required. Recommended for advanced test scripts Advance skills needed to integrate various tools
Ease of Installation and Use Require advance skills to install and use. Easy to Setup and Use Complex in installation. Need training to properly use the tool. Easy to Setup. Need training to properly use the tool. Require advance skills to install and use.

First of all, know the product for which you want to automate the testing. Whether the application is a web based, desktop or mobile application. If Web Application then be clear whether you want to Automate UI testing or the complete application.

Second, if your organization is not willing to buy a licensed tool, put a cross on all the licensed tool as you shall not do hands-on on a tool which will never be used in your organization.

Third, if the application is cross/multiple platform supported then select a tool which is compatible to cross platform and not based on single platform because Automating test cases is a time taking activity and learning multiple tools for multiple platform for a single product does not sound wise enough.

Get the answers of these question at the very beginning of Automation phase to select the best tool for Automation and avoid repetitive automation effort. Selecting programming language for the Automation Tool chosen? Once an automation tool has been chosen, investigate about the programming or scripting languages supported by it. If an automation tool support one programming or scripting language, then obviously there is no choice but to learn that programming/scripting language.

However, if an automation tool supports multiple programming/scripting languages then there are various factors to select a programming/scripting language.

  • A known language: If there is a programming language which is known or practiced by you in the past and you have it’s decent/working knowledge then you can learn the advance features of that programming language in a less span of time. It’s always better to start with something in hand rather than starting empty handed.
  • Every language is new to explore: In such case when you are unknown to any of the supported programming/scripting language, you can either pick any programming language and start learning it straightaway or you can research about all the supported language and see which is the one you can learn quickly, easily and solves most of the problems while scripting.

For e.g. In Selenium web driver, all the supported languages were unknown to me but through intense research and analysis I zeroed in to Python because for me it was easy to learn and it has all the modules and libraries to support future automation structure. This task takes time and is exhaustive. Picking up a language of your choice is very important because this is the only comfortable zone you get while working on automation. Trust me and I mean it. Exploring while automating: After all the discussions till here one can say, “Hey, I am clear with all the doubts and can start my automation task”. I will say a big “NO”. A NO, not because there is still something pending in the setup, but due to a vast horizon in automation which is still there to be explored. One will ask what else is there to explore, you have got tool, programming language setup, now what?

Let me share one personal experience with you guys. While automating test scripts of a product there was time when I started writing script to log the records in a Log file. Since am using python I compared the power of inbuilt library “logging” of python with a “log4j” external module to “Django”. One will say why to explore when we have logging library in python? Owing everything of my automation script, it is my responsibility to make it as best as I can by using the best of the libraries and external modules wherever possible so that in future if anybody else works on/runs the script he/she shall say “wow, such an incredible work”.

Thus, it is advisable to keep that exploration window open every time while working on something.

Now the next question which we are taking up that arises in everybody’s mind. “Will automation testing eat up manual testing job?” The answer is quite grey shaded and not in black and white.

One, the automation testing code is written based on the test scripts written by the manual tester.

Two, there is no product which can be automated 100%, there is always a scope on manual work somewhere. Also, there are some IT domains or products where automation possibility is 0%. Like someone said correctly “This era of humanity can never, now or ever attain a 100% robotic world. On any day if it happens, no single human would be live on that day.” This is because only a human can make or program/re-program a machine. The day machine starts producing machines, the era of humanity ends.

Three, one should learn automation along with Manual testing to be a complete package in IT industry because one should be open to changes happening around you in IT industry and incompleteness of whatsoever kind is harmful for anyone. Stephen Hawking once said “Intelligence is the ability to adapt to the change.” A Change needs to be embraced and not to be fear from. Few Links for help:

Books to follow:

  • Learning Selenium Testing Tools with Python [Gundecha 2014-12-29] {Available in pdf}
  • For queries ask “Google.com”. You will get lot of stuff there on internet.

I hope this blog answered some of your basic questions about automation and I expect the audience who read this blog to go ahead with the installations and write some basic automation scripts by the time my next sequential blog appears. Happy coding guys and cheers!! Coming up Next

  • Automation Testing – Part 2: Will introduce you with some of the most frequently used libraries while writing automated Test Scripts in Python. We will briefly look at the most commonly used syntax to locate elements and to navigate across the browser.

Also, will introduce you to “How to Automate JMeter for Performance Testing” and “API Testing and its automation”.

  • Automation Testing – Part3: This is the most important part where we will learn to integrate Testlink, Selenium Test scripts, JMeter and API testing tool into an overall complete automation package. Hope, will get some success over API testing tool integration by that time.
Share
0 comment