Wednesday, January 8, 2014

Awesome Tips to Become a Better Automation Tester

Automation Testing is every tester’s dream. We all want be automation testers. But only few of us are successful at it. Here are some simple measures that will help you be the kind of automation tester that you desire to be.

10 Tips to Make You a Good Automation Tester

Tip #1: Learn the basics of testing very well:
This is because Automation Testing is nothing but a branch of testing – a form that uses a little more ‘techi’ approach to testing itself. To know what you are testing and why you are testing is very important. ‘How’ – is where Automation and manual testing differ.
Tip #2: Start early:
Do not wait for an automation project to come your way before you get started. There are lots of open source tools available. Install one on your personal machine and give it a try. Use the generic applications like Gmail.com or Amazon.com or even your stand alone Microsoft Office or Calculator. Anything basically.
Tip #3: Familiarize with the basic coding concepts:
Familiarize with the basic coding concepts in any language of your choice. When you take a second to closely consider what a programming language contains, most of them are more or less the same. Take VB Scripting for example, you will need to know the data types, the way in which variables and constants are handled, the different operators, conditional statements, loop statements, arrays, functions etc. Once you understand these concepts you can easily extrapolate your knowledge to any language. So give yourself at least a week’s time to thoroughly understand these concepts.
Tip #4: Overcome the ‘starting trouble’:
The first test/program that you write is going to be confusing no matter how well read you are on the subject. It definitely is going to be overwhelming. But do not worry. Think of it as if you are translating your manual test into a different medium other than English.
Tip #5: Don’t be intimidated:
It is very easy for a beginner to look at an automation test or program and think that it looks very technical and that you will never be able to even understand it much less write something like that. Don’t worry; it is natural to feel this way.
For example, if you want to enter the user name value in the Gmail.com login page. What is the statement that you would write in your manual test case?
It will be like: Enter “swatiseela” in the “User name” field in the Gmail.com page.
When you translate it to VBScript to be a statement in your QTP test it will be:
1
“Browser("Gmail: Email from Google").page("Gmail: Email from Google").WebEdit("Email").Set “swatiseela””.
You see, there is not much difference.  The way you are referencing the place to enter the user name is done differently.
Since automation test step is performed by a machine instead of a human, you just have to make sure that you write your instruction (test step) as clearly as possible without any ambiguity.
Instead of just saying enter the value, you are actually giving the exact names of the objects in the page as they are named by the developer.  Once you are able to grasp this translation, automation is easy.
Tip #6: Learn by seeing:
This is the strategy I personally follow any time I will have to work with a new tool. Every tool that comes into the market no matter how technically robust it is tries to be user friendly. So all the features of the tool are going to be definitely accessible from the menu.
Here is what I do – I start from the “File” menu option and move on until “Help” and try to give a perfunctory glance at each and every menu-submenu items there are. Most of the names will be representative of what that option does. But in case you need more information, just click on that item and look. If you still need more info, use the help file. This way you are not waiting for someone to give you the knowledge on the tool. You are familiarizing with the tool and the IDE by yourself. It helps you assess what is going to be useful to you and what not.
Tip #7: Help files:
Lot of us, look for online tutorials and forums to get started. While they are all great nothing comes close to the help files that come with the tool. It is your biggest treasure. It has everything that the tool can ever do. So consider every automation program you write as an open book examination. The open book being the help file. Make that your first destination whenever you are lost.
Tip #8: Practice:
Be patient with yourself and practice writing code regularly. Remember testing is verification and validation. So write tests in a way that each one has a pass and fail criteria clearly defined. You don’t want an automation tool to just do the data entry and leave the analysis to you. Make sure your program will be able to clearly determine and present the result as pass or failed.
Tip #9: Strive to be better:
Once you solve a problem and write a program, think of ways you can make it better. Can you make it more readable? Can you achieve the result in fewer lines of code? Can you reuse some of the components? Can you avoid using as many variables as you did? Is your program memory efficient? Can you make it run any faster? – These are some of the questions that you need to keep in mind and work towards.
Tip #10: Keep an open mind:
While automation testing is great and gives the testers a ‘God-Complex’, we have to accept that in some cases it is just not the way to go. In such times, be graceful about it because testing is our main cause, whether we take the automation route or the manual route.

Tips you should read before automating your testing work

I was getting too many questions on when and how to automate testing process. Instead of answering them individually I thought it would be better to have some discussion here. I will put my thoughts about when to automate, how to automate or should we automate our testing work? I know there some of our readers are smarter than me. So it would be always a good idea to start a meaningful discussion on such vast topic to get in-depth idea and thoughts from experts from different areas and their experience in automation testing.
Why Automation testing?
1) You have some new releases and bug fixes in working module. So how will you ensure that the new bug fixes have not introduced any new bug in previous working functionality? You need to test the previous functionality also. So will you test manually all the module functionality every time you have some bug fixes or new functionality addition? Well you might do it manually but then you are not doing testing effectively. Effective in terms of company cost, resources, Time etc. Here comes need of Automation.
- So automate your testing procedure when you have lot of regression work.
2) You are testing a web application where there might be thousands of users interacting with your application simultaneously. How will you test such a web application? How will you create those many users manually and simultaneously? Well very difficult task if done manually.
- Automate your load testing work for creating virtual users to check load capacity of your application.
3) You are testing application where code is changing frequently. You have almost same GUI but functional changes are more so testing rework is more.
- Automate your testing work when your GUI is almost frozen but you have lot of frequently functional changes.
What are the Risks associated in Automation Testing?
There are some distinct situations where you can think of automating your testing work. I have covered some risks of automation testing here. If you have taken decision of automation or are going to take sooner then think of following scenarios first.
1) Do you have skilled resources?
For automation you need to have persons having some programming knowledge. Think of your resources. Do they have sufficient programming knowledge for automation testing? If not do they have technical capabilities or programming background that they can easily adapt to the new technologies? Are you going to invest money to build a good automation team? If your answer is yes then only think to automate your work.
2) Initial cost for Automation is very high:
I agree that manual testing has too much cost associated to hire skilled manual testers. And if you are thinking automation will be the solution for you, Think twice. Automation cost is too high for initial setup i.e. cost associated to automation tool purchase, training and maintenance of test scripts is very high.
There are many unsatisfied customers regretting on their decision to automate their work. If you are spending too much and getting merely some good looking testing tools and some basic automation scripts then what is the use of automation?
3) Do not think to automate your UI if it is not fixed:
Beware before automating user interface. If user interface is changing extensively, cost associated with script maintenance will be very high. Basic UI automation is sufficient in such cases.
4) Is your application is stable enough to automate further testing work?
It would be bad idea to automate testing work in early development cycle (Unless it is agile environment). Script maintenance cost will be very high in such cases.
5) Are you thinking of 100% automation?
Please stop dreaming. You cannot 100% automate your testing work. Certainly you have areas like performance testing, regression testing, load/stress testing where you can have chance of reaching near to 100% automation. Areas like User interface, documentation, installation, compatibility and recovery where testing must be done manually.
6) Do not automate tests that run once:
Identify application areas and test cases that might be running once and not included in regression. Avoid automating such modules or test cases.
7) Will your automation suite be having long lifetime?
Every automation script suite should have enough life time that its building cost should be definitely less than that of manual execution cost. This is bit difficult to analyze the effective cost of each automation script suite. Approximately your automation suite should be used or run at least 15 to 20 times for separate builds (General assumption. depends on specific application complexity) to have good ROI.