Thursday, May 15, 2008

Software Test Automation

Software Test automation is becoming prominent day by day. This article is written to give some details about automation based on my experiences.
The process of testing an application using a tool which will simulate the actions performed by a normal tester can be called as Test Automation. The tester will use techniques like record/playback provided by most of the test automation tools to generate some base code. Then he will modify/customize the code generated by tool based on his need. In simple terms Code that tests code is what automation all about!
Why Automation is becoming more and more important now a days? Every day new technologies are coming into market which are easy to use and have very powerful features. As a result of this the time taken for developing software applications is reducing drastically. In order to keep up with the speed of development, the software testing industry is looking towards automation as the solution for this problem.
Does automation really save testing time? The answer to this question is Yes and No. If the automated scripts are used only once or twice, then there is no way you are going to save testing time. Instead you will be spending more time to create the test scripts, maintain them etc. Then, how it is going to save time? When you execute the automated scripts for number of times then you are going to save the testing time. See the below example Example: Time required to test application A manually = 50 Hours Time required to automate the testing for Application A = 100 Hours Time required to test application A using automated scripts = 5 Hours
Case#1: Automated scripts executed for 2 times Total effort spent is = 110 Hours (100 + 2 x 5=110) Time required to test the application A manually 2 times = 100 Hours (50 x 2=100)
In this case you spent extra 10 Hours (100 – 110) for testing through automation over manual testing. Now see case#2
Case#2: Automated scripts executed for 3 times Total effort spent is = 115 Hours (100 + 3 x 5=115) Time required to test the application A manually 3 times = 150 Hours (50 x 3=150)
In this case you saved 35 Hours (150 – 115) through automation over manual testing.
The hours saved will increase as the number of time you use automated scripts increases.
What are the other advantages by using test automation? Automation will save money. In the example we have seen how time can be saved using automation number of times. When you save time, in turn you are saving money, right?
Your tests will be consistent using automation. It is common for a human being to overlook or miss something when the same work is done number of times. With automation you can avoid this. Your tests with run with the same consistency how many number of times you run them.
Testing becomes independent of the tester. By using automation we can delink the testing from the dependency of test execution from a test engineer. Once the automated scripts are ready any test engineer can run them with minimal training or knowledge about the test scripts. If the automation code is written carefully, tests can be run even in the absence of test engineer.
Load and Performance testing is difficult to carry out manually. In case you want to test an application with 100 users accessing it simultaneously and doing various actions. Imagine how difficult it is to get 100 systems, install the application on them, and get 100 people to work on these systems at the same time. But, if you are using the performance or load testing tools, you can do this kind of test comfortably with only 1 or 2 resources.
What is Break-even Point, ROI (Return on Investment) in test automation? In economics, specifically cost accounting, the break-even point (BEP) is the point at which cost or expenses and revenue are equal: there is no net loss or gain, and one has "broken even". The same applies in case of Test Automation. We will say we achieved BEP when the cost for doing automation equals the saving achieved by automated scripts execution. While calculating the cost for automation lot of things will be considered like license cost of the automation tool, hours spent for developing automated scripts, time spent for debugging/customizing/maintaining automation scripts, time taken for executing the automated scripts etc.,
ROI stands for Return on Investment. The following simple formula can be used for calculating the ROI % % ROI = (benefits / costs) x 100 Once you cross the BEP, then you will start getting ROI. This is the very reason why automation requires some initial investment, and it will be beneficial over a period of time.

2 comments:

Unknown said...

Nice information about automation testing. This is basic information and a tester should know about all these things.
Thanks Sai!!!

Sesha Sai said...

Hi Naganjaneyulu,

Thanks for the comments. I tried to provide the information, I came to know during my experience. Happy to know that you liked it.

Sesha Sai