Thursday, July 5, 2012

By test
automation frame work we mean the overall environment that is constructed for
the execution of the tests. These testing frameworks as well as the test cases
are handled with the help of test scripts. A lot depend on these tests scripts
since it is the efficiency of the test scripts that decide how efficient the
testing process will be.

The point here is that there are several scripting
tools around us and we need to select the tools that will work quite well
for our software systems and applications. In this article we have discussed
some principles of good testing scripts for test automation.

What are principles of good testing scripts?

- The testing
scripts should be application or software system specific and should have been
captured or manually coded in to the proprietary language of the automation
testing tool.

- Good testing scripts are those that have been modified in order
to accommodate the variable data.

- These accommodated variables are used in the
key input fields of the software system or application as well as program
selections.

- By the virtue of these variables the script is able to drive the
application with external data that is supplied by calling routines that
invoked the test scripts.

- Good scripts often house the very fragile recognition
strings as well as hard coded strings very well required for the software
components when they operate.

- The good testing scripts are quite flexible and
are not broken whenever a change is made to the software system or application
or if the application software is revised.

- The particular scenario of any valid
event occurs 100s of times in the testing scripts that are involved in the
testing of some software system or application.

- It is possible that during the
testing of the software system or application the testers involved with the
testing may get a false sense of security and satisfaction with the test
results when the testing scripts used are not good enough.

- Another principle of
good testing scripts is that the all of the efforts related to test design are
virtually developed in that language in which the automation tool has been
scripted.

- It is also possible that the scripts might be duplicated in both
automated and manual script versions.

- A test automation frame work that relies
wholly up on the testing scripts represents the quickest as well as the easiest
means for the implementation of the automation testing tools.

Some other principles of good testing scripts are:

There are few
other principles of good testing scripts for test automation as stated below:

Proper exception handling techniques.

The scripts should adhere to the coding standards as
well as the guiding standards.

Proper frame work should be used to create the testing
scripts.

Comments should be provided for each and every step in
the scripts.

A standard format for exception handling and definition
of the functions should be followed.

Use of appropriate synchronization techniques.

To Conclude:

- The best
practices for writing the code should be chosen and used to create testing
scripts.

- In some, the optional explicit can be used.

- It is necessary to follow
the process of commenting since it is one of the good practices and make the
code more readable.

- Whenever you sense some bug or fault, debugging technique
is a must to be followed.

- All the testing scripts must follow a clean up routine
after every execution.

- Whatever the scripts have been developed they must be
reusable.

- Usually the scripts are executed via short programs that have been
extensively parameterized. - The reusability of the testing scripts is an added
advantage is in case in you later need to perform regression testing.