Tuesday, March 27, 2007

Benefits of Automation ...Once again plz

The most obvious Benefits from automation are :

1. Speed and Accuracy – Automation testing is faster and more accurate than manual testing. It can be as much as 50 times faster depending upon the speed of the application to process information. Tools are much more accurate than manual test input. Research suggests that the average typist makes 3 mistakes for every 1000 keystrokes. Also, automation tool never tire, get bored, take shortcuts or make assumptions of what works.
2. Accessibility – Automation tools allow access to communication protocols, lower level objects of systems & operating system that manual testers can not access. This allows for a test suite with much greater depth & breadth.
3. Reusability – Once tests are developed, long term benefits are derived through reuse. Over the period of time, application changes and gains more complexity. The number of tests always keeps increasing as application matures. Testers have to constantly add new test scripts and need not write same scripts again or test the same area manually over and over again.
4. Manageability – You can group the test scripts according to functionality & prepare ready to use test suits. Depending on the change of code, you can pick up the test suite for testing. It is also possible to test different functionalities altogether or one by one using test suits.
5. Discovery of issues – Automated testing assists discovery of issues early in the development process, hence reducing the costs.
6. Repeatability – An automation suite provides repeatable process for verifying functionality of functional side and scalability on the performance side.
7. Availability – As they are automated, scripts can run any time ,any where that too unattended.

...Wow thats a real Ready reckoner...isn't it ?

Why Automation....eek... Fails ?

Following points are major cause of failure in automation.

1. After creation of automation suit, customer does not maintain the suit for future builds.
2. Lack of structured automation methodology.
3. Test automation is not treated as a project with proper project planning.
4. Testing is performed at the end of development cycle.
5. No modularization in automating scripts.
6. Test engineers are not trained in tool interface & programming.

Automation .....an intresting angle to it


When the test scripts are executed there is chance that more than one test scripts require the same resource to operate on. Moreover as the test scripts are executed in parallel they will try to modify or make use of the same resource.

If a certain test script is written to make use of a particular environment and will only pass if that environment is available. Some other script which is executing before this script changes the environment will surely fail the former script.
Also if the scripts are not properly cleaning up the environment they changed it becomes difficult for other test scripts to expect the environment in a shape.

Preconditions are used for individual test scripts to set up the environment required for a particular test script. Post conditions are used to cleanup the environment modified by the test script. Preconditions and Post conditions can itself be separate test scripts. So there can be quite high dependency between the test scripts. One test script is expecting to setup the environment for itself and some other test script changing the environment set for it.
Such test automation will lead to chaos and will not provide the correct results even though the product is flawless and code for test script is correct.

a) Execute each test script individually.
b) Sequencing of the test scripts which will be executed in parallel
c) Locking of shared resources which act as an environment for the test scripts.
d) Cleaning up the environment.