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.
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:
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.
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””. |
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.
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.
No comments:
Post a Comment