You are on page 1of 262

INTERVIEW QUESTIONS BIBLE

Based on Software Testing

JAGAN MOHAN J

INDEX

1. CORE JAVA

2. JSP

20

3. SERVLETS

30

4. EJB

33

5. JMS

39

6. SQL

45

7. COMMON TESTING

48

8. SOFTWARE QUALITY ASSURANCE

71

9. WINRUNNER

75

10. LOAD RUNNER

143

11. BUG TRACKING

163

12. QTP

165

13. DATABASE TESTING

174

14. SILK TEST

176

15. HR QUESTIONS ( MOST COMMONLY ASKED)

211

16. UNANSWERED QUESTIONS (TESTING, TOOLS, JAVA, C++, ABAP etc)

218

17. SOFTWARE TESTING GLOSSARY

248

CORE JAVA INTERVIEW QUESTIONS


Q:

What is the difference between an Interface and an Abstract class?

A:

An abstract class can have instance methods that implement a default behavior. An

Interface can only declare constants and instance methods, but cannot implement default
behavior and all methods are implicitly abstract. An interface has all public members and no
implementation. An abstract class is a class which may have the usual flavors of class members
(private, protected, etc.), but has some abstract methods.

Q:

What is the purpose of garbage collection in Java, and when is it used?

A:

The purpose of garbage collection is to identify and discard objects that are no longer

needed by a program so that their resources can be reclaimed and reused. A Java object is
subject to garbage collection when it becomes unreachable to the program in which it is used.

Q:

Describe synchronization in respect to multithreading.

A:

With respect to multithreading, synchronization is the capability to control the access of

multiple threads to shared resources. Without synchonization, it is possible for one thread to
modify a shared variable while another thread is in the process of using or updating same shared
variable. This usually leads to significant errors.

Q:

Explain different way of using thread?

A:

The thread could be implemented by using runnable interface or by inheriting from the

Thread class. The former is more advantageous, 'cause when you are going for multiple
inheritance..the only interface can help.

Q:

What are pass by reference and passby value?

A:

Pass By Reference means the passing the address itself rather than passing the value.

Passby Value means passing a copy of the value to be passed.

Q:

What is HashMap and Map?

A:

Map is Interface and Hashmap is class that implements that.

Q:

Difference between HashMap and HashTable?

A:

The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized

and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesnt
allow). HashMap does not guarantee that the order of the map will remain constant over time.
HashMap is non synchronized and Hashtable is synchronized.

Q:

Difference between Vector and ArrayList?

A:

Vector is synchronized whereas arraylist is not.

Q:

Difference between Swing and Awt?

A:

AWT are heavy-weight componenets. Swings are light-weight components. Hence swing

works faster than AWT.

Q:

What is the difference between a constructor and a method?

A:

A constructor is a member function of a class that is used to create objects of that class.

It has the same name as the class itself, has no return type, and is invoked using the new
operator.
A method is an ordinary member function of a class. It has its own name, a return type (which
may be void), and is invoked using the dot operator.

Q:

What is an Iterators?

A:

Some of the collection classes provide traversal of their contents via a java.util.Iterator

interface. This interface allows you to walk a collection of objects, operating on each object in
turn. Remember when using Iterators that they contain a snapshot of the collection at the time the
Iterator was obtained; generally it is not advisable to modify the collection itself while traversing
an Iterator.

Q:

State the significance of public, private, protected, default modifiers both singly

and in combination and state the effect of package relationships on declared items
qualified by these modifiers.
A:

public : Public class is visible in other packages, field is visible everywhere (class must be

public too)
private : Private variables or methods may be used only by an instance of the same class that
declares the variable or method, A private feature may only be accessed by the class that owns
the feature.
protected : Is available to all classes in the same package and also available to all subclasses of
the class that owns the protected feature.This access is provided even to subclasses that reside
in a different package from the class that owns the protected feature.
default :What you get by default ie, without any access modifier (ie, public private or protected).It
means that it is visible to all within a particular package.

Q:

What is an abstract class?

A:

Abstract class must be extended/subclassed (to be useful). It serves as a template. A

class that is abstract may not be instantiated (ie, you may not call its constructor), abstract class
may contain static data. Any class with an abstract method is automatically abstract itself, and
must be declared as such.
A class may be declared abstract even if it has no abstract methods. This prevents it from being
instantiated.

Q:

What is static in java?

A:

Static means one per class, not one for each object no matter how many instance of a

class might exist. This means that you can use them without creating an instance of a class.Static
methods are implicitly final, because overriding is done based on the type of the object, and static
methods are attached to a class, not an object. A static method in a superclass can be shadowed
by another static method in a subclass, as long as the original method was not declared final.
However, you can't override a static method with a nonstatic method. In other words, you can't
change a static method into an instance method in a subclass.

Q:

What is final?

A:

A final class can't be extended ie., final class may not be subclassed. A final method can't

be overridden when its class is inherited. You can't change value of a final variable (is a
constant).

Q:

What if the main method is declared as private?

A:

The program compiles properly but at runtime it will give "Main method not public."

message.

Q:

What if the static modifier is removed from the signature of the main method?

A:

Program compiles. But at runtime throws an error "NoSuchMethodError".

Q:

What if I write static public void instead of public static void?

A:

Program compiles and runs properly.

Q:

What if I do not provide the String array as the argument to the method?

A:

Program compiles but throws a runtime error "NoSuchMethodError".

Q:

What is the first argument of the String array in main method?

A:

The String array is empty. It does not have any element. This is unlike C/C++ where the

first element by default is the program name.

Q:

If I do not provide any arguments on the command line, then the String array of

Main method will be empty of null?


A:

It is empty. But not null.

Q:

How can one prove that the array is not null but empty?

A:

Print args.length. It will print 0. That means it is empty. But if it would have been null then

it would have thrown a NullPointerException on attempting to print args.length.

Q:

What environment variables do I need to set on my machine in order to be able to

run Java programs?


A:

CLASSPATH and PATH are the two variables.

Q:

Can an application have multiple classes having main method?

A:

Yes it is possible. While starting the application we mention the class name to be run.

The JVM will look for the Main method only in the class whose name you have mentioned. Hence
there is not conflict amongst the multiple classes having main method.

Q:

Can I have multiple main methods in the same class?

A:

No the program fails to compile. The compiler says that the main method is already

defined in the class.

Q:

Do I need to import java.lang package any time? Why ?

A:

No. It is by default loaded internally by the JVM.

Q:

Can I import same package/class twice? Will the JVM load the package twice at

runtime?
A:

One can import the same package or same class multiple times. Neither compiler nor

JVM complains abt it. And the JVM will internally load the class only once no matter how many
times you import the same class.

Q:

What are Checked and UnChecked Exception?

A:

A checked exception is some subclass of Exception (or Exception itself), excluding class

RuntimeException and its subclasses.


Making an exception checked forces client programmers to deal with the possibility that the
exception will be thrown. eg, IOException thrown by java.io.FileInputStream's read() method

Unchecked exceptions are RuntimeException and any of its subclasses. Class Error and its
subclasses also are unchecked. With an unchecked exception, however, the compiler doesn't
force client programmers either to catch the exception or declare it in a throws clause. In fact,
client programmers may not even know that the exception could be thrown. eg,
StringIndexOutOfBoundsException thrown by String's charAt() method Checked exceptions
must be caught at compile time. Runtime exceptions do not need to be. Errors often cannot be.

Q:

What is Overriding?

A:

When a class defines a method using the same name, return type, and arguments as a

method in its superclass, the method in the class overrides the method in the superclass.
When the method is invoked for an object of the class, it is the new definition of the method that is
called, and not the method definition from superclass. Methods may be overridden to be more
public, not more private.

Q:

What are different types of inner classes?

A:

Nested -level classes, Member classes, Local classes, Anonymous classes

Nested -level classes- If you declare a class within a class and specify the static modifier, the
compiler treats the class just like any other -level class.
Any class outside the declaring class accesses the nested class with the declaring class name
acting similarly to a package. eg, outer.inner. -level inner classes implicitly have access only to
static variables.There can also be inner interfaces. All of these are of the nested -level variety.
Member classes - Member inner classes are just like other member methods and member
variables and access to the member class is restricted, just like methods and variables. This
means a public member class acts similarly to a nested -level class. The primary difference
between member classes and nested -level classes is that member classes have access to the
specific instance of the enclosing class.
Local classes - Local classes are like local variables, specific to a block of code. Their visibility is
only within the block of their declaration. In order for the class to be useful beyond the declaration
block, it would need to implement a more publicly available interface.Because local classes are
not members, the modifiers public, protected, private, and static are not usable.
Anonymous classes - Anonymous inner classes extend local inner classes one level further. As
anonymous classes have no name, you cannot provide a constructor.

Q:

Are the imports checked for validity at compile time? e.g. will the code containing

an import such as java.lang.ABCD compile?


A:

Yes the imports are checked for the semantic validity at compile time. The code

containing above line of import will not compile. It will throw an error saying,can not resolve
symbol
symbol : class ABCD
location: package io
import java.io.ABCD;

Q:

Does importing a package imports the subpackages as well? e.g. Does importing

com.MyTest.* also import com.MyTest.UnitTests.*?


A:

No you will have to import the subpackages explicitly. Importing com.MyTest.* will import

classes in the package MyTest only. It will not import any class in any of it's subpackage.

Q:

What is the difference between declaring a variable and defining a variable?

A:

In declaration we just mention the type of the variable and it's name. We do not initialize

it. But defining means declaration + initialization.


e.g String s; is just a declaration while String s = new String ("abcd"); Or String s = "abcd"; are
both definitions.

Q:

What is the default value of an object reference declared as an instance variable?

A:

null unless we define it explicitly.

Q:

Can a level class be private or protected?

A:

No. A level class can not be private or protected. It can have either "public" or no

modifier. If it does not have a modifier it is supposed to have a default access.If a level class is
declared as private the compiler will complain that the "modifier private is not allowed here". This
means that a level class can not be private. Same is the case with protected.

Q:

What type of parameter passing does Java support?

A:

In Java the arguments are always passed by value .

Q:

Primitive data types are passed by reference or pass by value?

A:

Primitive data types are passed by value.

Q:

Objects are passed by value or by reference?

A:

Java only supports pass by value. With objects, the object reference itself is passed by

value and so both the original reference and parameter copy both refer to the same object .

Q:

What is serialization?

A:

Serialization is a mechanism by which you can save the state of an object by converting it

to a byte stream.

Q:

How do I serialize an object to a file?

A:

The class whose instances are to be serialized should implement an interface

Serializable. Then you pass the instance to the ObjectOutputStream which is connected to a
fileoutputstream. This will save the object to a file.

Q:

Which methods of Serializable interface should I implement?

A:

The serializable interface is an empty interface, it does not contain any methods. So we

do not implement any methods.

Q:

How can I customize the seralization process? i.e. how can one have a control over

the serialization process?


A:

Yes it is possible to have control over serialization process. The class should implement

Externalizable interface. This interface contains two methods namely readExternal and
writeExternal. You should implement these methods and write the logic for customizing the
serialization process.

Q:

What is the common usage of serialization?

A:

Whenever an object is to be sent over the network, objects need to be serialized.

Moreover if the state of an object is to be saved, objects need to be serilazed.

Q:

What is Externalizable interface?

A:

Externalizable is an interface which contains two methods readExternal and

writeExternal. These methods give you a control over the serialization mechanism. Thus if your
class implements this interface, you can customize the serialization process by implementing
these methods.

Q:

What happens to the object references included in the object?

A:

The serialization mechanism generates an object graph for serialization. Thus it

determines whether the included object references are serializable or not. This is a recursive

process. Thus when an object is serialized, all the included objects are also serialized alongwith
the original obect.

Q:

What one should take care of while serializing the object?

A:

One should make sure that all the included objects are also serializable. If any of the

objects is not serializable then it throws a NotSerializableException.

Q:

What happens to the static fields of a class during serialization? Are these fields

serialized as a part of each serialized object?


A:

Yes the static fields do get serialized. If the static field is an object then it must have

implemented Serializable interface. The static fields are serialized as a part of every object. But
the commonness of the static fields across all the instances is maintained even after serialization.
Q:

Does Java provide any construct to find out the size of an object?

A:

No there is not sizeof operator in Java. So there is not direct way to determine the size of

an object directly in Java.

Q:

Does importing a package imports the subpackages as well? e.g. Does importing

com.MyTest.* also import com.MyTest.UnitTests.*?


A:

Read the system time just before the method is invoked and immediately after method

returns. Take the time difference, which will give you the time taken by a method for execution.
To put it in code...
long start = System.currentTimeMillis ();
method ();
long end = System.currentTimeMillis ();
System.out.println ("Time taken for execution is " + (end - start));
Remember that if the time taken for execution is too small, it might show that it is taking zero
milliseconds for execution. Try it on a method which is big enough, in the sense the one which is
doing considerable amout of processing.

Q:

What are wrapper classes?

A:

Java provides specialized classes corresponding to each of the primitive data types.

These are called wrapper classes. They are e.g. Integer, Character, Double etc.

Q:

Why do we need wrapper classes?

A:

It is sometimes easier to deal with primitives as objects. Moreover most of the collection

classes store objects and not primitive data types. And also the wrapper classes provide many
utility methods also. Because of these resons we need wrapper classes. And since we create

10

instances of these classes we can store them in any of the collection classes and pass them
around as a collection. Also we can pass them around as method parameters where a method
expects an object.

Q:

What are checked exceptions?

A:

Checked exception are those which the Java compiler forces you to catch. e.g.

IOException are checked Exceptions.

Q:

What are runtime exceptions?

A:

Runtime exceptions are those exceptions that are thrown at runtime because of either

wrong input data or because of wrong business logic etc. These are not checked by the compiler
at compile time.

Q:

What is the difference between error and an exception?

A:

An error is an irrecoverable condition occurring at runtime. Such as OutOfMemory error.

These JVM errors and you can not repair them at runtime. While exceptions are conditions that
occur because of bad input etc. e.g. FileNotFoundException will be thrown if the specified file
does not exist. Or a NullPointerException will take place if you try using a null reference. In most
of the cases it is possible to recover from an exception (probably by giving user a feedback for
entering proper values etc.).

Q:

How to create custom exceptions?

A:

Your class should extend class Exception, or some more specific type thereof.

Q:

If I want an object of my class to be thrown as an exception object, what should I

do?
A:

The class should extend from Exception class. Or you can extend your class from some

more precise exception type also.

Q:

If my class already extends from some other class what should I do if I want an

instance of my class to be thrown as an exception object?


A:

One can not do anytihng in this scenarion. Because Java does not allow multiple

inheritance and does not provide any exception interface as well.

Q:

What happens to an unhandled exception?

A:

One can not do anytihng in this scenarion. Because Java does not allow multiple

inheritance and does not provide any exception interface as well.

11

Q:

How does an exception permeate through the code?

A:

An unhandled exception moves up the method stack in search of a matching When an

exception is thrown from a code which is wrapped in a try block followed by one or more catch
blocks, a search is made for matching catch block. If a matching type is found then that block will
be invoked. If a matching type is not found then the exception moves up the method stack and
reaches the caller method. Same procedure is repeated if the caller method is included in a try
catch block. This process continues until a catch block handling the appropriate type of exception
is found. If it does not find such a block then finally the program terminates.

Q:

What are the different ways to handle exceptions?

A:

There are two ways to handle exceptions,

1. By wrapping the desired code in a try block followed by a catch block to catch the exceptions.
and
2. List the desired exceptions in the throws clause of the method and let the caller of the method
hadle those exceptions.

Q:

Q: What is the basic difference between the 2 approaches to exception

handling...1> try catch block and 2> specifying the candidate exceptions in the throws
clause?
When should you use which approach?
A:

In the first approach as a programmer of the method, you urself are dealing with the

exception. This is fine if you are in a best position to decide should be done in case of an
exception. Whereas if it is not the responsibility of the method to deal with it's own exceptions,
then do not use this approach. In this case use the second approach. In the second approach we
are forcing the caller of the method to catch the exceptions, that the method is likely to throw.
This is often the approach library creators use. They list the exception in the throws clause and
we must catch them. You will find the same approach throughout the java libraries we use.

Q:

Is it necessary that each try block must be followed by a catch block?

A:

It is not necessary that each try block must be followed by a catch block. It should be

followed by either a catch block OR a finally block. And whatever exceptions are likely to be
thrown should be declared in the throws clause of the method.
Q:

If I write return at the end of the try block, will the finally block still execute?

A:

Yes even if you write return as the last statement in the try block and no exception

occurs, the finally block will execute. The finally block will execute and then the control return.

12

Q:

If I write System.exit (0); at the end of the try block, will the finally block still

execute?
A:

No in this case the finally block will not execute because when you say System.exit (0);

the control immediately goes out of the program, and thus finally never executes.

Q:

How are Observer and Observable used?

A:

Objects that subclass the Observable class maintain a list of observers. When an

Observable object is updated it invokes the update() method of each of its observers to notify the
observers that it has changed state. The Observer interface is implemented by objects that
observe Observable objects.

Q:

What is synchronization and why is it important?

A:

With respect to multithreading, synchronization is the capability to control

the access of multiple threads to shared resources. Without synchronization, it is possible for one
thread to modify a shared object while another thread is in the process of using or updating that
object's value. This often leads to significant errors.

Q:

How does Java handle integer overflows and underflows?

A:

It uses those low order bytes of the result that can fit into the size of the type allowed by

the operation.

Q:

Does garbage collection guarantee that a program will not run out of memory?

A:

Garbage collection does not guarantee that a program will not run out of memory. It is

possible for programs to use up memory resources faster than they are garbage collected. It is
also possible for programs to create objects that are not subject to garbage collection

Q:

What is the difference between preemptive scheduling and time slicing?

A:

Under preemptive scheduling, the highest priority task executes until it enters the waiting

or dead states or a higher priority task comes into existence. Under time slicing, a task executes
for a predefined slice of time and then reenters the pool of ready tasks. The scheduler then
determines which task should execute next, based on priority and other factors.

Q:

When a thread is created and started, what is its initial state?

A:

A thread is in the ready state after it has been created and started.

Q:

What is the purpose of finalization?

13

A:

The purpose of finalization is to give an unreachable object the opportunity to perform

any cleanup processing before the object is garbage collected.

Q:

What is the Locale class?

A:

The Locale class is used to tailor program output to the conventions of a particular

geographic, political, or cultural region.

Q:

What is the difference between a while statement and a do statement?

A:

A while statement checks at the beginning of a loop to see whether the next loop iteration

should occur. A do statement checks at the end of a loop to see whether the next iteration of a
loop should occur. The do statement will always execute the body of a loop at least once.

Q:

What is the difference between static and non-static variables?

A:

A static variable is associated with the class as a whole rather than with specific

instances of a class. Non-static variables take on unique values with each object instance.

Q:

How are this() and super() used with constructors?

A:

Othis() is used to invoke a constructor of the same class. super() is used to invoke a

superclass constructor.

Q:

What are synchronized methods and synchronized statements?

A:

Synchronized methods are methods that are used to control access to an object. A

thread only executes a synchronized method after it has acquired the lock for the method's object
or class. Synchronized statements are similar to synchronized methods. A synchronized
statement can only be executed after a thread has acquired the lock for the object or class
referenced in the synchronized statement.

Q:

What is daemon thread and which method is used to create the daemon thread?

A:

Daemon thread is a low priority thread which runs intermittently in the back ground doing

the garbage collection operation for the java runtime system. setDaemon method is used to
create a daemon thread.

Q:

Can applets communicate with each other?

A:

At this point in time applets may communicate with other applets running in the same

virtual machine. If the applets are of the same class, they can communicate via shared static
variables. If the applets are of different classes, then each will need a reference to the same class

14

with static variables. In any case the basic idea is to pass the information back and forth through
a static variable.
An applet can also get references to all other applets on the same page using the getApplets()
method of java.applet.AppletContext. Once you\'ve got a reference to an applet, you can
communicate with it by using its public members.
It is conceivable to have applets in different virtual machines that talk to a server somewhere on
the Internet and store any data that needs to be serialized there. Then, when another applet
needs this data, it could connect to this same server. Implementing this is non-trivial.

Q:
A:

What are the steps in the JDBC connection?


While making a JDBC connection we go through the following steps :

Step 1 : Register the database driver by using :


Class.forName(\" driver classs for that specific database\" );
Step 2 : Now create a database connection using :
Connection con = DriverManager.getConnection(url,username,password);
Step 3: Now Create a query using :
Statement stmt = Connection.Statement(\"select * from TABLE NAME\");
Step 4 : Exceute the query :
stmt.exceuteUpdate();

Q:

How does a try statement determine which catch clause should be used to handle

an exception?
A:

When an exception is thrown within the body of a try statement, the catch clauses of the

try statement are examined in the order in which they appear. The first catch clause that is
capable of handling the exceptionis executed. The remaining catch clauses are ignored.

Q:

Can an unreachable object become reachable again?

A:

An unreachable object may become reachable again. This can happen when the object's

finalize() method is invoked and the object performs an operation which causes it to become
accessible to reachable objects.

Q:

What method must be implemented by all threads?

A:

All tasks must implement the run() method, whether they are a subclass of Thread or

implement the Runnable interface.

15

Q:

What are synchronized methods and synchronized statements?

A:

Synchronized methods are methods that are used to control access to an object. A

thread only executes a synchronized method after it has acquired the lock for the method's object
or class. Synchronized statements are similar to synchronized methods. A synchronized
statement can only be executed after a thread has acquired the lock for the object or class
referenced in the synchronized statement.

Q:

What is Externalizable?

A:

Externalizable is an Interface that extends Serializable Interface. And sends data into

Streams in Compressed Format. It has two methods, writeExternal(ObjectOuput out) and


readExternal(ObjectInput in)

Q:

What modifiers are allowed for methods in an Interface?

A:

Only public and abstract modifiers are allowed for methods in interfaces.

Q:

What are some alternatives to inheritance?

A:

Delegation is an alternative to inheritance. Delegation means that you include an

instance of another class as an instance variable, and forward messages to the instance. It is
often safer than inheritance because it forces you to think about each message you forward,
because the instance is of a known class, rather than a new class, and because it doesn't force
you to accept all the methods of the super class: you can provide only the methods that really
make sense. On the other hand, it makes you write more code, and it is harder to re-use
(because it is not a subclass).

Q:

What does it mean that a method or field is "static"?

A:

Static variables and methods are instantiated only once per class. In other words they are

class variables, not instance variables. If you change the value of a static variable in a particular
object, the value of that variable changes for all instances of that class.
Static methods can be referenced with the name of the class rather than the name of a particular
object of the class (though that works too). That's how library methods like System.out.println()
work out is a static field in the java.lang.System class.

Q:

What is the difference between preemptive scheduling and time slicing?

A:

Under preemptive scheduling, the highest priority task executes until it enters the waiting

or dead states or a higher priority task comes into existence. Under time slicing, a task executes
for a predefined slice of time and then reenters the pool of ready tasks. The scheduler then
determines which task should execute next, based on priority and other factors.

16

Q:

What is the catch or declare rule for method declarations?

A:

If a checked exception may be thrown within the body of a method, the method must

either catch the exception or declare it in its throws clause.

Q:

What is the Collections API?

A:

The Collections API is a set of classes and interfaces that support operations on

collections of objects.

Q:

What is the List interface?

A:

The List interface provides support for ordered collections of objects.

Q:

What is the Vector class?

A:

The Vector class provides the capability to implement a growable array of objects.

Q:

What is an Iterator interface?

A:

The Iterator interface is used to step through the elements of a Collection .

Q:

Which java.util classes and interfaces support event handling?

A:

The EventObject class and the EventListener interface support event processing.

Q:

What is the GregorianCalendar class?

A:

The GregorianCalendar provides support for traditional Western calendars

Q:

What is the Locale class?

A:

The Locale class is used to tailor program output to the conventions of a particular

geographic, political, or cultural region .

Q:

What is the SimpleTimeZone class?

A:

The SimpleTimeZone class provides support for a Gregorian calendar .

Q:

What is the Map interface?

A:

The Map interface replaces the JDK 1.1 Dictionary class and is used associate keys with

values.

Q:

What is the highest-level event class of the event-delegation model?

17

A:

The java.util.EventObject class is the highest-level class in the event-delegation class

hierarchy.

Q:

What is the Collection interface?

A:

The Collection interface provides support for the implementation of a mathematical bag -

an unordered collection of objects that may contain duplicates.

Q:

What is the Set interface?

A:

The Set interface provides methods for accessing the elements of a finite mathematical

set. Sets do not allow duplicate elements.

Q:

What is the typical use of Hashtable?

A:

Whenever a program wants to store a key value pair, one can use Hashtable.

Q:

I am trying to store an object using a key in a Hashtable. And some other object

already exists in that location, then what will happen? The existing object will be
overwritten? Or the new object will be stored elsewhere?
A:

The existing object will be overwritten and thus it will be lost.

Q:

What is the difference between the size and capacity of a Vector?

A:

The size is the number of elements actually stored in the vector, while capacity is the

maximum number of elements it can store at a given instance of time.

Q:

Can a vector contain heterogenous objects?

A:

Yes a Vector can contain heterogenous objects. Because a Vector stores everything in

terms of Object.

Q:

Can a ArrayList contain heterogenous objects?

A:

Yes a ArrayList can contain heterogenous objects. Because a ArrayList stores everything

in terms of Object.

Q:

What is an enumeration?

A:

An enumeration is an interface containing methods for accessing the underlying data

structure from which the enumeration is obtained. It is a construct which collection classes return
when you request a collection of all the objects stored in the collection. It allows sequential
access to all the elements stored in the collection.

18

Q:

Considering the basic properties of Vector and ArrayList, where will you use

Vector and where will you use ArrayList?


A:

The basic difference between a Vector and an ArrayList is that, vector is synchronized

while ArrayList is not. Thus whenever there is a possibility of multiple threads accessing the same
instance, one should use Vector. While if not multiple threads are going to access the same
instance then use ArrayList. Non synchronized data structure will give better performance than
the synchronized one.

Q:

Can a vector contain heterogenous objects?

A:

Yes a Vector can contain heterogenous objects. Because a Vector stores everything in

terms of Object.

19

JSP INTERVIEW QUESTIONS

Q:

What is a output comment?

A:

A comment that is sent to the client in the viewable page source.The JSP engine handles

an output comment as uninterpreted HTML text, returning the comment in the HTML output sent
to the client. You can see the comment by viewing the page source from your Web browser.
JSP Syntax
<!-- comment [ <%= expression %> ] -->
Example 1
<!-- This is a commnet sent to client on
<%= (new java.util.Date()).toLocaleString() %>
-->
Displays in the page source:
<!-- This is a commnet sent to client on January 24, 2004 -->

Q:

What is a Hidden Comment?

A:

A comments that documents the JSP page but is not sent to the client. The JSP engine

ignores a hidden comment, and does not process any code within hidden comment tags. A
hidden comment is not sent to the client, either in the displayed JSP page or the HTML page
source. The hidden comment is useful when you want to hide or "comment out" part of your JSP
page.
You can use any characters in the body of the comment except the closing --%> combination. If
you need to use --%> in your comment, you can escape it by typing --%\>.
JSP Syntax
<%-- comment --%>
Examples
<%@ page language="java" %>
<html>
<head><title>A Hidden Comment </title></head>
<body>
<%-- This comment will not be visible to the colent in the page source --%>
</body>
</html>

Q:

What is a Expression?

20

A:

An expression tag contains a scripting language expression that is evaluated, converted

to a String, and inserted where the expression appears in the JSP file. Because the value of an
expression is converted to a String, you can use an expression within text in a JSP file. Like
<%= someexpression %>
<%= (new java.util.Date()).toLocaleString() %>
You cannot use a semicolon to end an expression

Q:

What is a Declaration?

A:

A declaration declares one or more variables or methods for use later in the JSP source

file.
A declaration must contain at least one complete declarative statement. You can declare any
number of variables or methods within one declaration tag, as long as they are separated by
semicolons. The declaration must be valid in the scripting language used in the JSP file.
<%! somedeclarations %>
<%! int i = 0; %>
<%! int a, b, c; %>

Q:

What is a Scriptlet?

A:

A scriptlet can contain any number of language statements, variable or method

declarations, or expressions that are valid in the page scripting language.Within scriptlet tags, you
can
1.Declare variables or methods to use later in the file (see also Declaration).
2.Write expressions valid in the page scripting language (see also Expression).
3.Use any of the JSP implicit objects or any object declared with a <jsp:useBean> tag.
You must write plain text, HTML-encoded text, or other JSP tags outside the scriptlet.
Scriptlets are executed at request time, when the JSP engine processes the client request. If the
scriptlet produces output, the output is stored in the out object, from which you can display it.

Q:

What are implicit objects? List them?

A:

Certain objects that are available for the use in JSP documents without being declared

first. These objects are parsed by the JSP engine and inserted into the generated servlet. The
implicit objects re listed below

request

response

21

pageContext

session

application

out

config

page

exception

Q:

Difference between forward and sendRedirect?

A:

When you invoke a forward request, the request is sent to another resource on the

server, without the client being informed that a different resource is going to process the request.
This process occurs completly with in the web container. When a sendRedirtect method is
invoked, it causes the web container to return to the browser indicating that a new URL should be
requested. Because the browser issues a completly new request any object that are stored as
request attributes before the redirect occurs will be lost. This extra round trip a redirect is slower
than forward.

Q:

What are the different scope valiues for the <jsp:useBean>?

A:

The different scope values for <jsp:useBean> are

1. page
2. request
3.session
4.application

Q:

Explain the life-cycle mehtods in JSP?

A:

THe generated servlet class for a JSP page implements the HttpJspPage interface of the

javax.servlet.jsp package. Hte HttpJspPage interface extends the JspPage interface which inturn
extends the Servlet interface of the javax.servlet package. the generated servlet class thus
implements all the methods of the these three interfaces. The JspPage interface declares only
two mehtods - jspInit() and jspDestroy() that must be implemented by all JSP pages regardless of
the client-server protocol. However the JSP specification has provided the HttpJspPage interfaec
specifically for the JSp pages serving HTTP requests. This interface declares one method
_jspService().
The jspInit()- The container calls the jspInit() to initialize te servlet instance.It is called before any
other method, and is called only once for a servlet instance.
The _jspservice()- The container calls the _jspservice() for each request, passing it the request
and the response objects.

22

The jspDestroy()- The container calls this when it decides take the instance out of service. It is
the last method called n the servlet instance.

Q:

How do I prevent the output of my JSP or Servlet pages from being cached by the

browser?
A:

You will need to set the appropriate HTTP header attributes to prevent the dynamic

content output by the JSP page from being cached by the browser. Just execute the following
scriptlet at the beginning of your JSP pages to prevent them from being cached at the browser.
You need both the statements to take care of some of the older browser versions.
<%
response.setHeader("Cache-Control","no-store"); //HTTP 1.1
response.setHeader("Pragma\","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>

Q:

How does JSP handle run-time exceptions?

A:

You can use the errorPage attribute of the page directive to have uncaught run-time

exceptions automatically forwarded to an error processing page. For example:


<%@ page errorPage=\"error.jsp\" %> redirects the browser to the JSP page error.jsp if an
uncaught exception is encountered during request processing. Within error.jsp, if you indicate that
it is an error-processing page, via the directive: <%@ page isErrorPage=\"true\" %> Throwable
object describing the exception may be accessed within the error page via the exception implicit
object. Note: You must always use a relative URL as the value for the errorPage attribute.

Q:

How can I implement a thread-safe JSP page? What are the advantages and

Disadvantages of using it?


A:

You can make your JSPs thread-safe by having them implement the SingleThreadModel

interface. This is done by adding the directive <%@ page isThreadSafe="false" %> within your
JSP page. With this, instead of a single instance of the servlet generated for your JSP page
loaded in memory, you will have N instances of the servlet loaded and initialized, with the service
method of each instance effectively synchronized. You can typically control the number of
instances (N) that are instantiated for all servlets implementing SingleThreadModel through the
admin screen for your JSP engine. More importantly, avoid using the tag for variables. If you do
use this tag, then you should set isThreadSafe to true, as mentioned above. Otherwise, all
requests to that page will access those variables, causing a nasty race condition.
SingleThreadModel is not recommended for normal use. There are many pitfalls, including the

23

example above of not being able to use <%! %>. You should try really hard to make them threadsafe the old fashioned way: by making them thread-safe .

Q:

How do I use a scriptlet to initialize a newly instantiated bean?

A:

A jsp:useBean action may optionally have a body. If the body is specified, its contents will

be automatically invoked when the specified bean is instantiated. Typically, the body will contain
scriptlets or jsp:setProperty tags to initialize the newly instantiated bean, although you are not
restricted to using those alone.
The following example shows the today property of the Foo bean initialized to the current date
when it is instantiated. Note that here, we make use of a JSP expression within the
jsp:setProperty action.
<jsp:useBean id="foo" class="com.Bar.Foo" >
<jsp:setProperty name="foo" property="today"
value="<%=java.text.DateFormat.getDateInstance().format(new java.util.Date()) %>" / >
<%-- scriptlets calling bean setter methods go here --%>
</jsp:useBean >

Q:

How can I prevent the word "null" from appearing in my HTML input text fields

when I populate them with a resultset that has null values?


A:

You could make a simple wrapper function, like

<%!
String blanknull(String s) {
return (s == null) ? \"\" : s;
}
%>
then use it inside your JSP form, like
<input type="text" name="lastName" value="<%=blanknull(lastName)% >" >

Q:

What's

better

approach

for

enabling

thread-safe

servlets

and

JSPs?

SingleThreadModel Interface or Synchronization?


A:

Although the SingleThreadModel technique is easy to use, and works well for low volume

sites, it does not scale well. If you anticipate your users to increase in the future, you may be
better off implementing explicit synchronization for your shared data. The key however, is to
effectively minimize the amount of code that is synchronzied so that you take maximum
advantage of multithreading.

24

Also, note that SingleThreadModel is pretty resource intensive from the server\'s perspective. The
most serious issue however is when the number of concurrent requests exhaust the servlet
instance pool. In that case, all the unserviced requests are queued until something becomes free
- which results in poor performance. Since the usage is non-deterministic, it may not help much
even if you did add more memory and increased the size of the instance pool.

Q:

How can I enable session tracking for JSP pages if the browser has disabled

cookies?
A:

We know that session tracking uses cookies by default to associate a session identifier

with a unique user. If the browser does not support cookies, or if cookies are disabled, you can
still enable session tracking using URL rewriting. URL rewriting essentially includes the session
ID within the link itself as a name/value pair. However, for this to be effective, you need to append
the session ID for each and every link that is part of your servlet response. Adding the session ID
to a link is greatly simplified by means of of a couple of methods: response.encodeURL()
associates

session

ID

with

given

URL,

and

if

you

are

using

redirection,

response.encodeRedirectURL() can be used by giving the redirected URL as input. Both


encodeURL() and encodeRedirectedURL() first determine whether cookies are supported by the
browser; if so, the input URL is returned unchanged since the session ID will be persisted as a
cookie.
Consider the following example, in which two JSP files, say hello1.jsp and hello2.jsp, interact with
each other. Basically, we create a new session within hello1.jsp and place an object within this
session. The user can then traverse to hello2.jsp by clicking on the link present within the page.
Within hello2.jsp, we simply extract the object that was earlier placed in the session and display
its contents. Notice that we invoke the encodeURL() within hello1.jsp on the link used to invoke
hello2.jsp; if cookies are disabled, the session ID is automatically appended to the URL, allowing
hello2.jsp to still retrieve the session object. Try this example first with cookies enabled. Then
disable cookie support, restart the brower, and try again. Each time you should see the
maintenance of the session across pages. Do note that to get this example to work with cookies
disabled at the browser, your JSP engine has to support URL rewriting.
hello1.jsp
<%@ page session=\"true\" %>
<%
Integer num = new Integer(100);
session.putValue("num",num);
String url =response.encodeURL("hello2.jsp");
%>

25

<a href=\'<%=url%>\'>hello2.jsp</a>
hello2.jsp
<%@ page session="true" %>
<%
Integer i= (Integer )session.getValue("num");
out.println("Num value in session is " + i.intValue());
%>

Q:

What is the difference b/w variable declared inside a declaration part and variable

declared in scriplet part?


A:

Variable declared inside declaration part is treated as a global variable.that means after

convertion jsp file into servlet that variable will be in outside of service method or it will be
declared as instance variable.And the scope is available to complete jsp and to complete in the
converted servlet class.where as if u declare a variable inside a scriplet that variable will be
declared inside a service method and the scope is with in the service method.

Q:

How does JSP handle run-time exceptions?

A:

You can use the errorPage attribute of the page directive to have uncaught run-time

exceptions automatically forwarded to an error processing page. For example:


<%@ page errorPage=\"error.jsp\" %> redirects the browser to the JSP page error.jsp if an
uncaught exception is encountered during request processing. Within error.jsp, if you indicate that
it is an error-processing page, via the directive: <%@ page isErrorPage=\"true\" %> Throwable
object describing the exception may be accessed within the error page via the exception implicit
object. Note: You must always use a relative URL as the value for the errorPage attribute.

Q:

How can I implement a thread-safe JSP page? What are the advantages and

Disadvantages of using it?


A:

You can make your JSPs thread-safe by having them implement the SingleThreadModel

interface. This is done by adding the directive <%@ page isThreadSafe="false" %> within your
JSP page. With this, instead of a single instance of the servlet generated for your JSP page
loaded in memory, you will have N instances of the servlet loaded and initialized, with the service
method of each instance effectively synchronized. You can typically control the number of
instances (N) that are instantiated for all servlets implementing SingleThreadModel through the
admin screen for your JSP engine. More importantly, avoid using the tag for variables. If you do
use this tag, then you should set isThreadSafe to true, as mentioned above. Otherwise, all
requests to that page will access those variables, causing a nasty race condition.
SingleThreadModel is not recommended for normal use. There are many pitfalls, including the

26

example above of not being able to use <%! %>. You should try really hard to make them threadsafe the old fashioned way: by making them thread-safe .

Q:

How do I use a scriptlet to initialize a newly instantiated bean?

A:

A jsp:useBean action may optionally have a body. If the body is specified, its contents will

be automatically invoked when the specified bean is instantiated. Typically, the body will contain
scriptlets or jsp:setProperty tags to initialize the newly instantiated bean, although you are not
restricted to using those alone.
The following example shows the today property of the Foo bean initialized to the current date
when it is instantiated. Note that here, we make use of a JSP expression within the
jsp:setProperty action.
<jsp:useBean id="foo" class="com.Bar.Foo" >
<jsp:setProperty name="foo" property="today"
value="<%=java.text.DateFormat.getDateInstance().format(new java.util.Date()) %>" / >
<%-- scriptlets calling bean setter methods go here --%>
</jsp:useBean >

Q:

How can I prevent the word "null" from appearing in my HTML input text fields

when I populate them with a resultset that has null values?


A:

You could make a simple wrapper function, like

<%!
String blanknull(String s) {
return (s == null) ? \"\" : s;
}
%>
then use it inside your JSP form, like
<input type="text" name="lastName" value="<%=blanknull(lastName)% >" >

Q:

What's

better

approach

for

enabling

thread-safe

servlets

and

JSPs?

SingleThreadModel Interface or Synchronization?


A:

Although the SingleThreadModel technique is easy to use, and works well for low volume

sites, it does not scale well. If you anticipate your users to increase in the future, you may be
better off implementing explicit synchronization for your shared data. The key however, is to
effectively minimize the amount of code that is synchronzied so that you take maximum
advantage of multithreading.

27

Also, note that SingleThreadModel is pretty resource intensive from the server\'s perspective. The
most serious issue however is when the number of concurrent requests exhaust the servlet
instance pool. In that case, all the unserviced requests are queued until something becomes free
- which results in poor performance. Since the usage is non-deterministic, it may not help much
even if you did add more memory and increased the size of the instance pool.

Q:

How can I enable session tracking for JSP pages if the browser has disabled

cookies?
A:

We know that session tracking uses cookies by default to associate a session identifier

with a unique user. If the browser does not support cookies, or if cookies are disabled, you can
still enable session tracking using URL rewriting. URL rewriting essentially includes the session
ID within the link itself as a name/value pair. However, for this to be effective, you need to append
the session ID for each and every link that is part of your servlet response. Adding the session ID
to a link is greatly simplified by means of of a couple of methods: response.encodeURL()
associates

session

ID

with

given

URL,

and

if

you

are

using

redirection,

response.encodeRedirectURL() can be used by giving the redirected URL as input. Both


encodeURL() and encodeRedirectedURL() first determine whether cookies are supported by the
browser; if so, the input URL is returned unchanged since the session ID will be persisted as a
cookie.
Consider the following example, in which two JSP files, say hello1.jsp and hello2.jsp, interact with
each other. Basically, we create a new session within hello1.jsp and place an object within this
session. The user can then traverse to hello2.jsp by clicking on the link present within the page.
Within hello2.jsp, we simply extract the object that was earlier placed in the session and display
its contents. Notice that we invoke the encodeURL() within hello1.jsp on the link used to invoke
hello2.jsp; if cookies are disabled, the session ID is automatically appended to the URL, allowing
hello2.jsp to still retrieve the session object. Try this example first with cookies enabled. Then
disable cookie support, restart the brower, and try again. Each time you should see the
maintenance of the session across pages. Do note that to get this example to work with cookies
disabled at the browser, your JSP engine has to support URL rewriting.
hello1.jsp
<%@ page session=\"true\" %>
<%
Integer num = new Integer(100);
session.putValue("num",num);
String url =response.encodeURL("hello2.jsp");
%>

28

<a href=\'<%=url%>\'>hello2.jsp</a>
hello2.jsp
<%@ page session="true" %>
<%
Integer i= (Integer )session.getValue("num");
out.println("Num value in session is " + i.intValue());
%>

Q:

Is there a way to execute a JSP from the comandline or from my own application?

A:

There is a little tool called JSPExecutor that allows you to do just that. The developers

(Hendrik Schreiber <hs@webapp.de> & Peter Rossbach <pr@webapp.de>) aim was not to write
a full blown servlet engine, but to provide means to use JSP for generating source code or
reports. Therefore most HTTP-specific features (headers, sessions, etc) are not implemented, i.e.
no reponseline or header is generated. Nevertheless you can use it to precompile JSP for your
website.

29

SERVLETS INTERVIEW QUESTIONS

Q:

Explain the life cycle methods of a Servlet.

A:

The javax.servlet.Servlet interface defines the three methods known as life-cycle method.

public void init(ServletConfig config) throws ServletException


public void service( ServletRequest req, ServletResponse res) throws ServletException,
IOException
public void destroy()
First the servlet is constructed, then initialized wih the init() method.
Any request from client are handled initially by the service() method before delegating to the
doXxx() methods in the case of HttpServlet.
The servlet is removed from service, destroyed with the destroy() methid, then garbaged
collected and finalized.

Q:

What is the difference between the getRequestDispatcher(String path) method of

javax.servlet.ServletRequest interface and javax.servlet.ServletContext interface?


A:

The getRequestDispatcher(String path) method of javax.servlet.ServletRequest interface

accepts parameter the path to the resource to be included or forwarded to, which can be relative
to the request of the calling servlet. If the path begins with a "/" it is interpreted as relative to the
current context root.
The getRequestDispatcher(String path) method of javax.servlet.ServletContext interface cannot
accepts relative paths. All path must sart with a "/" and are interpreted as relative to curent
context root.

Q:

Explain the directory structure of a web application.

A:

The directory structure of a web application consists of two parts.

A private directory called WEB-INF


A public resource directory which contains public resource folder.
WEB-INF folder consists of
1. web.xml
2. classes directory
3. lib directory

30

Q:

What are the common mechanisms used for session tracking?

A:

Cookies

SSL sessions
URL- rewriting

Q:

Explain ServletContext.

A:

ServletContext interface is a window for a servlet to view it's environment. A servlet can

use this interface to get information such as initialization parameters for the web applicationor
servlet container's version. Every web application has one and only one ServletContext and is
accessible to all active resource of that application.

Q:

What is preinitialization of a servlet?

A:

A container doesnot initialize the servlets ass soon as it starts up, it initializes a servlet

when it receives a request for that servlet first time. This is called lazy loading. The servlet
specification defines the <load-on-startup> element, which can be specified in the deployment
descriptor to make the servlet container load and initialize the servlet as soon as it starts up. The
process of loading a servlet before any request comes in is called preloading or preinitializing a
servlet.

Q:

What is the difference between Difference between doGet() and doPost()?

A:

A doGet() method is limited with 2k of data to be sent, and doPost() method doesn't have

this limitation. A request string for doGet() looks like the following:
http://www.allapplabs.com/svt1?p1=v1&p2=v2&...&pN=vN
doPost() method call doesn't need a long text tail after a servlet name in a request. All
parameters are stored in a request itself, not in a request string, and it's impossible to guess the
data transmitted to a servlet only looking at a request string.

Q:

What is the difference between HttpServlet and GenericServlet?

A:

A GenericServlet has a service() method aimed to handle requests. HttpServlet extends

GenericServlet and adds support for doGet(), doPost(), doHead() methods (HTTP 1.0) plus
doPut(), doOptions(), doDelete(), doTrace() methods (HTTP 1.1).
Both these classes are abstract.

Q:

What is the difference between ServletContext and ServletConfig?

A:

ServletContext: Defines a set of methods that a servlet uses to communicate with its

servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log

31

file.The ServletContext object is contained within the ServletConfig object, which the Web server
provides the servlet when the servlet is initialized
ServletConfig: The object created after a servlet is instantiated and its default constructor is read.
It is created to pass initialization information to the servlet.

32

EJB Interview Questions

Q:

What are the different kinds of enterprise beans?

A:

Different kind of enterrise beans are Stateless session bean, Stateful session bean,

Entity bean, Message-driven bean...........

Q:

What is Session Bean?

A:

A session bean is a non-persistent object that implements some business logic running

on the server. One way to think of a session object...........

Q:

What is Entity Bean?

A:

The entity bean is used to represent data in the database. It provides an object-oriented

interface to ...........

Q:

What are the methods of Entity Bean?

A:

An entity bean consists of 4 groups of methods, create methods...........

Q:

What is the difference between Container-Managed Persistent (CMP) bean and

Bean-Managed Persistent(BMP) ?
A:

Container-managed persistence (CMP) and bean-managed persistence (BMP). With

CMP, the container manages the persistence of the entity bean............

Q:

What are the callback methods in Entity beans?

A:

Callback methods allows the container to notify the bean of events in

its life cycle. The callback methods are defined in the javax.ejb.EntityBean interface............

Q:

What is software architecture of EJB?

A:

Session and Entity EJBs consist of 4 and 5 parts respectively, a remote interface...........

Q:

Can Entity Beans have no create() methods?

A:

Yes. In some cases the data is inserted NOT using Java application,...........

Q:

What is bean managed transaction?

A:

If a developer doesn't want a Container to manage transactions, it's possible to

implement all database operations manually...........

Q:

What are transaction attributes?

33

A:

The transaction attribute specifies how the Container must manage transactions for a

method when a client invokes the method via the enterprise beans home or...........

Q:

What are transaction isolation levels in EJB?

A:

Transaction_read_uncommitted

Transaction_read_committed

Transaction_repeatable_read...........

Q:

How EJB Invocation happens?

A:

Step 1: Retrieve Home Object reference from Naming Service via JNDI.

step 2: Return Home Object reference to the client.


step 3: Create me a new EJB Object through Home Object interface.
step 4: Create EJB Object from the Ejb Object
step 5: Return EJB Object reference to the client.
step 6: Invoke business method using EJB Object reference.
step 7: Delegate request to Bean (Enterprise Bean).

Q:

Is it possible to share an HttpSession between a JSP and EJB? What happens

when I change a value in the HttpSession from inside an EJB?


A:

You can pass the HttpSession as parameter to an EJB method, only if all objects in

session are serializable.This has to be consider as ?passed-by-value", that means that it?s readonly in the EJB. If anything is altered from inside the EJB, it won?t be reflected back to the
HttpSession of the Servlet Container.The ?pass-by-reference? can be used between EJBs
Remote Interfaces, as they are remote references. While it IS possible to pass an HttpSession as
a parameter to an EJB object, it is considered to be ?bad practice ? in terms of object oriented
design. This is because you are creating an unnecessary coupling between back-end objects
(ejbs) and front-end objects (HttpSession). Create a higher-level of abstraction for your ejb?s api.
Rather than passing the whole, fat, HttpSession (which carries with it a bunch of http semantics),
create a class that acts as a value object (or structure) that holds all the data you need to pass
back and forth between front-end/back-end. Consider the case where your ejb needs to support a
non-http-based client. This higher level of abstraction will be flexible enough to support it.

Q:

The EJB container implements the EJBHome and EJBObject classes. For every

request from a unique client, does the container create a separate instance of the
generated EJBHome and EJBObject classes?
A:

The EJB container maintains an instance pool. The container uses these instances for

the EJB Home reference irrespective of the client request. while refering the EJB Object classes
the container creates a separate instance for each client request. The instance pool maintainence

34

is up to the implementation of the container. If the container provides one, it is available otherwise
it is not mandatory for the provider to implement it. Having said that, yes most of the container
providers implement the pooling functionality to increase the performance of the application
server. The way it is implemented is again up to the implementer.

Q:

Can the primary key in the entity bean be a Java primitive type such as int?

A:

The primary key can't be a primitive type--use the primitive wrapper classes, instead. For

example, you can use java.lang.Integer as the primary key class, but not int (it has to be a class,
not a primitive)

Q:

Can you control when passivation occurs?

A:

The developer, according to the specification, cannot directly control when passivation

occurs. Although for Stateful Session Beans, the container cannot passivate an instance that is
inside a transaction. So using transactions can be a a strategy to control passivation.
The ejbPassivate() method is called during passivation, so the developer has control over what to
do during this exercise and can implement the require optimized logic.
Some EJB containers, such as BEA WebLogic, provide the ability to tune the container to
minimize passivation calls.
Taken from the WebLogic 6.0 DTD -"The passivation-strategy can be either "default" or
"transaction". With the default setting the container will attempt to keep a working set of beans in
the cache. With the "transaction" setting, the container will passivate the bean after every
transaction (or method call for a non-transactional invocation).

Q:

What is the advantage of using Entity bean for database operations, over directly

using JDBC API to do database operations? When would I use one over the other?
A:

Entity Beans actually represents the data in a database. It is not that Entity Beans

replaces JDBC API. There are two types of Entity Beans Container Managed and Bean
Mananged. In Container Managed Entity Bean - Whenever the instance of the bean is created
the container automatically retrieves the data from the DB/Persistance storage and assigns to the
object variables in bean for user to manipulate or use them. For this the developer needs to map
the fields in the database to the variables in deployment descriptor files (which varies for each
vendor).
In the Bean Managed Entity Bean - The developer has to specifically make connection, retrive
values, assign them to the objects in the ejbLoad() which will be called by the container when it
instatiates a bean object. Similarly in the ejbStore() the container saves the object values back
the the persistance storage. ejbLoad and ejbStore are callback methods and can be only invoked
by the container. Apart from this, when you use Entity beans you dont need to worry about

35

database transaction handling, database connection pooling etc. which are taken care by the ejb
container. But in case of JDBC you have to explicitly do the above features. what suresh told is
exactly perfect. ofcourse, this comes under the database transations, but i want to add this. the
great thing about the entity beans of container managed, whenever the connection is failed during
the transaction processing, the database consistancy is mantained automatically. the container
writes the data stored at persistant storage of the entity beans to the database again to provide
the database consistancy. where as in jdbc api, we, developers has to do manually.

Q:

What is EJB QL?

A:

EJB QL is a Query Language provided for navigation across a network of enterprise

beans and dependent objects defined by means of container managed persistence. EJB QL is
introduced in the EJB 2.0 specification. The EJB QL query language defines finder methods for
entity beans with container managed persistenceand is portable across containers and
persistence managers. EJB QL is used for queries of two types of finder methods: Finder
methods that are defined in the home interface of an entity bean and which return entity objects.
Select methods, which are not exposed to the client, but which are used by the Bean Provider to
select persistent values that are maintained by the Persistence Manager or to select entity
objects that are related to the entity bean on which the query is defined.

Q:

Brief description about local interfaces?

A:

EEJB was originally designed around remote invocation using the Java Remote Method

Invocation (RMI) mechanism, and later extended to support to standard CORBA transport for
these calls using RMI/IIOP. This design allowed for maximum flexibility in developing applications
without consideration for the deployment scenario, and was a strong feature in support of a goal
of component reuse in J2EE.
Many developers are using EJBs locally -- that is, some or all of their EJB calls are between
beans in a single container.
With this feedback in mind, the EJB 2.0 expert group has created a local interface mechanism.
The local interface may be defined for a bean during development, to allow streamlined calls to
the bean if a caller is in the same container. This does not involve the overhead involved with RMI
like marshalling etc. This facility will thus improve the performance of applications in which colocation is planned.
Local interfaces also provide the foundation for container-managed relationships among entity
beans with container-managed persistence.

Q:

What are the special design care that must be taken when you work with local

interfaces?

36

A:

EIt is important to understand that the calling semantics of local interfaces are different

from those of remote interfaces. For example, remote interfaces pass parameters using call-byvalue semantics, while local interfaces use call-by-reference.
This means that in order to use local interfaces safely, application developers need to carefully
consider potential deployment scenarios up front, then decide which interfaces can be local and
which remote, and finally, develop the application code with these choices in mind.
While EJB 2.0 local interfaces are extremely useful in some situations, the long-term costs of
these choices, especially when changing requirements and component reuse are taken into
account, need to be factored into the design decision.

Q:

What happens if remove( ) is never invoked on a session bean?

A:

In case of a stateless session bean it may not matter if we call or not as in both cases

nothing is done. The number of beans in cache is managed by the container.


In case of stateful session bean, the bean may be kept in cache till either the session times out, in
which case the bean is removed or when there is a requirement for memory in which case the
data is cached and the bean is sent to free pool.

Q:

What is the difference between Message Driven Beans and Stateless Session

beans?
A:

In several ways, the dynamic creation and allocation of message-driven bean instances

mimics the behavior of stateless session EJB instances, which exist only for the duration of a
particular method call. However, message-driven beans are different from stateless session EJBs
(and other types of EJBs) in several significant ways:
Message-driven beans process multiple JMS messages asynchronously, rather than processing
a serialized sequence of method calls.
Message-driven beans have no home or remote interface, and therefore cannot be directly
accessed by internal or external clients. Clients interact with message-driven beans only
indirectly, by sending a message to a JMS Queue or ic.
Note: Only the container directly interacts with a message-driven bean by creating bean
instances and passing JMS messages to those instances as necessary.
The Container maintains the entire lifecycle of a message-driven bean; instances cannot be
created or removed as a result of client requests or other API calls.

Q:

How can I call one EJB from inside of another EJB?

A:

EJBs can be clients of other EJBs. It just works. Use JNDI to locate the Home Interface

of the other bean, then acquire an instance reference, and so forth.

37

Q:

What is an EJB Context?

A:

EJBContext is an interface that is implemented by the container, and it is also a part of

the bean-container contract. Entity beans use a subclass of EJBContext called EntityContext.
Session beans use a subclass called SessionContext. These EJBContext objects provide the
bean class with information about its container, the client using the bean and the bean itself. They
also provide other functions. See the API docs and the spec for more details.

Q:

The EJB container implements the EJBHome and EJBObject classes. For every

request from a unique client, does the container create a separate instance of the
generated EJBHome and EJBObject classes?
A:

The EJB container maintains an instance pool. The container uses these instances for

the EJB Home reference irrespective of the client request. While refering the EJB Object classes
the container creates a separate instance for each client request. The instance pool maintainence
is up to the implementation of the container. If the container provides one, it is available otherwise
it is not mandatory for the provider to implement it. Having said that, yes most of the container
providers implement the pooling functionality to increase the performance of the application
server. The way it is implemented is again up to the implementer.

38

JMS Interview Questions

Q:

What is JMS?

A:

JMS is an acronym used for Java Messaging Service. It is Java's answer to creating

software using asynchronous messaging. It is one of the official specifications of the J2EE
technologies and is a key technology.

Q:

How JMS is different from RPC?

A:

In RPC the method invoker waits for the method to finish execution and return the control

back to the invoker. Thus it is completely synchronous in nature. While in JMS the message
sender just sends the message to the destination and continues it's own processing. The sender
does not wait for the receiver to respond. This is asynchronous behavior.

Q:

What are the advantages of JMS?

A:

JMS is asynchronous in nature. Thus not all the pieces need to be up all the time for the

application to function as a whole. Even if the receiver is down the MOM will store the messages
on it's behalf and will send them once it comes back up. Thus at least a part of application can
still function as there is no blocking.

Q:

Are you aware of any major JMS products available in the market?

A:

IBM's MQ Series is one of the most popular product used as Message Oriented

Middleware. Some of the other products are SonicMQ, iBus etc. Weblogic application server also
comes with built in support for JMS messaging.

Q:

What are the different types of messages available in the JMS API?

A:

Message,

TextMessage,

BytesMessage,

StreamMessage,

ObjectMessage,

MapMessage are the different messages available in the JMS API.

Q:

What are the different messaging paradigms JMS supports?

A:

Publish and Subscribe i.e. pub/suc and Point to Point i.e. p2p.

Q:

What is the difference between ic and queue?

A:

A ic is typically used for one to many messaging i.e. it supports publish subscribe model

of messaging. While queue is used for one-to-one messaging i.e. it supports Point to Point
Messaging.

Q:

What is the role of JMS in enterprise solution development?

39

A:

JMS is typically used in the following scenarios

1. Enterprise Application Integration: - Where a legacy application is integrated with a new


application via messaging.
2. B2B or Business to Business: - Businesses can interact with each other via messaging
because JMS allows organizations to cooperate without tightly coupling their business systems.
3. Geographically dispersed units: - JMS can ensure safe exchange of data amongst the
geographically dispersed units of an organization.
4. One to many applications: - The applications that have to push data in packet to huge number
of clients in a one-to-many fashion are good candidates for the use JMS. Typical such
applications are Auction Sites, Stock Quote Services etc.

Q:

What is the use of Message object?

A:

Message is a light weight message having only header and properties and no payload.

Thus if the received are to be notified abt an event, and no data needs to be exchanged then
using Message can be very efficient.

Q:

What is the basic difference between Publish Subscribe model and P2P model?

A:

Publish Subscribe model is typically used in one-to-many situation. It is unreliable but

very fast. P2P model is used in one-to-one situation. It is highly reliable.

Q:

What is the use of BytesMessage?

A:

BytesMessage contains an array of primitive bytes in it's payload. Thus it can be used for

transfer of data between two applications in their native format which may not be compatible with
other Message types. It is also useful where JMS is used purely as a transport between two
systems and the message payload is opaque to the JMS client. Whenever you store any primitive
type, it is converted into it's byte representation and then stored in the payload. There is no
boundary line between the different data types stored. Thus you can even read a long as short.
This would result in erroneous data and hence it is advisable that the payload be read in the
same order and using the same type in which it was created by the sender.

Q:

What is the use of StreamMessage?

A:

StreamMessage carries a stream of Java primitive types as it's payload. It contains some

conveient methods for reading the data stored in the payload. However StreamMessage prevents
reading a long value as short, something that is allwed in case of BytesMessage. This is so
because the StreamMessage also writes the type information alonwgith the value of the primitive
type and enforces a set of strict conversion rules which actually prevents reading of one primitive
type as another.

40

Q:

What is the use of TextMessage?

A:

TextMessage contains instance of java.lang.String as it's payload. Thus it is very useful

for exchanging textual data. It can also be used for exchanging complex character data such as
an XML document.

Q:

What is the use of ObjectMessage?

A:

ObjectMessage contains a Serializable java object as it's payload. Thus it allows

exchange of Java objects between applications. This in itself mandates that both the applications
be Java applications. The consumer of the message must typecast the object received to it's
appropriate type. Thus the consumer should before hand know the actual type of the object sent
by the sender. Wrong type casting would result in ClassCastException. Moreover the class
definition of the object set in the payload should be available on both the machine, the sender as
well as the consumer. If the class definition is not available in the consumer machine, an attempt
to type cast would result in ClassNotFoundException. Some of the MOMs might support dynamic
loading of the desired class over the network, but the JMS specification does not mandate this
behavior and would be a value added service if provided by your vendor. And relying on any such
vendor specific functionality would hamper the portability of your application. Most of the time the
class need to be put in the classpath of both, the sender and the consumer, manually by the
developer.

Q:

What is the use of MapMessage?

A:

A MapMessage carries name-value pair as it's payload. Thus it's payload is similar to the

java.util.Properties object of Java. The values can be Java primitives or their wrappers.

Q:

What is the difference between BytesMessage and StreamMessage??

A:

BytesMessage stores the primitive data types by converting them to their byte

representation. Thus the message is one contiguous stream of bytes. While the StreamMessage
maintains a boundary between the different data types stored because it also stores the type
information along with the value of the primitive being stored. BytesMessage allows data to be
read using any type. Thus even if your payload contains a long value, you can invoke a method to
read a short and it will return you something. It will not give you a semantically correct data but
the call will succeed in reading the first two bytes of data. This is strictly prohibited in the
StreamMessage. It maintains the type information of the data being stored and enforces strict
conversion rules on the data being read.

Q:

What is point-to-point messaging?

41

A:

With point-to-point message passing the sending application/client establishes a named

message queue in the JMS broker/server and sends messages to this queue. The receiving client
registers with the broker to receive messages posted to this queue. There is a one-to-one
relationship between the sending and receiving clients.

Q:

Can two different JMS services talk to each other? For instance, if A and B are two

different JMS providers, can Provider A send messages directly to Provider B? If not, then
can a subscriber to Provider A act as a publisher to Provider B?
A:

The answers are no to the first question and yes to the second. The JMS specification

does not require that one JMS provider be able to send messages directly to another provider.
However, the specification does require that a JMS client must be able to accept a message
created by a different JMS provider, so a message received by a subscriber to Provider A can
then be published to Provider B. One caveat is that the publisher to Provider B is not required to
handle a JMSReplyTo header that refers to a destination that is specific to Provider A.

Q:

What is the advantage of persistent message delivery compared to nonpersistent

delivery?
A:

If the JMS server experiences a failure, for example, a power outage, any message that it

is holding in primary storage potentially could be lost. With persistent storage, the JMS server
logs every message to secondary storage. (The logging occurs on the front end, that is, as part of
handling the send operation from the message producing client.) The logged message is
removed from secondary storage only after it has been successfully delivered to all consuming
clients .

Q:

Give an example of using the publish/subscribe model.

A:

JMS can be used to broadcast shutdown messages to clients connected to the Weblogic

server on a module wise basis. If an application has six modules, each module behaves like a
subscriber to a named ic on the server.

Q:

Why doesn't the JMS API provide end-to-end synchronous message delivery and

notification of delivery?
A:

Some messaging systems provide synchronous delivery to destinations as a mechanism

for implementing reliable applications. Some systems provide clients with various forms of
delivery notification so that the clients can detect dropped or ignored messages. This is not the
model defined by the JMS API.

42

JMS API messaging provides guaranteed delivery via the once-and-only-once delivery semantics
of PERSISTENT messages. In addition, message consumers can insure reliable processing of
messages by using either CLIENT_ACKNOWLEDGE mode or transacted sessions. This
achieves reliable delivery with minimum synchronization and is the enterprise messaging model
most vendors and developers prefer.
The JMS API does not define a schema of systems messages (such as delivery notifications). If
an application requires acknowledgment of message receipt, it can define an application-level
acknowledgment message.

Q:

What are the various message types supported by JMS?

A:

Stream Messages ? Group of Java Primitives

Map Messages ? Name Value Pairs. Name being a string& Value being a java primitive
Text Messages ? String messages (since being widely used a separate messaging Type has
been supported)
Object Messages ? Group of serialize able java object
Bytes Message ? Stream of uninterrupted bytes

Q:

How is a java object message delivered to a non-java Client?

A:

It is according to the specification that the message sent should be received in the same

format. A non-java client cannot receive a message in the form of java object. The provider in
between handles the conversion of the data type and the message is transferred to the other end.

Q:

What is MDB and What is the special feature of that?

A:

MDB is Message driven bean, which very much resembles the Stateless session bean.

The incoming and out going messages can be handled by the Message driven bean. The ability
to communicate asynchronously is the special feature about the Message driven bean.

Q:

What are the types of messaging?

A:

There are two kinds of Messaging.

Synchronous Messaging: Synchronous messaging involves a client that waits for the server to
respond to a message.
Asynchronous Messaging: Asynchronous messaging involves a client that does not wait for a
message from the server. An event is used to trigger a message from a server.

Q:

What are the core JMS-related objects required for each JMS-enabled application?

A:

Each JMS-enabled client must establish the following:

43

A connection object provided by the JMS server (the message broker)


Within a connection, one or more sessions, which provide a context for message sending and
receiving
Within a session, either a queue or ic object representing the destination (the message staging
area) within the message broker
Within a session, the appropriate sender or publisher or receiver or subscriber object
(depending on whether the client is a message producer or consumer and uses a point-to-point or
publish/subscribe strategy, respectively)
Within a session, a message object (to send or to receive)

44

SQL Interview Questions

Q:

What is SQL?

A:

SQL stands for 'Structured Query Language'.

Q:

What is SELECT statement?

A:

The SELECT statement lets you select a set of values from a table in a database. The

values selected from the database table would depend on the various conditions that are
specified in the SQL query.

Q:

How can you compare a part of the name rather than the entire name?

A:

SELECT * FROM people WHERE empname LIKE '%ab%'

Would return a recordset with records consisting empname the sequence 'ab' in empname

Q:

What is the INSERT statement?

A:

The INSERT statement lets you insert information into a database.

Q:

How do you delete a record from a database?

A:

Use the DELETE statement to remove records or any particular column values from a

database.

Q:

How could I get distinct entries from a table?

A:

The SELECT statement in conjunction with DISTINCT lets you select a set of distinct

values from a table in a database. The values selected from the database table would of course
depend on the various conditions that are specified in the SQL query. Example
SELECT DISTINCT empname FROM emptable

Q:

How to get the results of a Query sorted in any order?

A:

You can sort the results and return the sorted results to your program by using ORDER

BY keyword thus saving you the pain of carrying out the sorting yourself. The ORDER BY
keyword is used for sorting.
SELECT empname, age, city FROM emptable ORDER BY empname

Q:

How can I find the total number of records in a table?

A:

You could use the COUNT keyword , example

45

SELECT COUNT(*) FROM emp WHERE age>40

Q:

What is GROUP BY?

A:

The GROUP BY keywords have been added to SQL because aggregate functions (like

SUM) return the aggregate of all column values every time they are called. Without the GROUP
BY functionality, finding the sum for each individual group of column values was not possible.

Q:

What is the difference among "dropping a table", "truncating a table" and "deleting

all records" from a table.


A:

Dropping : (Table structure + Data are deleted), Invalidates the dependent objects

,Drops the indexes


Truncating: (Data alone deleted), Performs an automatic commit, Faster than delete
Delete : (Data alone deleted), Doesnt perform automatic commit

Q:

What are the Large object types suported by Oracle?

A:

Blob and Clob.

Q:

Difference between a "where" clause and a "having" clause.

A:

Having clause is used only with group functions whereas Where is not used with.

Q:

What's the difference between a primary key and a unique key?

A:

Both primary key and unique enforce uniqueness of the column on which they are

defined. But by default primary key creates a clustered index on the column, where are unique
creates a nonclustered index by default. Another major difference is that, primary key doesn't
allow NULLs, but unique key allows one NULL only.

Q:

What are cursors? Explain different types of cursors. What are the disadvantages

of cursors? How can you avoid cursors?


A:

Cursors allow row-by-row prcessing of the resultsets.

Types of cursors: Static, Dynamic, Forward-only, Keyset-driven. See books online for more
information.
Disadvantages of cursors: Each time you fetch a row from the cursor, it results in a network
roundtrip, where as a normal SELECT query makes only one rowundtrip, however large the
resultset is. Cursors are also costly because they require more resources and temporary storage
(results in more IO operations). Furthere, there are restrictions on the SELECT statements that
can be used with some types of cursors.
Most of the times, set based operations can be used instead of cursors.

46

Q:

What are triggers? How to invoke a trigger on demand?

A:

Triggers are special kind of stored procedures that get executed automatically when an

INSERT, UPDATE or DELETE operation takes place on a table.


Triggers can't be invoked on demand. They get triggered only when an associated action
(INSERT, UPDATE, DELETE) happens on the table on which they are defined.
Triggers are generally used to implement business rules, auditing. Triggers can also be used to
extend the referential integrity checks, but wherever possible, use constraints for this purpose,
instead of triggers, as constraints are much faster.

Q:

What is a join and explain different types of joins.

A:

Joins are used in queries to explain how different tables are related. Joins also let you

select data from a table depending upon data from another table.
Types of joins: INNER JOINs, OUTER JOINs, CROSS JOINs. OUTER JOINs are further
classified as LEFT OUTER JOINS, RIGHT OUTER JOINS and FULL OUTER JOINS.

Q:

What is a self join?

A:

Self join is just like any other join, except that two instances of the same table will be

joined in the query.

47

TESTING COMMON INTERVIEW QUESTIONS

1. what is contained in srs?,give a sample srs.what is cohesive testing and span


control?

2. What is Difference Between QA plan and Test Plan?


QA is more over prevention thing which works towards non occurance of error- were as tesplan
come s in testin i.e in quality control which works towards how to identify defects/errors

3. what is the Test server

4. What are all the key factors to write system test plan?
keyfactors

5. How to perform integration testing on a web application? What are the considerations?
Detailed pls.

6. If you have an application, but you do not have any requiremnts available, then how
would you perform
With out a requirements documents how can u develop an application .if it is developed without
any requirements then the application is made with assumptions .Then testing is done depending
on the assumptions made through application.In this case, if you are going to work for some
company,

7. How can you know if a test case is necessary?

8. What is peer review in practical terms?


Test cases written by a QA engineer will be reviewed (for correctness) by fellow QA Engineer.

9. How do you know when you have enough test cases to adequately test a software
system or module?

10. Who approved your test cases?


It depends on the organization. QA Lead, if present, will approve the test cases. Otherwise, Peer
Reviews are a good way of evaluating the test cases.

48

11. What will you when you find a bug?


1)Execute some more tests, to make clear what the bug EXCATLY is. Suppose, the test case
failed when State=NY and Class=Business. Tester has to exceute some more tests to find out
whether the problem is with Just 'NY' state or with just 'Business' class or with both of them
together.2) Report the bug

12. What test plans have you written?


Master Test plan is usually prepared by QA Lead. Testers write Test Cases, which in some
organizations are called as Test Plans.

13. What is QA? What is Testing? Are they both same or different?
Testing is subset of QA. Testing is just a phase that comes after coding. But QA is the one that
should be incorporated into the entire Software Development Life Cycle.

14. How to write Negative Testcase?Give ex.


Negative test cases are written based on thinking abt AUT in a destructive manner in the
sense,what happens if i test the application with irrelevant inputs.

15. In an application currently in production, one module of code is being modified. Is it


necessary to re1) Test the modified module2) Test all the other modules/areas of the application which will have
direct/indirect interaction with the modified module.

16. What is included in test strategy?What is overall process of testing step by step and
what are various
Test strategy is creating a procedure of how to test the software and creating a strategy what all
to be tested(screens,process,modules,..)and time limts for testing process(automated or manual)
.So everything has to be planned and implemented.Testing overall procedure isThe duties of
software test

17. What is the most challenging situation you had during testing

18. what are you going to do if there is no Functional Spec or any documents related to
the system and developer
First of all, when a developer left then another one in or someone assigned to take care of the
responsibilities.Most of the functional testing needs more knowledge about the product then the

49

code. Be familiarize with the code. Research similar product in the market. Increase
communication with related

19. What is the major problem did you resolve during testing process

20. What are the types of functional testing?


There are followingtypes of functional testing.1. Functionality testing.2. Input domain
testing.3.Error handling testing.about 90% of the functional testing will be covered with teh
completion of above three.4. Recovery testing.5.Compatibility testing6.Configuration
testing7.Intersystems testing8.Installation

21. 1.how will u write integration test cases2.how will u track bugs from winrunner3.how u
customise the
A use case is a description of how end-users will use a software code. It describes a task or a
series of tasks that users will accomplish using the software, and includes the responses of the
software to user actions. Use cases may be included in the Software Requirements Document
(SRD) as a way of

22. what is the difference between smoke testing and sanity testing
smoke testing is conducted by development people according to the clients requirements.the first
test conducted by testing people when build is received is called sanity testing.in sanity testing
testing people check the basic functionality i.e whether all buttons are working or not etc

23. What is Random Testing?


Random data tests confort the application under test with input data generated at
random.Typically,testers pay no attention to expect data types.They feed a random sequence of
numbers,letters & characters into nummeric data field.

24. What is smoke testing?


during this test test engineer reject build with reason, when that build is not working before testing
process

25. What is stage containment in testing?

26. Security testing and Performance testing on Communication interface

50

27. what are the steps in volved in sanity testing?


Sanity testing is same as smoke testing. It involves intial testing of the application or module just
make sure wether it is stable enough to start testing. Mostly used as a bench mark to gather the
readiness of the application for automated testing

28. How do we do calculation testing in banking ferm?

29. What is the Difference Between Rational Robot & WinRunner ?


-> Winrunner is just a functional Tool where as Robot, we can use it for both functional (GUI) and
performance(VU).-> WR has 4 check points where as Robot has 13 verification points.

30. What is the testing process?


Verifying that an input data produce the expected output.

31. What is the difference between testing and quality assurance (QA)?
This question is surprisingly popular. However, the answer is quite simple. The goals of both are
different: The goal of testing is to find the errors. The goal of QA is to prevent the errors in the
program.

32. Difference between QA and QC?


simple definitions are: QA:assurance for process control.here we r going to follow certain quality
standards and strive for process improvement.we r not going to deal with product.the intension is
to follow good quality standards.if we follow these automatically we are going to produce
better/best

33. what is the difference between retest and regression testing?


hello friends regarding retesting and regression testing this is very important interview question
which is asked for every one of us.so as far as my knowledge.retesting:if any modifications r done
in the application then testing that particular unit is retesting.regression testing

34. What is the difference between bug priority & bug severity?
HiPrority : Urgency Of the BugSeverity : Impact of the Bug

35. What kinds of testing do you know? What is it system testing? What is it integration
testing? What is
You theoretical background and home work may shine in this question. System testing is a
testing of the entire system as a whole. This is what user see and feels about the product you

51

provide. Integration testing is the testing of integration of different modules of the system. Usually,
the integration

36. What is a bug? What types of bugs do you know?


Bug is a error during execution of the program. There are two types of bugs: syntax and logical.

37. What is the difference between structural and functional testing?


Structural is a "white box" testing and based on the algorithm or code. Functional testing is a
"black box" (behavioral) testing where the tester verifies the functional specification.

38. What is defect density?


defect density = Total number of defects/LOCHere the Total number of defects include the
defects from Review and from the customer also

39. How would you test a mug (chair/table/gas station etc.)?


First of all you must demand requirements and functional specification and design document of
the mug. There will find requirements like ability to hold hot water, waterproof, stability, break
ability and so on. Then you should test the mug according to all documents.

40. What is considered a successful test?


A test that discovered more errors. The whole purpose of testing process is to discover as many
bugs and errors as possible. Test that covers more functionality and discovers more errors in
your software product, therefore considered more successful.

41. What bug tracking system did you use?


Again and again, it does not matter what bug tracking system did you use if you made your
homework and invented the name of such or mentioned a standard one. You may say you've
used proprietary bug tracking system (works especially well if you previous company was this
way or another dealing with databases)

42. When does testing begin - requirements, plan, design, code / testing phase?
Obviously Testing will begins in requirement phase.

43. Could you test a program 100%? 90%? Why?


Definitely not! The major problem with testing that you cannot calculate how many error are in the
code, functioning etc. There are many factors involved such as experience of programmer,
complexity of the system etc.

52

44. What is the difference between testing and debugging?


Big difference is that debugging is conducted by a programmer and the programmer fix the errors
during debugging phase. Tester never fixes the errors, but rather find them and return to
programmer.

45. How would you conduct your test?


Each test is based on the technical requirements of the software product.

46. Have you used automatic testing tools. Which ones?


If you never have seen automation tools before, do not try to fool around the interviewer. You
produce a bad impression when "caught" on lying to the interviewer. However, if you ever used
the automation tools, it would be a huge advantage for us to mention them even if those tools
were proprietary automation

47. How would you build a test with WinRunner? Rational Visual Test?
First of all, see the comments to the previous question. Then, all automation testing tools I ever
heard of have a GUI recorder which allows you to record the basic user interactions with the
software underneath. Then, you manually update your initial script to suit your needs. You must
know scripting

48. What is considered a good test?


Good test is a test covering most of the object's functionality.

49. How would you conduct a test: top-down or down-top? What is it? Which one is
better?
Down-Top: unit -> interface -> system. Top-Down is a vice versa. You may use both, but downtop allows to discover malfunctioning at earlier phases of development and cheaper to fix than in
the case of top-down.

50. How to develop a test plan ? How to develop a test case?


Test plan consists of test cases. Test cases you develop according to requirement and design
documents of the unit, system etc. You may be asked what would you do if you are not provided
with requirements documents. Then, you start creating your test cases based on functionality of
the system. You should

53

51. How do you see a QA role in the product development life cycle?
QA should be involved in early stages of the development process in order to create an adequate
test cases and better general understanding of the system. QA, however, must be separated from
the development team to ensure that there is no influence of developers on QA engineers. As a
last resort before

52. What is the size of your executable?


10MB. Who cares? You should demonstrate that you can't be caught with unexpected questions.
This question is one of the dumbest, but you must react accordingly. Tell any reasonable number
you want, but be careful not to exaggerate!

53. What version of Oracle database did you use?


Homework. Tell any version number you want - not many interviewers know the difference at
version level. However, do not tell any numbers if you never worked with Oracle!

54. How would you execute a SQL query in Oracle 8?


Again, if you ever worked with Oracle, this question should be trivial for you to answer (from
command prompt, of course) If you never worked with Oracle, note politely that you did not touch
an Oracle database on your career path.

55. What version of OS were you using?


Tell whatever you want - you can't be caught here. Popular answers are Windows 95/98,
Windows 2000 (make sure you know various flavors) and various Unix flavors (AIX, Solaris,
SunOS, HPUX etc.)

56. Have you tested front-end of back-end?


In other word you are asked if you tested GUI part of the application or server part of your
application.

57. What was the most difficult problem you ever found while testing?
This is homework. Think about one and give it as an example.

58. What were you responsible to test in your previous company?


This is homework for you. Actually, this question is a test of the knowledge of your own resume.
You must know your real or fake resume as a bible. Practice in front of mirror or ask you

54

59. Why do you like to test?


You enjoy bug hunting process, feel great being between developers and customers, your
background and experience are targeting the testing techniques enhancements and you feel
proud of your contribution to the whole development process.

60. What role do you see yourself in 2-3 years from now? Would you want to become a
developer?
You should not concentrate the attention of the interviewer on your wish to become a developer.
You are being hired for testing role and you should demonstrate reliability. Team lead of QA team
is OK, but do not answer yes when asked if you are willing to become a developer.

1. What is testing?
Software Testing can be defined as: Testing is an activity that helps in finding out
bugs/defects/errors in a software system under development, in order to provide a bug free and
reliable system/solution to the customer.
In other words, you can consider an example as: suppose you are a good cook and are expecting
some guests at dinner. You start making dinner; you make few very very very delicious dishes
(off-course, those which you already know how to make). And finally, when you are about to finish
making the dishes, you ask someone (or you yourself) to check if everything is fine and there is
no extra salt/chili/anything, which if is not in balance, can ruin your evening (This is what called
'TESTING').
This procedure you follow in order to make it sure that you do not serve your guests something
that is not tasty! Otherwise your collar will go down and you will regret over your failure!

2. Why we go for testing?


Well, while making food, its ok to have something extra, people might understand and eat the
things you made and may well appreciate your work. But this isn't the case with Software Project
Development. If you fail to deliver a reliable, good and problem free software solution, you fail in
your project and probably you may loose your client. This can get even worse!
So in order to make it sure, that you provide your client a proper software solution, you go for
TESTING. You check out if there is any problem, any error in the system, which can make
software unusable by the client. You make software testers test the system and help in finding out

55

the bugs in the system to fix them on time. You find out the problems and fix them and again try
to find out all the potential problems.

3. Why there is need of testing?


OR

Why there is a need of 'independent/separate testing'?


This is a right question because, prior to the concept of TESTING software as a Testing Project,
the testing process existed, but the developer(s) did that at the time of development.
But you must know the fact that, if you make something, you hardly feel that there can be
something wrong with what you have developed. It's a common trait of human nature, we feel
that there is no problem in our designed system as we have developed it and it is perfectly
functional and fully working. So the hidden bugs or errors or problems of the system remain
hidden and they raise their head when the system goes into production.
On the other hand, its a fact that, when one person starts checking something which is made by
some other person, there are 99% chances that checker/observer will find some problem with the
system (even if the problem is with some spelling that by mistake has been written in wrong
way.). Really weird, isn't it? But thats a truth!
Even though its wrong in terms of human behavior, this thing has been used for the benefit of
software projects (or you may say, any type of project). When you develop something, you give it
to get checked (TEST) and to find out any problem, which never aroused while development of
the system. Because, after all, if you could minimize the problems with the system you
developed, its beneficial for yourself. Your client will be happy if your system works without any
problem and will generate more revenues for you.

4. What is the role of "a tester"?


A tester is a person who tries to find out all possible errors/bugs in the system with the help of
various inputs to it. A tester plays an important part in finding out the problems with system and
helps in improving its quality.
If you could find all the bugs and fix them all, your system becomes more and more reliable.

56

A tester has to understand the limits, which can make the system break and work abruptly. The
more number of VALID BUGS tester finds out, the better tester he/she is!
As a tester tests an application and if he/she finds any defect, the life cycle of the defect starts
and it becomes very important to communicate the defect to the developers in order to get it
fixed, keep track of current status of the defect, find out if any such defect (similar defect) was
ever found in last attempts of testing etc. For this purpose, previously manually created
documents were used, which were circulated to everyone associated with the software project
(developers and testers), now a days many Bug Reporting Tools are available, which help in
tracking and managing bugs in an effective way.

How to report a bug?


Its a good practice to take screen shots of execution of every step during software testing. If any
test case fails during execution, it needs to be failed in the bug-reporting tool and a bug has to be
reported/logged for the same. The tester can choose to first report a bug and then fail the test
case in the bug-reporting tool or fail a test case and report a bug. In any case, the Bug ID that is
generated for the reported bug should be attached to the test case that is failed.
At the time of reporting a bug, all the mandatory fields from the contents of bug (such as Project,
Summary, Description, Status, Detected By, Assigned To, Date Detected, Test Lead, Detected in
Version, Closed in Version, Expected Date of Closure, Actual Date of Closure, Severity, Priority
and Bug ID etc.) are filled and detailed description of the bug is given along with the expected
and actual results. The screen-shots taken at the time of execution of test case are attached to
the bug for reference by the developer.
After reporting a bug, a unique Bug ID is generated by the bug-reporting tool, which is then
associated with the failed test case. This Bug ID helps in associating the bug with the failed test
case.
After the bug is reported, it is assigned a status of New, which goes on changing as the bug
fixing process progresses.
If more than one tester are testing the software application, it becomes a possibility that some
other tester might already have reported a bug for the same defect found in the application. In
such situation, it becomes very important for the tester to find out if any bug has been reported for
similar type of defect. If yes, then the test case has to be blocked with the previously raised bug

57

(in this case, the test case has to be executed once the bug is fixed). And if there is no such bug
reported previously, the tester can report a new bug and fail the test case for the newly raised
bug.
If no bug-reporting tool is used, then in that case, the test case is written in a tabular manner in a
file with four columns containing Test Step No, Test Step Description, Expected Result and
Actual Result. The expected and actual results are written for each step and the test case is failed
for the step at which the test case fails.
This file containing test case and the screen shots taken are sent to the developers for reference.
As the tracking process is not automated, it becomes important keep updated information of the
bug that was raised till the time it is closed.
(Please Note: The above given procedure of reporting a bug is general and not based on any
particular project. Most of the times, the bug reporting procedures, values used for the various
fields used at the time of reporting a bug and bug tracking system etc. may change as par the
software testing project and company requirements.)

What makes a good Software Test engineer?


A good test engineer has a 'test to break' attitude, an ability to take the point of view of the
customer, a strong desire for quality, and an attention to detail. Tact and diplomacy are useful in
maintaining a cooperative relationship with developers, and an ability to communicate with both
technical (developers) and non-technical (customers, management) people is useful. Previous
software development experience can be helpful as it provides a deeper understanding of the
software development process, gives the tester an appreciation for the developers' point of view,
and reduce the learning curve in automated test tool programming. Judgement skills are needed
to assess high-risk areas of an application on which to focus testing efforts when time is limited.
What makes a good Software QA engineer?
The same qualities a good tester has are useful for a QA engineer. Additionally, they must be
able to understand the entire software development process and how it can fit into the business
approach and goals of the organization. Communication skills and the ability to understand
various sides of issues are important. In organizations in the early stages of implementing QA
processes, patience and diplomacy are especially needed. An ability to find problems as well as
to see 'what's missing' is important for inspections and reviews.
What makes a good QA or Test manager?
A good QA, test, or QA/Test(combined) manager should:

58

be familiar with the software development process

be able to maintain enthusiasm of their team and promote a positive atmosphere, despite
what is a somewhat 'negative' process (e.g., looking for or preventing problems)

be able to promote teamwork to increase productivity

be able to promote cooperation between software, test, and QA engineers

have the diplomatic skills needed to promote improvements in QA processes

have the ability to withstand pressures and say 'no' to other managers when quality is
insufficient or QA processes are not being adhered to

have people judgement skills for hiring and keeping skilled personnel

be able to communicate with technical and non-technical people, engineers, managers,

and customers.
be able to run meetings and keep them focused

What's the role of documentation in QA?


Critical. (Note that documentation can be electronic, not necessarily paper, may be embedded in
code comments, etc.) QA practices should be documented such that they are repeatable.
Specifications, designs, business rules, inspection reports, configurations, code changes, test
plans, test cases, bug reports, user manuals, etc. should all be documented in some form. There
should ideally be a system for easily finding and obtaining information and determining what
documentation will have a particular piece of information. Change management for
documentation should be used if possible.
What's the big deal about 'requirements'?
One of the most reliable methods of ensuring problems, or failure, in a large, complex software
project is to have poorly documented requirements specifications. Requirements are the details
describing an application's externally-perceived functionality and properties. Requirements should
be clear, complete, reasonably detailed, cohesive, attainable, and testable. A non-testable
requirement would be, for example, 'user-friendly' (too subjective). A testable requirement would
be something like 'the user must enter their previously-assigned password to access the
application'. Determining and organizing requirements details in a useful and efficient way can be
a difficult effort; different methods are available depending on the particular project. Many books
are available that describe various approaches to this task.
Care should be taken to involve ALL of a project's significant 'customers' in the requirements
process. 'Customers' could be in-house personnel or out, and could include end-users, customer
acceptance testers, customer contract officers, customer management, future software
maintenance engineers, salespeople, etc. Anyone who could later derail the project if their
expectations aren't met should be included if possible.
Organizations vary considerably in their handling of requirements specifications. Ideally, the
requirements are spelled out in a document with statements such as 'The product shall.....'.

59

'Design' specifications should not be confused with 'requirements'; design specifications should
be traceable back to the requirements.
In some organizations requirements may end up in high level project plans, functional
specification documents, in design documents, or in other documents at various levels of detail.
No matter what they are called, some type of documentation with detailed requirements will be
needed by testers in order to properly plan and execute tests. Without such documentation, there
will be no clear-cut way to determine if a software application is performing correctly.
'Agile' methods such as XP use methods requiring close interaction and cooperation between
programmers and customers/end-users to iteratively develop requirements. In the XP 'test first'
approach developmers create automated unit testing code before the application code, and these
automated unit tests essentially embody the requirements.
What steps are needed to develop and run software tests?
The following are some of the steps to consider:

Obtain requirements, functional design, and internal design specifications and other
necessary documents

Obtain budget and schedule requirements

Determine project-related personnel and their responsibilities, reporting requirements,


required standards and processes (such as release processes, change processes, etc.)

Determine project context, relative to the existing quality culture of the organization and
business, and how it might impact testing scope, aproaches, and methods.

Identify application's higher-risk aspects, set priorities, and determine scope and
limitations of tests

Determine test approaches and methods - unit, integration, functional, system, load,
usability tests, etc.

Determine test environment requirements (hardware, software, communications, etc.)

Determine testware requirements (record/playback tools, coverage analyzers, test


tracking, problem/bug tracking, etc.)

Determine test input data requirements

Identify tasks, those responsible for tasks, and labor requirements

Set schedule estimates, timelines, milestones

Determine input equivalence classes, boundary value analyses, error classes

Prepare test plan document and have needed reviews/approvals

Write test cases

Have needed reviews/inspections/approvals of test cases

Prepare test environment and testware, obtain needed user manuals/reference


documents/configuration guides/installation guides, set up test tracking processes, set up
logging and archiving processes, set up or obtain test input data

Obtain and install software releases

60

Perform tests

Evaluate and report results

Track problems/bugs and fixes

Retest as needed

Maintain and update test plans, test cases, test environment, and testware through life
cycle

What's a 'test plan'?


A software project test plan is a document that describes the objectives, scope, approach, and
focus of a software testing effort. The process of preparing a test plan is a useful way to think
through the efforts needed to validate the acceptability of a software product. The completed
document will help people outside the test group understand the 'why' and 'how' of product
validation. It should be thorough enough to be useful but not so thorough that no one outside the
test group will read it. The following are some of the items that might be included in a test plan,
depending on the particular project:

Title

Identification of software including version/release numbers

Revision history of document including authors, dates, approvals

Table of Contents

Purpose of document, intended audience

Objective of testing effort

Software product overview

Relevant related document list, such as requirements, design documents, other test
plans, etc.

Relevant standards or legal requirements

Traceability requirements

Relevant naming conventions and identifier conventions

Overall software project organization and personnel/contact-info/responsibilties

Test organization and personnel/contact-info/responsibilities

Assumptions and dependencies

Project risk analysis

Testing priorities and focus

Scope and limitations of testing

Test outline - a decomposition of the test approach by test type, feature, functionality,
process, system, module, etc. as applicable

Outline of data input equivalence classes, boundary value analysis, error classes

Test environment - hardware, operating systems, other required software, data


configurations, interfaces to other systems

Test environment validity analysis - differences between the test and production systems
and their impact on test validity.

Test environment setup and configuration issues

61

Software migration processes

Software CM processes

Test data setup requirements

Database setup requirements

Outline of system-logging/error-logging/other capabilities, and tools such as screen


capture software, that will be used to help describe and report bugs

Discussion of any specialized software or hardware tools that will be used by testers to
help track the cause or source of bugs

Test automation - justification and overview

Test tools to be used, including versions, patches, etc.

Test script/test code maintenance processes and version control

Problem tracking and resolution - tools and processes

Project test metrics to be used

Reporting requirements and testing deliverables

Software entrance and exit criteria

Initial sanity testing period and criteria

Test suspension and restart criteria

Personnel allocation

Personnel pre-training needs

Test site/location

Outside test organizations to be utilized and their purpose, responsibilties, deliverables,


contact persons, and coordination issues

Relevant proprietary, classified, security, and licensing issues.

Open issues
Appendix - glossary, acronyms, etc.

What's a 'test case'?

A test case is a document that describes an input, action, or event and an expected
response, to determine if a feature of an application is working correctly. A test case
should contain particulars such as test case identifier, test case name, objective, test
conditions/setup, input data requirements, steps, and expected results.

Note that the process of developing test cases can help find problems in the
requirements or design of an application, since it requires completely thinking through the
operation of the application. For this reason, it's useful to prepare test cases early in the
development cycle if possible.

What should be done after a bug is found?


The bug needs to be communicated and assigned to developers that can fix it. After the problem
is resolved, fixes should be re-tested, and determinations made regarding requirements for
regression testing to check that fixes didn't create problems elsewhere. If a problem-tracking

62

system is in place, it should encapsulate these processes. A variety of commercial problemtracking/management software tools are available :

Complete information such that developers can understand the bug, get an idea of it's
severity, and reproduce it if necessary.

Bug identifier (number, ID, etc.)

Current bug status (e.g., 'Released for Retest', 'New', etc.)

The application name or identifier and version

The function, module, feature, object, screen, etc. where the bug occurred

Environment specifics, system, platform, relevant hardware specifics

Test case name/number/identifier

One-line bug description

Full bug description

Description of steps needed to reproduce the bug if not covered by a test case or if the
developer doesn't have easy access to the test case/test script/test tool

Names and/or descriptions of file/data/messages/etc. used in test

File excerpts/error messages/log file excerpts/screen shots/test tool logs that would be
helpful in finding the cause of the problem

Severity estimate (a 5-level range such as 1-5 or 'critical'-to-'low' is common)

Was the bug reproducible?

Tester name

Test date

Bug reporting date

Name of developer/group/organization the problem is assigned to

Description of problem cause

Description of fix

Code section/file/module/class/method that was fixed

Date of fix

Application version that contains the fix

Tester responsible for retest

Retest date

Retest results

Regression testing requirements

Tester responsible for regression tests


Regression testing results

A reporting or tracking process should enable notification of appropriate personnel at various


stages. For instance, testers need to know when retesting is needed, developers need to know
when bugs are found and how to get the needed information, and reporting/summary capabilities
are needed for managers.
What is 'configuration management'?

63

Configuration management covers the processes used to control, coordinate, and track: code,
requirements,
documentation,
problems,
change
requests,
designs,
tools/compilers/libraries/patches, changes made to them, and who makes the changes.
What if the software is so buggy it can't really be tested at all?
The best bet in this situation is for the testers to go through the process of reporting whatever
bugs or blocking-type problems initially show up, with the focus being on critical bugs. Since this
type of problem can severely affect schedules, and indicates deeper problems in the software
development process (such as insufficient unit testing or insufficient integration testing, poor
design, improper build or release procedures, etc.) managers should be notified, and provided
with some documentation as evidence of the problem.
How can it be known when to stop testing?
This can be difficult to determine. Many modern software applications are so complex, and run in
such an interdependent environment, that complete testing can never be done. Common factors
in deciding when to stop are:

Deadlines (release deadlines, testing deadlines, etc.)

Test cases completed with certain percentage passed

Test budget depleted

Coverage of code/functionality/requirements reaches a specified point

Bug rate falls below a certain level


Beta or alpha testing period ends

What if there isn't enough time for thorough testing?


Use

risk

analysis

to

determine

where

testing

should

be

focused.

Since it's rarely possible to test every possible aspect of an application, every possible
combination of events, every dependency, or everything that could go wrong, risk analysis is
appropriate to most software development projects. This requires judgement skills, common
sense, and experience. (If warranted, formal methods are also available.) Considerations can
include:

Which functionality is most important to the project's intended purpose?

Which functionality is most visible to the user?

Which functionality has the largest safety impact?

Which functionality has the largest financial impact on users?

Which aspects of the application are most important to the customer?

Which aspects of the application can be tested early in the development cycle?

Which parts of the code are most complex, and thus most subject to errors?

Which parts of the application were developed in rush or panic mode?

64

Which aspects of similar/related previous projects caused problems?

Which aspects of similar/related previous projects had large maintenance expenses?

Which parts of the requirements and design are unclear or poorly thought out?

What do the developers think are the highest-risk aspects of the application?

What kinds of problems would cause the worst publicity?

What kinds of problems would cause the most customer service complaints?

What kinds of tests could easily cover multiple functionalities?


Which tests will have the best high-risk-coverage to time-required ratio?

What if the project isn't big enough to justify extensive testing?


Consider the impact of project errors, not the size of the project. However, if extensive testing is
still not justified, risk analysis is again needed and the same considerations as described
previously in 'What if there isn't enough time for thorough testing?' apply. The tester might then
do ad hoc testing, or write up a limited test plan based on the risk analysis.
How does a client/server environment affect testing?
Client/server applications can be quite complex due to the multiple dependencies among clients,
data communications, hardware, and servers, especially in multi-tier systems. Thus testing
requirements can be extensive. When time is limited (as it usually is) the focus should be on
integration and system testing. Additionally, load/stress/performance testing may be useful in
determining client/server application limitations and capabilities. There are commercial tools to
assist with such testing.
How can World Wide Web sites be tested?
Web sites are essentially client/server applications - with web servers and 'browser' clients.
Consideration should be given to the interactions between html pages, TCP/IP communications,
Internet connections, firewalls, applications that run in web pages (such as applets, javascript,
plug-in applications), and applications that run on the server side (such as cgi scripts, database
interfaces, logging applications, dynamic page generators, asp, etc.). Additionally, there are a
wide variety of servers and browsers, various versions of each, small but sometimes significant
differences between them, variations in connection speeds, rapidly changing technologies, and
multiple standards and protocols. The end result is that testing for web sites can become a major
ongoing effort. Other considerations might include:

What are the expected loads on the server (e.g., number of hits per unit time?), and what
kind of performance is required under such loads (such as web server response time,
database query response times). What kinds of tools will be needed for performance
testing (such as web load testing tools, other tools already in house that can be adapted,
web robot downloading tools, etc.)?

65

Who is the target audience? What kind of browsers will they be using? What kind of
connection speeds will they by using? Are they intra- organization (thus with likely high
connection speeds and similar browsers) or Internet-wide (thus with a wide variety of
connection speeds and browser types)?

What kind of performance is expected on the client side (e.g., how fast should pages
appear, how fast should animations, applets, etc. load and run)?

Will down time for server and content maintenance/upgrades be allowed? how much?

What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what
is it expected to do? How can it be tested?

How reliable are the site's Internet connections required to be? And how does that affect
backup system or redundant connection requirements and testing?

What processes will be required to manage updates to the web site's content, and what
are the requirements for maintaining, tracking, and controlling page content, graphics,
links, etc.?

Which HTML specification will be adhered to? How strictly? What variations will be
allowed for targeted browsers?

Will there be any standards or requirements for page appearance and/or graphics
throughout a site or parts of a site??

How will internal and external links be validated and updated? how often?

Can testing be done on the production system, or will a separate test system be
required? How are browser caching, variations in browser option settings, dial-up
connection variabilities, and real-world internet 'traffic congestion' problems to be
accounted for in testing?

How extensive or customized are the server logging and reporting requirements; are they
considered an integral part of the system and do they require testing?

How are cgi programs, applets, javascripts, ActiveX components, etc. to be maintained,
tracked, controlled, and tested?

Pages should be 3-5 screens max unless content is tightly focused on a single topic. If
larger, provide internal links within the page.

The page layouts and design elements should be consistent throughout a site, so that it's
clear to the user that they're still within a site.

Pages should be as browser-independent as possible, or pages should be provided or


generated based on the browser-type.

All pages should have links external to the page; there should be no dead-end pages.

The page owner, revision date, and a link to a contact person or organization should be
included on each page.

How is testing affected by object-oriented designs?


Well-engineered object-oriented design can make it easier to trace from code to internal design to
functional design to requirements. While there will be little affect on black box testing (where an
understanding of the internal design of the application is unnecessary), white-box testing can be

66

oriented to the application's objects. If the application was well-designed this can simplify test
design.
What

is

Extreme

Programming

and

what's

it

got

to

do

with

testing?

Extreme Programming (XP) is a software development approach for small teams on risk-prone
projects with unstable requirements. It was created by Kent Beck who described the approach in
his book 'Extreme Programming Explained'. Testing ('extreme testing') is a core aspect of
Extreme Programming. Programmers are expected to write unit and functional test code first before writing the application code. Test code is under source control along with the rest of the
code. Customers are expected to be an integral part of the project team and to help develope
scenarios for acceptance/black box testing. Acceptance tests are preferably automated, and are
modified and rerun for each of the frequent development iterations. QA and test personnel are
also required to be an integral part of the project team. Detailed requirements documentation is
not used, and frequent re-scheduling, re-estimating, and re-prioritizing is expected. For more info
on XP and other 'agile' software development approaches (Scrum, Crystal, etc.).

67

Software Testing - Bug and Statuses Used During A Bug Life Cycle
Find out what a bug or error is called in software testing and what are the various statuses used
for the bug during a bug life cycle.

The main purpose behind any Software Development process is to provide the client (Final/End
User of the software product) with a complete solution (software product), which will help him in
managing his business/work in cost effective and efficient way. A software product developed is
considered successful if it satisfies all the requirements stated by the end user.
Any software development process is incomplete if the most important phase of Testing of the
developed product is excluded. Software testing is a process carried out in order to find out and
fix previously undetected bugs/errors in the software product. It helps in improving the quality of
the software product and make it secure for client to use.

What is a bug/error?
A bug or error in software product is any exception that can hinder the functionality of either the
whole software or part of it.

How do I find out a BUG/ERROR?


Basically, test cases/scripts are run in order to find out any unexpected behavior of the software
product under test. If any such unexpected behavior or exception occurs, it is called as a bug.

What is a Test Case?


A test case is a noted/documented set of steps/activities that are carried out or executed on the
software in order to confirm its functionality/behavior to certain set of inputs.

What do I do if I find a bug/error?


In normal terms, if a bug or error is detected in a system, it needs to be communicated to the
developer in order to get it fixed.
Right from the first time any bug is detected till the point when the bug is fixed and closed, it is
assigned various statuses which are New, Open, Postpone, Pending Retest, Retest, Pending
Reject, Reject, Deferred, and Closed.

68

(Please note that there are various ways to communicate the bug to the developer and track the
bug status)

Statuses associated with a bug:


New:
When a bug is found/revealed for the first time, the software tester communicates it to his/her
team leader (Test Leader) in order to confirm if that is a valid bug. After getting confirmation from
the Test Lead, the software tester logs the bug and the status of New is assigned to the bug.

Assigned:
After the bug is reported as New, it comes to the Development Team. The development team
verifies if the bug is valid. If the bug is valid, development leader assigns it to a developer to fix it
and a status of Assigned is assigned to it.

Open:
Once the developer starts working on the bug, he/she changes the status of the bug to Open to
indicate that he/she is working on it to find a solution.

Fixed:
Once the developer makes necessary changes in the code and verifies the code, he/she marks
the bug as Fixed and passes it over to the Development Lead in order to pass it to the Testing
team.

Pending Retest:
After the bug is fixed, it is passed back to the testing team to get retested and the status of
Pending Retest is assigned to it.

Retest:
The testing team leader changes the status of the bug, which is previously marked with Pending
Retest to Retest and assigns it to a tester for retesting.

Closed:
After the bug is assigned a status of Retest, it is again tested. If the problem is solved, the tester
closes it and marks it with Closed status.

Reopen:
If after retesting the software for the bug opened, if the system behaves in the same way or same

69

bug arises once again, then the tester reopens the bug and again sends it back to the developer
marking its status as Reopen.

Pending Rejected:
If the developers think that a particular behavior of the system, which the tester reports as a bug
has to be same and the bug is invalid, in that case, the bug is rejected and marked as Pending
Reject.

Rejected:
If the Testing Leader finds that the system is working according to the specifications or the bug is
invalid as per the explanation from the development, he/she rejects the bug and marks its status
as Rejected.

Postponed:
Sometimes, testing of a particular bug has to be postponed for an indefinite period. This situation
may occur because of many reasons, such as unavailability of Test data, unavailability of
particular functionality etc. That time, the bug is marked with Postponed status.

Deferred:
In some cases a particular bug stands no importance and is needed to be/can be avoided, that
time it is marked with Deferred status.

70

Software Quality Assurance


The project had a very high cost of testing. After going in detail, someone found out that the
testers are spending their time on software that doesnt have too many defects. How will you
make sure that this is correct?
What are the disadvantages of overtesting?
What happens to the test plan if the application has a functionality not mentioned in the
requirements?
You are given two scenarios to test. Scenario 1 has only one terminal for entry and processing
whereas scenario 2 has several terminals where the data input can be made. Assuming that
the processing work is the same, what would be the specific tests that you would perform in
Scenario 2, which you would not carry on Scenario 1?
Your customer does not have experience in writing Acceptance Test Plan. How will you do that in
coordination with customer? What will be the contents of Acceptance Test Plan?
How do you know when to stop testing?
What can you do if the requirements are changing continuously?
What is the need for Test Planning?
What are the various status reports you will generate to Developers and Senior Management?
Define and explain any three aspects of code review?
Why do you need test planning?
Explain 5 risks in an e-commerce project. Identify the personnel that must be involved in the risk
analysis of a project and describe their duties. How will you prioritize the risks?
What are the various status reports that you need generate for Developers and Senior
Management?
You have been asked to design a Defect Tracking system. Think about the fields you would
specify in the defect tracking system?
Write a sample Test Policy?
Explain the various types of testing after arranging them in a chronological order?

71

Explain what test tools you will need for client-server testing and why?
Explain what test tools you will need for Web app testing and why?
Explain pros and cons of testing done development team and testing by an independent team?
Differentiate Validation and Verification?
Explain Stress, Load and Performance testing?
Describe automated capture/playback tools and list their benefits?
How can software QA processes be implemented without stifling productivity?
How is testing affected by object-oriented designs?
What is extreme programming and what does it have to do with testing?
Write a test transaction for a scenario where 6.2% of tax deduction for the first $62,000 of income
has to be done?
What would be the Test Objective for Unit Testing? What are the quality measurements to assure
that unit testing is complete?
Prepare a checklist for the developers on Unit Testing before the application comes to testing
department.
Draw a pictorial diagram of a report you would create for developers to determine project status.
Draw a pictorial diagram of a report you would create for users and management to determine
project status.
What 3 tools would you purchase for your company for use in testing? Justify the need?
Put the following concepts, put them in order, and provide a brief description of each:
system testing
acceptance testing
unit testing
integration testing

72

benefits realization testing


What are two primary goals of testing?
If your company is going to conduct a review meeting, who should be on the review committe and
why?
Write any three attributes which will impact the Testing Process?
What activity is done in Acceptance Testing, which is not done in System testing?
You are a tester for testing a large system. The system data model is very large with many
attributes and there are a lot of inter-dependencies within the fields. What steps would you
use to test the system and also what are the effects of the steps you have taken on the test
plan?
Explain and provide examples for the following black box techniques?
Boundary Value testing
Equivalence testing
Error Guessing
What are the product standards for?
Test Plan
Test Script and Test Report
You are the test manager starting on system testing. The development team says that due to a
change in the requirements, they will be able to deliver the system for SQA 5 days past the
deadline. You cannot change the resources (work hours, days, or test tools). What steps will
you take to be able to finish the testing in time?
Your company is about to roll out an e-commerce application. Its not possible to test the
application on all types of browsers on all platforms and operating systems. What steps
would you take in the testing environment to reduce the business risks and commercial risks?
In your organization, testers are delivering code for system testing without performing unit testing.
Give an example of test policy:
Policy statement

73

Methodology
Measurement
Testers in your organization are performing tests on the deliverables even after significant defects
have been found. This has resulted in unnecessary testing of little value, because re-testing
needs to be done after defects have been rectified. You are going to update the test plan with
recommendations on when to halt testing. Wwhat recommendations are you going to make?
How do you measure:
Test Effectiveness
Test Efficiency
You found out the senior testers are making more mistakes then junior testers; you need to
communicate this aspect to the senior tester. Also, you dont want to lose this tester. How
should one go about constructive criticism?
You are assigned to be the test lead for a new program that will automate take-offs and landings
at an airport. How would you write a test strategy for this new program?

74

WINRUNNER

1. PLz tell me any another function in winnrunner for file comparison except
file_compare(,,)?. Or give

2. what is object repository


The collection of objects is called object repository.for example.text box, calender, button etc.

3. Is it passible in winnrunner to handle result dir path through winnrunner script?


Yes its possible to handle a results directory in winrunner.

4. How do you parse xml?what tool do u use?


Winrunner is not support to XML. QTP is supported to XML. In QTP two types of chackpoints are
there one is web Xml chackpoint, document chackpoint.

5. How to recognise the objects during runtime in new build version (test suite)
comparing with old guim
Update GUI map file by teaching the Winrunner the new objects in the application while it is
running.

6. sample code: wait(20)what is the minimum and maximum time the above mentioned
synchronization statements
The maximum time is 20 seconds and the minimum time is one second

7. Where in the user-defined function library should a new error code be defined?1.At the
begining of the

8. In a modular test tree,each test will receive the values for the parameters passed from
the main test.These

9. what is the scripting process in winrunner?


The testing proces in winrunner or In any typicall automation tools is 1. Learning of
objects/Creating Object Repository2. Record the Navigation Flow/Record The User Action3. Edit
Scripts/Placing user Check Points4. Debug Scripts/For Syntax Check5. Run Scripts/Executed
Scripts6. Analyze Results/Compare

75

10. how many scripts can we generate for one project?


Depending on project and application many test scripts can be generated. The number of test
scripts is not fixed.

11. What is the command in Winrunner ti invoke IE Browser?And once I open the IE
browser is there a unique
web_browser_invoke(IE,URL);

12. How do you load default comments into your new script like IDE's?

13. what is the new feature add in qtp 8.0 compare in qtp 6.0
Advanced Key word Driven Auto Documentation Business Process Testing Added Parameters
for parameterization Step Generator for adding programmatic statements with having
programming knowledge. Highlight option in Object Repository Results file in XML format

14. When will you go to automation?


And also depends on interface the application developed. No. of future versions expected and
maturity between the releases.

15. How to recognise the objects during runtime in new build version (test suite)
comparing with old guim
new build version runtime wizard same like a gui

16. what is use of GUI files in winrunner.


GUI files consists of object's physical description( like class,label,MSW class,window).

17. without using the datadriven test, how can we test the application with different set of
inputs?
no

18. How do you load compiled module inside a comiled module?


In the similar way as you do in the main script. Use load command in the compile module
itself.load("path");

19. can u tell me the bug life cycle

76

20. How to find the length of the edit box through WinRunner?
The question is quite ambiguous. Yet, the answer is in 2 fold.1. If you are seeking for length of the
text, then there is length function avialable in winrunner.2. If you are looking for the edit box's (as
a control) length, which is nothing but width, then here is the code:obj_get_info(edit_box, "width"

21. What is file type of winruuner test files , its extension.?

22. what is candidate release??


When a tester has completed the testing of a project and the AUT has been moved to production
environment and been accepted by the stakeholders then the tester is released or signed of from
the project

23. what type of variables can be used with in the TSL function???
tiger Wrote: auto , static public,extern variables.auto: An auto variable can be declared only within
a function and is local to thatfunction. It exists only for as long as the function is running. A new
copy of thevariable is created each time the function is called.static: A static variable is

24. how to test the stored procedure???


You first unit-test each procedure by feeding it appropriate test data, observing the outcome, and
retesting as needed to make sure the bug fixes contain no new errors. Unit-testing a stored
procedure involves a series of test-debug-retest cycles. The number of cycles will depend on your
company's defect

25. WinRunner is suitable for which type of applications?

26. Is it possible to conduct loadtesting with winrunner?I f possible how to test?


SrujanWe can test performnace somehow using winrunner.Using TSL function get_time();

27. What is the framework of winrunner?


Depending on the Project what Architecture we had Designed (Test Automation Architecture For
Winrunner) for the project.We will place all the folders in our centralized repository like this
COMPANYNAME_PROJECTNAME_AUTOMATION this is the main folder and the sub folders
are Ex: Test Data,GUI

28. How WinRunner reads the color of the window/Object?


winrunner cannot read the colour of the objects but it can differentiate between them by bitmap

77

checkpoint and if there is a pixel difference between the images it shows the image where the
difference in images

29. Conduct a Testing Java application Which add-in's Selected in Winrunneer?

30. what is the process of Functionality Testing?


when you do the testing in the project just we can check the functionality how to work the project
here we cant test the code just how it works this module.

31. how to conduct testing in Broken-links using Winrunner?

32. how can we get the day of the week for specific date in winnrunner? is it possible?
time_str([expression]) function will give the day of the week for specific date in winnrunner.I
appreciate your deep and excellence work in winrunner.

33. How do you check thecurrent item value in the list after I open a web page with this list
in WinRunner
list_get_selected ( list, out_item, out_num );will solve the problem that I have.It will return an item
(out_item) and the postion(out_num ) that is currently shown on the list.To check the with the
previous values I can store theprevious values in file and then read it from the filelater to compare

34. how can we remove the data driven wizard script from the existing script ? if there any
settings available
There is no Wizard to remove DDT, you need to remove manually the following
statementsddt_open, ddt_get_row_count, ddt_set_row, ddt_val, ddt_close

35. how to compile a module in winrunner?


Go to File-> Test Properties->General,Select Compiled Module from the Test type list box and
click Apply then OK Button.

36. What are the test case that we go for automate?What is the process that we go while
we are going before

37. What is the use of Framework?


The Template test provides a basic framework of an automated test that navigates through your
application. It opens and closes each window, leaving space for you to add code (through

78

recording or programming) that checks the window WinRunner, Mercury Interactive and the
Mercury Interactive

38. Explain WinRunner testing process?


WinRunner testing process involves six main stages: i. Create GUI Map File so that WinRunner
can recognize the GUI objects in the application being tested ii. Create test scripts by recording,
programming, or a combination of both. While recording tests, insert checkpoints where you want
to check

39. How you will make changes in thousands of automated scripts if interface and
functionality of application
If there are thousands of scripts and a CR forces all the scripts to modify accordingly, it's always
better to create the GUI files again and rerecord the scenarios, where the CRs affects.

40. Write and explain compile module?

41. What does Entry criteria and Exit criteria in the test plan means?
entry criteria: sign off proposal document by the client.exit criteria: sign off of test plan document
by the client (test strategy document)

42. What is the difference between set_window and window_activate?


set_window function is used for giving input to the window.win_activate function is used for the
activate window.Note: In scripts, important to use win_activate function before set_window
function in point of syncronization

43. Given a set_window("main",10); what is the essential of 10? what difference it makes
with synchronizatio
Given a set_window("main",10); what is the essential of 10?Anwer:The meaning of 10 here is
timing for the execution of that statement.If you are using synchronization then the statement is
wait untill the point given by u is not meets but here the statement is using default time

44. In a winRunner script let say we have code sleep(10); set_window("main",5); what will
be the result?

45. what is the difference between winrunner 7.0 version and winrunner 7.5 version.

79

46. A screen with 10 records is displayed, On Clicking of each and every column, it should
sort all the records

47. What do you mean by "Regular Expressions" ? In Real time, where we will use this?
Give me some
While using an web application,if suppose u want to captured filed value that is alphanumeric for
one iteration and numeric for another iteration,so we can't able to check/verify our result whether
the field is alphanumberic/numberic,in this situation we can use regualr expression.Example

48. What do you mean by "Function Decomposition" in winrunner?

49. How to connect to Oracle DB using winrunner


We can also connect using db_connect("ses", "dsn") to get complete control on DB

50. How you will write Test case in Winrunner?


Nobody will write test cases in WinRunner. Just we will write the Test Script for a corresponding
test case. Initially we write all manual test cases. We will write the test scripts for the
corresponding test cases.

51. How cache memory is released in winrunner?


Restart the winrunner.It will help you.

52. Which Type of GUI file is Preferable?


if you are new to winrunner then GUI map file per test is preferable and for advanced users
Global GUI map file is prefered

53. How do you call windows APIs, explain with an example?


LOAD THE DLL WHICH CONTAINS THE FUNCTIONS WHICH U WANT TO USE (EX :
USER32.DLL) DECLARE THE FUNCTION IN UR SCRIPT WITH "EXTERN" KEYWORD. USE
IT WHERE EVER IT IS REQUIRED.

54. Have you used WinRunner in your project?


WinRunner for creating automates scripts for GUI, functional and regression testing of the AUT.

55. How you created you test scripts 1) by recording or 2) programming?


Programming. I have done complete programming only, absolutely no recording.

80

56. Difference Between set_window and win_activate


set_window: specifies the window to receive subsequent input and (optionally)specifies the
amount of time to wait for the specified window.win_activate:The win_activate function makes the
specified window the activewindow by bringing it into focus and raising it to the top of the
display(equivalent to

57. How to make comments in GUI Map File?


make the comment in GUI map file by selecting the statements which you want to comment and
press Ctrl and T.

58. How an Argument is passed in WinRunner


Select File menu / Test Properties, click on Test Parameters Tab then click on Add button to
create a Parameter. You need to pass a value while calling this script.

59. How do you view the results of file comparison?


file_compare(file_1,file_2[,save_file]);

60. What is the difference between script and compile module?


Test script contains the executable file in WinRunner while Compiled Module is used to store
reusable functions. Complied modules are not executable. b. WinRunner performs a precompilation automatically when it saves a module assigned a property value of Compiled
Module. c. By default

61. How do you update your expected results?


help of updating mode

62. why choose winrunner , being it is costly tool ?


it depends on the choice of the end user. If the user feels that the AUT is extensive and could
really benefit from using WR and if there are plenty of Versions/Data Driven Test/Regression
cycles etc and it could be done with minimal user interaction through WR ,they can go for it..

63. Why should we create Framework?

64. What are the contents of Framework?

65. What is the command in winrunner to get dos prompt?


The dos_system function executes a DOS system command from within a WinRunner test script.

81

dos_system ( expression ); Example dos_system("echo dos_system demo > c:demo.tmp"); writes a line to the file .

66. How do you run your script with multiple sets of expected results?
through DDT

67. How do you call a function from external libraries (dll).


if u want call dll file through Winrunner, u should use api controls. it is a special functions

68. How do you store and view batch test results?


To store Batch test result When you run a regular, interactive test, results are stored in a
subfolder under the test. The same is true when a test is called by a batch test. WinRunner saves
the results for each called test separately in a subfolder under the test. A subfolder is also

69. What are the stages in winrunner?


Learning the objects through guimapin the application/Recording/Editing/Running/Analysis of
results/Report the Defects

70. How WinRunner handles varying window labels?


We can handle varying window labels using regular expressions. WinRunner uses two hidden
properties in order to use regular expression in an objects physical description. These properties
are regexp_label and regexp_MSW_class. i. The regexp_label property is used for windows

71. How do you test a web application without opening the webbrowser?
Use Web_Browser_Invoke(IE, URL); to invoke the browser through the test script instead of
opening the application.

72. How do you view and evaluate test results for various check points?
Once the script is executed which has multiple checkpoints, the test results window shows a
detailed information of whether the chekpoint passed or failed.As we know, checkpoints compare
the expected results with the actual results, we can evaluate the result.

73. What is the purpose of step, step into, step out, step to cursor commands for
debugging your scrip
The purpose of the commands are : STEP--> Runs a single lline of the TSL script. STEP INTO-->
Calls and displays another test/user-defined function. STEP OUT-->Used in conjunction to STEP

82

INTO and completes the execution of the called test/user defined function. STEP TO CURSOR->Runs

74. How do you declare external functions in TSL?


External functions are declared using the "extern" declaration that references an external
function. The syntax is: extern (parameter1,parameter2....). type--> refers to the return type of
the function.

75. What is the purpose of tl_step command?


Used to determine whether sections of a test pass or fail. Syntax: tl_step(step_name, status,
description);

76. What is a watch list?


Watch list enables to monitor the values of variables, expressions and arrays while we debug a
test script.

77. What is the purpose of setting a break point?


we can use breakpoints to help debug our test scripts. A breakpoint stops a test run at a specified
line in the test script, or in a specified function. You may want to stop a test run using a
breakpoint in order to: 1.monitor the entries in the Watch List 2.begin stepping through a test
script

78. What is the purpose of load_dll?


Load_dll will help us to load dll into memory and call functions inside the dll

79. Write TSL functions for the following interactive modes: i. Creating a dialog box with
any message you
Answers: 1. Dialog box with any message, and edit field create_input_dialog ( message
); message - Any expression. This expression will appear in the dialog box as a single
line. Return Values - This function returns a string. If no string is found or if the Cancel button is

80. What TSL function you will use to pause your script?
we can also pause the script using pause() command.

81. What is the purpose of Wdiff utility?


WDiff v1.49 utility that displays differences between text files in directories (folders) or zip
archives.

83

82. Write and explain various loop command?


A for loop instructs WinRunner to execute one or more statements a specified number of times. It
has the following syntax: for ( [ expression1 ]; [ expression2 ]; [ expression3 ] ) statement i. First,
expression1 is executed. Next, expression2 is evaluated. If expression2 is true, statement is

83. When it is appropriate to change physical description?


Changing the physical description is necessary when the property value of an object changes.

84. What is contained in the GUI map?


WinRunner stores information it learns about a window or object in a GUI Map. When WinRunner
runs a test, it uses the GUI map to locate objects. It reads an objects description in the GUI map
and then looks for an object with the same properties in the application being tested. Each of
these

85. How does WinRunner recognize objects on the application?


WinRunner uses the GUI Map file to recognize objects on the application. When WinRunner runs
a test, it uses the GUI map to locate objects. It reads an objects description in the GUI map and
then looks for an object with the same properties in the application being tested.

86. Have you created test scripts and what is contained in the test scripts?
It contains the statement in Mercury Interactives Test Script Language (TSL). These statements
appear as a test script in a test window. You can then enhance your recorded test script, either by
typing in additional TSL functions and programming elements

87. How does WinRunner evaluates test results?


Following each test run, WinRunner displays the results in a report. The report details all the
major events that occurred during the run, such as checkpoints, error messages, system
messages, or user messages. If mismatches are detected at checkpoints during the test run, you
can view the expected

88. Have you performed debugging of the scripts?


We can debug the script by executing the script in the debug mode. We can also debug script
using the Step, Step Into, Step out functionalities provided by the WinRunner.

89. How do you run your test scripts?


We run tests in Verify mode to test your application. Each time WinRunner encounters a

84

checkpoint in the test script, it compares the current data of the application being tested to the
expected data captured earlier. If any mismatches are found, WinRunner captures them as actual
results.

90. How do you analyze results and report the defects?


Following each test run, WinRunner displays the results in a report. The report details all the
major events that occurred during the run, such as checkpoints, error messages, system
messages, or user messages. If mismatches are detected at checkpoints during the test run, you
can view the expected

91. What is the use of Test Director software?


TestDirector is Mercury Interactives software test management tool. It helps quality assurance
personnel plan and organize the testing process. With TestDirector you can create a database of
manual and automated tests, build test cycles, run tests, and report and track defects. You can
also

92. How you integrated your automated scripts from TestDirector?


When you work with WinRunner, you can choose to save your tests directly to your TestDirector
database or while creating a test case in the TestDirector we can specify whether the script in
automated or manual. And if it is automated script then TestDirector will build a skeleton for the
script

93. What are the different modes of recording?


There are two type of recording in WinRunner. i. Context Sensitive recording records the
operations you perform on your application by identifying Graphical User Interface (GUI) objects.
ii. Analog recording records keyboard input, mouse clicks, and the precise x- and y-coordinates
traveled by

94. What is the purpose of loading WinRunner Add-Ins?


Add-Ins are used in WinRunner to load functions specific to the particular add-in to the memory.
While creating a script only those functions in the addin selected will be listed in the function
generator and while executing the script only those functions in the loaded add-in will be
executed

95. What are the reasons that WinRunner fails to identify an object on the GUI?
WinRunner fails to identify an object in a GUI due to various reasons. i. The object is not a

85

standard windows object. ii. If the browser used is not compatible with the WinRunner version,
GUI Map Editor will not be able to learn any of the objects displayed in the browser window.

96. What do you mean by the logical name of the object.


An objects logical name is determined by its class. In most cases, the logical name is the label
that appears on an object.

97. If the object does not have a name then what will be the logical name?
If the object does not have a name then the logical name could be the attached text.

98. What is the different between GUI map and GUI map files?
The GUI map is actually the sum of one or more GUI map files. There are two modes for
organizing GUI map files. i. Global GUI Map file: a single GUI Map file for the entire application ii.
GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created.
GUI Map file

99. How do you view the contents of the GUI map?


GUI Map editor displays the content of a GUI Map. We can invoke GUI Map Editor from the Tools
Menu in WinRunner. The GUI Map Editor displays the various GUI Map files created and the
windows and objects learned in to them with their logical name and physical description.

100. When you create GUI map do you record all the objects of specific objects?
If we are learning a window then WinRunner automatically learns all the objects in the window
else we will we identifying those object, which are to be learned in a window, since we will be
working with only those objects while creating scripts.

101. What is the purpose of set_window command?


Set_Window command sets the focus to the specified window. We use this command to set the
focus to the required window before executing tests on a particular window. Syntax:
set_window(<logical name>, time); The logical name is the logical name of the window and time
is the time the execution

102. How do you load GUI map?


We can load a GUI Map by using the GUI_load command. Syntax: GUI_load(<file_name>);

103. What is the disadvantage of loading the GUI maps through start up scripts?
If we are using a single GUI Map file for the entire AUT then the memory used by the GUI Map

86

may be much high. If there is any change in the object being learned then WinRunner will not be
able to recognize the object, as it is not in the GUI Map file loaded in the memory. So we will have
to learn

104. How do you unload the GUI map?


We can use GUI_close to unload a specific GUI Map file or else we call use GUI_close_all
command to unload all the GUI Map files loaded in the memory. Syntax:
GUI_close(<file_name>); or GUI_close_all;

105. What actually happens when you load GUI map?


When we load a GUI Map file, the information about the windows and the objects with their logical
names and physical description are loaded into memory. So when the WinRunner executes a
script on a particular window, it can identify the objects using this information loaded in the
memory.

106. What is the purpose of the temp GUI map file?


While recording a script, WinRunner learns objects and windows by itself. This is actually stored
into the temporary GUI Map file. We can specify whether we have to load this temporary GUI
Map file should be loaded each time in the General Options.

107. What is the extension of gui map file?


The extension for a GUI Map file is .gui.

108. How do you find an object in an GUI map.


The GUI Map Editor is been provided with a Find and Show Buttons. i. To find a particular object
in the GUI Map file in the application, select the object and click the Show window. This blinks the
selected object. ii. To find a particular object in a GUI Map file click the Find button, which gives

109. What different actions are performed by find and show button?
To find a particular object in the GUI Map file in the application, select the object and click the
Show window. This blinks the selected object. To find a particular object in a GUI Map file click
the Find button, which gives the option to select the object. When the object is selected, if the

110. How do you identify which files are loaded in the GUI map?
The GUI Map Editor has a drop down GUI File displaying all the GUI Map files loaded into the
memory.

87

111. How do you modify the logical name or the physical description of the objects in GUI
map?
You can modify the logical name or the physical description of an object in a GUI map file using
the GUI Map Editor.

112. When do you feel you need to modify the logical name?
Changing the logical name of an object is useful when the assigned logical name is not
sufficiently descriptive or is too long.

113. What is the purpose of regexp_label property and regexp_MSW_class property?


The regexp_label property is used for windows only. It operates behind the scenes to insert a
regular expression into a windows label description.The regexp_MSW_class property inserts a
regular expression into an objects MSW_class. It is obligatory for all types of windows

114. How do you suppress a regular expression?


We can suppress the regular expression of a window by replacing the regexp_label property with
label property.

115. How do you copy and move objects between different GUI map files?
We can copy and move objects between different GUI Map files using the GUI Map Editor. The
steps to be followed are: i. Choose Tools > GUI Map Editor to open the GUI Map Editor. ii.
Choose View > GUI Files. iii. Click Expand in the GUI Map Editor. The dialog box expands to
display two GUI

116. How do you select multiple objects during merging the files?
Use the Shift key and/or Control key to select multiple objects. To select all objects in a GUI map
file, choose Edit > Select All.

117. How do you clear a GUI map files?


We can clear a GUI Map file using the Clear All option in the GUI Map Editor.

118. How do you filter the objects in the GUI map?


GUI Map Editor has a Filter option. This provides for filtering with 3 different types of options. i.
Logical name displays only objects with the specified logical name. ii. Physical description
displays only objects matching the specified physical description. Use any substring belonging to
the

88

119. How do you configure GUI map?


When WinRunner learns the description of a GUI object, it does not learn all its properties.
Instead, it learns the minimum number of properties to provide a unique identification of the
object.Many applications also contain custom GUI objects. A custom object is any object not
belonging to one

120. What is the purpose of GUI map configuration?


GUI Map configuration is used to map a custom object to a standard object.

121. How do you make the configuration and mappings permanent?


The mapping and the configuration you set are valid only for the current WinRunner session. To
make the mapping and the configuration permanent, you must add configuration statements to
your startup test script.

122. What is the purpose of GUI spy?


Using the GUI Spy, you can view the properties of any GUI object on your desktop. You use the
Spy pointer to point to an object, and the GUI Spy displays the properties and their values in the
GUI Spy dialog box. You can choose to view all the properties of an object, or only the selected
set of

123. What is the purpose of obligatory and optional properties of the objects?
For each class, WinRunner learns a set of default properties. Each default property is classified
obligatory or optional. i. An obligatory property is always learned (if it exists). ii. An optional
property is used only if the obligatory properties do not provide unique

124. When the optional properties are learned?


An optional property is used only if the obligatory properties do not provide unique identification of
an object.

125. What is the purpose of location indicator and index indicator in GUI map
configuration?
In cases where the obligatory and optional properties do not uniquely identify an object,
WinRunner uses a selector to differentiate between them. Two types of selectors are available: i.
A location selector uses the spatial position of objects.

126. How do you handle custom objects?


A custom object is any GUI object not belonging to one of the standard classes used by

89

WinRunner. WinRunner learns such objects under the generic object class. WinRunner records
operations on custom objects using obj_mouse_ statements. b. If a custom object is similar to a
standard

127. What is the name of custom class in WinRunner and what methods it applies on the
custom objects?
WinRunner learns custom class objects under the generic object class. WinRunner records
operations on custom objects using obj_ statements.

128. In a situation when obligatory and optional both the properties cannot uniquely
identify an object what
In cases where the obligatory and optional properties do not uniquely identify an object,
WinRunner uses a selector to differentiate between them. Two types of selectors are available: i.
A location selector uses the spatial position of objects. ii. An index selector uses a unique number
to identify

129. What is the purpose of different record methods 1) Record 2) Pass up 3) As Object 4)
Ignore.
Record instructs WinRunner to record all operations performed on a GUI object. This is the
default record method for all classes. (The only exception is the static class (static text), for which
the default is Pass Up.) b. Pass Up instructs WinRunner to record an operation performed on this
class

130. How do you find out which is the start up file in WinRunner?
The test script name in the Startup Test box in the Environment tab in the General Options dialog
box is the start up file in WinRunner.

131. What are the virtual objects and how do you learn them?
Applications may contain bitmaps that look and behave like GUI objects. WinRunner records
operations on these bitmaps using win_mouse_click statements. By defining a bitmap as a virtual
object, you can instruct WinRunner to treat it like a GUI object such as a push button, when you
record and run

132. What are the two modes of recording?


There are 2 modes of recording in WinRunner i. Context Sensitive recording records the
operations you perform on your application by identifying Graphical User Interface (GUI)

90

objects.ii. Analog recording records keyboard input, mouse clicks, and the precise x- and ycoordinates traveled by the mouse

133. What is a checkpoint and what are different types of checkpoints?


Checkpoints allow you to compare the current behavior of the application being tested to its
behavior in an earlier version. You can add four types of checkpoints to your test scripts: i. GUI
checkpoints verify information about GUI objects. For example, you can check that a button is
enabled or

134. What are data driven tests?


When you test your application, you may want to check how it performs the same operations with
multiple sets of dat

135. What are the synchronization points?


Synchronization points enable you to solve anticipated timing problems between the test and your
application. For example, if you create a test that opens a database application, you can add a
synchronization point that causes the test to wait until the database records are loaded on the
screen.

136. What is parameterizing?


In order for WinRunner to use data to drive the test, you must link the data to the test script which
it drives. This is called parameterizing your test. The data is stored in a data table.

137. How do you maintain the document information of the test scripts?
Before creating a test, you can document information about the test in the General and
Description tabs of the Test Properties dialog box. You can enter the name of the test author, the
type of functionality tested, a detaileddescription of the test, and a reference to the relevant
functional specifications

138. What do you verify with the GUI checkpoint for single property and what command it
generates, explain
You can check a single property of a GUI object. For example, you can check whether a button is
enabled or disabled or whether an item in a list is selected. To create a GUI checkpoint for a
property value, use the Check Property dialog box to add one of the following functions to the test
script

91

139. What do you verify with the GUI checkpoint for object/window and what command it
generates, explain
You can create a GUI checkpoint to check a single object in the application being tested. You can
either check the object with its default properties or you can specify which properties to check. b.
Creating a GUI Checkpoint using the Default Checks i. You can create a GUI checkpoint that
performs

140. What do you verify with the GUI checkpoint for multiple objects and what command it
generates, explain
To create a GUI checkpoint for two or more objects: i. Choose Create > GUI Checkpoint > For
Multiple Objects or click the GUI Checkpoint for Multiple Objects button on the User toolbar. If you
are recording in Analog mode, press the CHECK GUI FOR MULTIPLE OBJECTS softkey in order
to avoid extraneous

141. What information is contained in the checklist file and in which file expected results
are stored?
The checklist file contains information about the objects and the properties of the object we are
verifying. b. The gui*.chk file contains the expected results which is stored in the exp folder

142. What do you verify with the bitmap check point for object/window and what
command it generates, explain
You can check an object, a window, or an area of a screen in your application as a bitmap. While
creating a test, you indicate what you want to check. WinRunner captures the specified bitmap,
stores it in the expected results folder (exp) of the test, and inserts a checkpoint in the test script.
When

143. What do you verify with the bitmap checkpoint for screen area and what command it
generates, explain
You can define any rectangular area of the screen and capture it as a bitmap for comparison. The
area can be any size: it can be part of a single window, or it can intersect several windows. The
rectangle is identified by the coordinates of its upper left and lower right corners, relative to the

144. What do you verify with the database checkpoint default and what command it
generates, explain synta
By adding runtime database record checkpoints you can compare the information in your
application during a test run with the corresponding record in your database. By adding standard

92

database checkpoints to your test scripts, you can check the contents of databases in different
versions of your

145. How do you handle dynamically changing area of the window in the bitmap
checkpoints?
The difference between bitmaps option in the Run Tab of the general options defines the
minimum number of pixels that constitute a bitmap mismatch

146. What do you verify with the database check point custom and what command it
generates, explain synta
When you create a custom check on a database, you create a standard database checkpoint in
which you can specify which properties to check on a result set. b. You can create a custom
check on a database in order to: i. check the contents of part or the entire result set ii. edit the
expected results

147. What do you verify with the sync point for object/window property and what
command it generates, explain
Synchronization compensates for inconsistencies in the performance of your application during a
test run. By inserting a synchronization point in your test script, you can instruct WinRunner to
suspend the test run and wait for a cue before continuing the test.b. You can a synchronization
point

148. What do you verify with the sync point for object/window bitmap and what command
it generates, explain
You can create a bitmap synchronization point that waits for the bitmap of an object or a window
to appear in the application being tested. b. During a test run, WinRunner suspends test
execution until the specified bitmap is redrawn, and then compares the current bitmap with the
expected one captured

149. What do you verify with the sync point for screen area and what command it
generates, explain synta
For screen area verification we actually capture the screen area into a bitmap and verify the
application screen area with the bitmap file during execution Syntax: obj_wait_bitmap(object,
image, time, x, y, width, height);

150. How do you edit checklist file and when do you need to edit the checklist file?
WinRunner has an edit checklist file option under the create menu. Select the Edit GUI

93

Checklist to modify GUI checklist file and Edit Database Checklist to edit database checklist
file. This brings up a dialog box that gives you option to select the checklist file

151. How do you edit the expected value of an object?


We can modify the expected value of the object by executing the script in the Update mode. We
can also manually edit the gui*.chk file which contains the expected values which come under the
exp folder to change the values.

152. How do you modify the expected results of a GUI checkpoint?


We can modify the expected results of a GUI checkpoint be running the script containing the
checkpoint in the update mode.

153. How do you handle ActiveX and Visual basic objects?


WinRunner provides with add-ins for ActiveX and Visual basic objects. When loading WinRunner,
select those add-ins and these add-ins provide with a set of functions to work on ActiveX and VB
objects.

154. How do you create ODBC query?


We can create ODBC query using the database checkpoint wizard. It provides with option to
create an SQL file that uses an ODBC DSN to connect to the database. The SQL File will contain
the connection string and the SQL statement.

155. How do you record a data driven test?


We can create a data-driven testing using data from a flat file, data table or a database. i. Using
Flat File: we actually store the data to be used in a required format in the file.

156. How do you convert a database file to a text file?


You can use Data Junction to create a conversion file which converts a database to a target text
file.

157. How do you parameterize database check points?


When you create a standard database checkpoint using ODBC (Microsoft Query), you can add
parameters to an SQL statement to parameterize the checkpoint. This is useful if you want to
create a database checkpoint with a query in which the SQL statement defining your query
changes.

94

158. How do you create parameterize SQL commands?


A parameterized query is a query in which at least one of the fields of the WHERE clause is
parameterized, i.e., the value of the field is specified by a question mark symbol ( ? ). For
example, the following SQL statement is based on a query on the database in the sample Flight
Reservation application

159. Explain the following commands:


db_connect i. to connect to a database db_connect(<session_name>, <connection_string>); b.
db_execute_query i. to execute a query db_execute_query ( session_name, SQL,
record_number ); record_number is the out value. c. db_get_field_value i. returns the value of a
single field in

160. What check points you will use to read and check text on the GUI and explain its
syntax?
You can use text checkpoints in your test scripts to read and check text in GUI objects and in
areas of the screen. While creating a test you point to an object or a window containing text.
WinRunner reads the text and writes a TSL statement to the test script. You may then add simple
programming

161. Explain Get Text checkpoint from object/window with syntax?


We use obj_get_text (<logical_name>, <out_text>) function to get the text from an object b. We
use win_get_text (window, out_text [, x1, y1, x2, y2]) function to get the text from a window.

162. Explain Get Text checkpoint from screen area with syntax?
We use win_get_text (window, out_text [, x1, y1, x2, y2]) function to get the text from a window.

163. Explain Get Text checkpoint from selection (web only) with syntax?
Returns a text string from an object. web_obj_get_text (object, table_row, table_column, out_text
[, text_before, text_after, index]); i. object The logical name of the object. ii. table_row If the object
is a table, it specifies the location of the row within a table. The string is preceded by

164. Explain Get Text checkpoint web text checkpoint with syntax?
We use web_obj_text_exists function for web text checkpoints. web_obj_text_exists ( object,
table_row, table_column, text_to_find [, text_before, text_after] ); object The logical name of the
object to search. b. table_row If the object is a table, it specifies the location of the row within a
table.

95

165. Which TSL functions you will use for


Searching text on the window i. find_text ( string, out_coord_array, search_area [, string_def ] );
string The string that is searched for. The string must be complete, contain no spaces, and it must
be preceded and followed by a space outside the quotation marks. To specify a literal, casesensitive

166. What are the steps of creating a data driven test?


The steps involved in data driven testing are: i. Creating a test ii. Converting to a data-driven test
and preparing a database iii. Running the test iv. Analyzing the test results.

167. Record a data driven test script using data driver wizard?
You can use the DataDriver Wizard to convert your entire script or a part of your script into a
data-driven test. For example, your test script may include recorded operations, checkpoints, and
other statements that do not need to be repeated for multiple sets of data

168. What are the three modes of running the scripts?


WinRunner provides three modes in which to run testsVerify, Debug, and Update. You use
each mode during a different phase of the testing process. i. Verify 1. Use the Verify mode to
check your application. ii. Debug 1. Use the Debug mode to help you identify bugs in a test script

169. Explain the following TSL functions:


Ddt_open i. Creates or opens a datatable file so that WinRunner can access it. Syntax: ddt_open
( data_table_name, mode );data_table_name The name of the data table. The name may be the
table variable name, the Microsoft Excel file or a tabbed text file name, or the full path and file
name of the

170. How do you handle unexpected events and errors?


WinRunner uses exception handling to detect an unexpected event when it occurs and act to
recover the test run. WinRunner enables you to handle the following types of exceptions: Pop-up
exceptions: Instruct WinRunner to detect and handle the appearance of a specific window. TSL
exceptions: Instruct

171. How do you handle pop-up exceptions?


A pop-up exception Handler handles the pop-up messages that come up during the execution of
the script in the AUT. TO handle this type of exception we make WinRunner learn the window
and also specify a handler to the exception. It could be i. Default actions: WinRunner clicks the
OK or Cancel button

96

172. How do you handle TSL exceptions?


A TSL exception enables you to detect and respond to a specific error code returned during test
execution. b. Suppose you are running a batch test on an unstable version of your application. If
your application crashes, you want WinRunner to recover test execution. A TSL exception can
instruct

173. How do you handle object exceptions?


During testing, unexpected changes can occur to GUI objects in the application you are testing.
These changes are often subtle but they can disrupt the test run and distort results. b. You could
use exception handling to detect a change in property of the GUI object during the test run, and to
recover

174. How do you comment your script?


We comment a script or line of script by inserting a # at the beginning of the line.

175. What is a compile module?


A compiled module is a script containing a library of user-defined functions that you want to call
frequently from other tests. When you load a compiled module, its functions are automatically
compiled and remain in memory. You can call them directly from within any test.

176. Write and explain decision making command?


You can incorporate decision-making into your test scripts using if/else or switch statements. i. An
if/else statement executes a statement if a condition is true; otherwise, it executes another
statement. It has the following syntax: if ( expression ) statement1; [ else statement2; ] expression

177. Write and explain switch command?


A switch statement enables WinRunner to make a decision based on an expression that can
have more than two values. It has the following syntax: switch (expression ) { case case_1:
statements case case_2: statements case case_n: statements default: statement(s) } b. The
switch statement consecutively

178. How do you write messages to the report?


To write message to a report we use the report_msg statement Syntax: report_msg (message);

97

179. What is a command to invoke application?


Invoke_application is the function used to invoke an application. Syntax: invoke_application(file,
command_option, working_dir, SHOW);

180. Which TSL function you will use to compare two files?
We can compare 2 files in WinRunner using the file_compare function. Syntax: file_compare
(file1, file2 [, save file]);

181. What is the use of function generator?


The Function Generator provides a quick, error-free way to program scripts. You can: i. Add
Context Sensitive functions that perform operations on a GUI object or get information from the
application being tested. ii. Add Standard and Analog functions that perform non-Context
Sensitive tasks such

182. What is the use of putting call and call_close statements in the test script?
You can use two types of call statements to invoke one test from another: i. A call statement
invokes a test from within another test. ii. A call_close statement invokes a test from within a
script and closes the test when the test is completed.

183. What is the use of treturn and texit statements in the test script?
The treturn and texit statements are used to stop execution of called tests. i. The treturn
statement stops the current test and returns control to the calling test. ii. The texit statement stops
test execution entirely, unless tests are being called from a batch test. In this case, control is

184. Where do you set up the search path for a called test.
The search path determines the directories that WinRunner will search for a called test. b. To set
the search path, choose Settings > General Options. The General Options dialog box opens.
Click the Folders tab and choose a search path in the Search Path for Called Tests box.
WinRunner searches

185. How you create user-defined functions and explain the syntax?
A user-defined function has the following structure: [class] function name ([mode] parameter...) {
declarations; statements; }b. The class of a function can be either static or public. A static function
is available only to the test or module within which the function was defined. c. d. Parameters

186. What does static and public class of a function means?


The class of a function can be either static or public. b. A static function is available only to the

98

test or module within which the function was defined. c. Once you execute a public function, it is
available to all tests, for as long as the test containing the function remains open. This is

187. What does in, out and input parameters means?


in: A parameter that is assigned a value from outside the function. b. out: A parameter that is
assigned a value from inside the function. c. inout: A parameter that can be assigned a value
from outside or inside the function.

188. What is the purpose of return statement?


This statement passes control back to the calling function or test. It also returns the value of the
evaluated expression to the calling function or test. If no expression is assigned to the return
statement, an empty string is returned. Syntax: return [( expression )];

189. What does auto, static, public and extern variables means?
auto: An auto variable can be declared only within a function and is local to that function. It exists
only for as long as the function is running. A new copy of the variable is created each time the
function is called. b. static: A static variable is local to the function, test, or compiled module

190. How do you declare constants?


The const specifier indicates that the declared value cannot be modified. The class of a constant
may be either public or static. If no class is explicitly declared, the constant is assigned the default
class public. Once a constant is defined, it remains in existence until you exit WinRunner.

191. How do you declare arrays?


The following syntax is used to define the class and the initial expression of an array. Array size
need not be defined in TSL. b. class array_name [ ] [=init_expression] c. The array class may be
any of the classes used for variable declarations (auto, static, public, extern).

192. How do you load and unload a compile module?


In order to access the functions in a compiled module you need to load the module. You can load
it from within any test script using the load command; all tests will then be able to access the
function until you quit WinRunner or unload the compiled module. b. You can load a module
either as

193. Why you use reload function?


If you make changes in a module, you should reload it. The reload function removes a loaded
module from memory and reloads it (combining the functions of unload and load). The syntax of

99

the reload function is: reload ( module_name [ ,1|0 ] [ ,1|0 ] ); The module_name is the name of
an existing compiled

194. How do you load and unload external libraries?


load_dll(path name); unload_dll(path name);

195. What are batch tests and how do you create and run batch tests ?
A batch test is a script that contains call statements to other tests.A batch test is created by
selecting the "Run in batch mode" from the run tab in the Tools-->General Options. A batch test
runs as a regular test. The only difference being that all messages like pause,wait...etc are
suppressed

196. How do you execute your tests from windows run command?
u can execute ur test in c compiler with window run command.as tsl is c based language

197. Explain different command line options?


addins list of add-ins to load:,Instructs WinRunner to load the specified add-ins. In the list, the
add-ins are separated by commas. This can be used in conjunction with the addins_select_timeout command line option.addins_select_timeout timeout :Instructs WinRunner
to wait the specified time (in seconds)

198. During debugging how do you monitor the value of the variables?

1) How you used WinRunner in your project?


a) Yes, I have been using WinRunner for creating automated scripts for GUI, functional and
regression testing of the AUT.

2) Explain WinRunner testing process?


a) WinRunner testing process involves six main stages
i. Create GUI Map File so that WinRunner can recognize the GUI objects in the application being
tested
ii. Create test scripts by recording, programming, or a combination of both. While recording tests,
insert checkpoints where you want to check the response of the application being tested.
iii. Debug Test: run tests in Debug mode to make sure they run smoothly
iv. Run Tests: run tests in Verify mode to test your application.
v. View Results: determines the success or failure of the tests.
vi. Report Defects: If a test run fails due to a defect in the application being tested, you can report

100

information about the defect directly from the Test Results window.

3) What is contained in the GUI map?


a) WinRunner stores information it learns about a window or object in a GUI Map. When
WinRunner runs a test, it uses the GUI map to locate objects. It reads an objects description in
the GUI map and then looks for an object with the same properties in the application being tested.
Each of these objects in the GUI Map file will be having a logical name and a physical description.
b) There are 2 types of GUI Map files.
i. Global GUI Map file: a single GUI Map file for the entire application
ii. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created.

4) How does WinRunner recognize objects on the application?


a) WinRunner uses the GUI Map file to recognize objects on the application. When WinRunner
runs a test, it uses the GUI map to locate objects. It reads an objects description in the GUI map
and then looks for an object with the same properties in the application being tested.

5) Have you created test scripts and what is contained in the test scripts?
a) Yes I have created test scripts. It contains the statement in Mercury Interactives Test Script
Language (TSL). These statements appear as a test script in a test window. You can then
enhance your recorded test script, either by typing in additional TSL functions and programming
elements or by using WinRunners visual programming tool, the Function Generator.

6) How does WinRunner evaluates test results?


a) Following each test run, WinRunner displays the results in a report. The report details all the
major events that occurred during the run, such as checkpoints, error messages, system
messages, or user messages. If mismatches are detected at checkpoints during the test run, you
can view the expected results and the actual results from the Test Results window.

7) Have you performed debugging of the scripts?


a) Yes, I have performed debugging of scripts. We can debug the script by executing the script in
the debug mode. We can also debug script using the Step, Step Into, Step out functionalities
provided by the WinRunner.

8) How do you run your test scripts?


a) We run tests in Verify mode to test your application. Each time WinRunner encounters a
checkpoint in the test script, it compares the current data of the application being tested to the
expected data captured earlier. If any mismatches are found, WinRunner captures them as actual

101

results.

9) How do you analyze results and report the defects?


a) Following each test run, WinRunner displays the results in a report. The report details all the
major events that occurred during the run, such as checkpoints, error messages, system
messages, or user messages. If mismatches are detected at checkpoints during the test run, you
can view the expected results and the actual results from the Test Results window. If a test run
fails due to a defect in the application being tested, you can report information about the defect
directly from the Test Results window. This information is sent via e-mail to the quality assurance
manager, who tracks the defect until it is fixed.

10) What is the use of Test Director software?


a) TestDirector is Mercury Interactives software test management tool. It helps quality assurance
personnel plan and organize the testing process. With TestDirector you can create a database of
manual and automated tests, build test cycles, run tests, and report and track defects. You can
also create reports and graphs to help review the progress of planning tests, running tests, and
tracking defects before a software release.

11) How you integrated your automated scripts from TestDirector?


a) When you work with WinRunner, you can choose to save your tests directly to your
TestDirector database or while creating a test case in the TestDirector we can specify whether
the script in automated or manual. And if it is automated script then TestDirector will build a
skeleton for the script that can be later modified into one which could be used to test the AUT.

12) What are the different modes of recording?


a) There are two type of recording in WinRunner.
i. Context Sensitive recording records the operations you perform on your application by
identifying Graphical User Interface (GUI) objects.
ii. Analog recording records keyboard input, mouse clicks, and the precise x- and y-coordinates
traveled by the mouse pointer across the screen.

13) What is the purpose of loading WinRunner Add-Ins?


a) Add-Ins are used in WinRunner to load functions specific to the particular add-in to the
memory. While creating a script only those functions in the add-in selected will be listed in the
function generator and while executing the script only those functions in the loaded add-in will be
executed else WinRunner will give an error message saying it does not recognize the function.

102

14) What are the reasons that WinRunner fails to identify an object on the GUI?
a) WinRunner fails to identify an object in a GUI due to various reasons.
i. The object is not a standard windows object.
ii. If the browser used is not compatible with the WinRunner version, GUI Map Editor will not be
able to learn any of the objects displayed in the browser window.

15) What do you mean by the logical name of the object.


a) An objects logical name is determined by its class. In most cases, the logical name is the label
that appears on an object.

16) If the object does not have a name then what will be the logical name?
a) If the object does not have a name then the logical name could be the attached text.

17) What is the different between GUI map and GUI map files?
a) The GUI map is actually the sum of one or more GUI map files. There are two modes for
organizing GUI map files.
i. Global GUI Map file: a single GUI Map file for the entire application
ii. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created.
b) GUI Map file is a file which contains the windows and the objects learned by the WinRunner
with its logical name and their physical description.

18) How do you view the contents of the GUI map?


a) GUI Map editor displays the content of a GUI Map. We can invoke GUI Map Editor from the
Tools Menu in WinRunner. The GUI Map Editor displays the various GUI Map files created and
the windows and objects learned in to them with their logical name and physical description.

19) When you create GUI map do you record all the objects of specific objects?
a) If we are learning a window then WinRunner automatically learns all the objects in the window
else we will we identifying those object, which are to be learned in a window, since we will be
working with only those objects while creating scripts.

20) What is the purpose of set_window command?


a) Set_Window command sets the focus to the specified window. We use this command to set
the focus to the required window before executing tests on a particular window.
Syntax: set_window(, time);
The logical name is the logical name of the window and time is the time the execution has to wait

103

till it gets the given window into focus.

21) How do you load GUI map?


a) We can load a GUI Map by using the GUI_load command.
Syntax: GUI_load();

22) What is the disadvantage of loading the GUI maps through start up scripts?
a) If we are using a single GUI Map file for the entire AUT then the memory used by the GUI Map
may be much high.
b) If there is any change in the object being learned then WinRunner will not be able to recognize
the object, as it is not in the GUI Map file loaded in the memory. So we will have to learn the
object again and update the GUI File and reload it.

23) How do you unload the GUI map?


a) We can use GUI_close to unload a specific GUI Map file or else we call use GUI_close_all
command to unload all the GUI Map files loaded in the memory.
Syntax: GUI_close(); or GUI_close_all;

24) What actually happens when you load GUI map?


a) When we load a GUI Map file, the information about the windows and the objects with their
logical names and physical description are loaded into memory. So when the WinRunner
executes a script on a particular window, it can identify the objects using this information loaded
in the memory.

25) What is the purpose of the temp GUI map file?


a) While recording a script, WinRunner learns objects and windows by itself. This is actually
stored into the temporary GUI Map file. We can specify whether we have to load this temporary
GUI Map file should be loaded each time in the General Options.

26) What is the extension of gui map file?


a) The extension for a GUI Map file is .gui.

27) How do you find an object in an GUI map.


a) The GUI Map Editor is been provided with a Find and Show Buttons.
i. To find a particular object in the GUI Map file in the application, select the object and click the
Show window. This blinks the selected object.

104

ii. To find a particular object in a GUI Map file click the Find button, which gives the option to
select the object. When the object is selected, if the object has been learned to the GUI Map file it
will be focused in the GUI Map file.

28) What different actions are performed by find and show button?
a) To find a particular object in the GUI Map file in the application, select the object and click the
Show window. This blinks the selected object.
b) To find a particular object in a GUI Map file click the Find button, which gives the option to
select the object. When the object is selected, if the object has been learned to the GUI Map file it
will be focused in the GUI Map file.

29) How do you identify which files are loaded in the GUI map?
a) The GUI Map Editor has a drop down GUI File displaying all the GUI Map files loaded into the
memory.

30) How do you modify the logical name or the physical description of the objects in GUI
map?
a) You can modify the logical name or the physical description of an object in a GUI map file
using the GUI Map Editor.

31) When do you feel you need to modify the logical name?
a) Changing the logical name of an object is useful when the assigned logical name is not
sufficiently descriptive or is too long.

32) When it is appropriate to change physical description?


a) Changing the physical description is necessary when the property value of an object changes.

33) How WinRunner handles varying window labels?


a) We can handle varying window labels using regular expressions. WinRunner uses two
hidden properties in order to use regular expression in an objects physical description. These
properties are regexp_label and regexp_MSW_class.
i. The regexp_label property is used for windows only. It operates behind the scenes to insert a
regular expression into a windows label description.
ii. The regexp_MSW_class property inserts a regular expression into an objects MSW_class. It is
obligatory for all types of windows and for the object class object.

34) What is the purpose of regexp_label property and regexp_MSW_class property?

105

a) The regexp_label property is used for windows only. It operates behind the scenes to insert a
regular expression into a windows label description.
b) The regexp_MSW_class property inserts a regular expression into an objects MSW_class. It is
obligatory for all types of windows and for the object class object.

35) How do you suppress a regular expression?


a) We can suppress the regular expression of a window by replacing the regexp_label property
with label property.

36) How do you copy and move objects between different GUI map files?
a) We can copy and move objects between different GUI Map files using the GUI Map Editor. The
steps to be followed are:
i. Choose Tools > GUI Map Editor to open the GUI Map Editor.
ii. Choose View > GUI Files.
iii. Click Expand in the GUI Map Editor. The dialog box expands to display two GUI map files
simultaneously.
iv. View a different GUI map file on each side of the dialog box by clicking the file names in the
GUI File lists.
v. In one file, select the objects you want to copy or move. Use the Shift key and/or Control key to
select multiple objects. To select all objects in a GUI map file, choose Edit > Select All.
vi. Click Copy or Move.
vii. To restore the GUI Map Editor to its original size, click Collapse.

37) How do you select multiple objects during merging the files?
a) Use the Shift key and/or Control key to select multiple objects. To select all objects in a GUI
map file, choose Edit > Select All.

38) How do you clear a GUI map files?


a) We can clear a GUI Map file using the Clear All option in the GUI Map Editor.

39) How do you filter the objects in the GUI map?


a) GUI Map Editor has a Filter option. This provides for filtering with 3 different types of options.
i. Logical name displays only objects with the specified logical name.
ii. Physical description displays only objects matching the specified physical description. Use any
substring belonging to the physical description.
iii. Class displays only objects of the specified class, such as all the push buttons.

106

40) How do you configure GUI map?


a) When WinRunner learns the description of a GUI object, it does not learn all its properties.
Instead, it learns the minimum number of properties to provide a unique identification of the
object.
b) Many applications also contain custom GUI objects. A custom object is any object not
belonging to one of the standard classes used by WinRunner. These objects are therefore
assigned to the generic object class. When WinRunner records an operation on a custom
object, it generates obj_mouse_ statements in the test script.
c) If a custom object is similar to a standard object, you can map it to one of the standard classes.
You can also configure the properties WinRunner uses to identify a custom object during Context
Sensitive testing. The mapping and the configuration you set are valid only for the current
WinRunner session. To make the mapping and the configuration permanent, you must add
configuration statements to your startup test script.

41) What is the purpose of GUI map configuration?


a) GUI Map configuration is used to map a custom object to a standard object.

42) How do you make the configuration and mappings permanent?


a) The mapping and the configuration you set are valid only for the current WinRunner session.
To make the mapping and the configuration permanent, you must add configuration statements to
your startup test script.

43) What is the purpose of GUI spy?


a) Using the GUI Spy, you can view the properties of any GUI object on your desktop. You use
the Spy pointer to point to an object, and the GUI Spy displays the properties and their values in
the GUI Spy dialog box. You can choose to view all the properties of an object, or only the
selected set of properties that WinRunner learns.

44) What is the purpose of obligatory and optional properties of the objects?
a) For each class, WinRunner learns a set of default properties. Each default property is
classified obligatory or optional.
i. An obligatory property is always learned (if it exists).
ii. An optional property is used only if the obligatory properties do not provide unique identification
of an object. These optional properties are stored in a list. WinRunner selects the minimum
number of properties from this list that are necessary to identify the object. It begins with the first
property in the list, and continues, if necessary, to add properties to the description until it obtains
unique identification for the object.

107

45) When the optional properties are learned?


a) An optional property is used only if the obligatory properties do not provide unique identification
of an object.

46) What is the purpose of location indicator and index indicator in GUI map
configuration?
a) In cases where the obligatory and optional properties do not uniquely identify an object,
WinRunner uses a selector to differentiate between them. Two types of selectors are available:
i. A location selector uses the spatial position of objects.
1. The location selector uses the spatial order of objects within the window, from the top left to the
bottom right corners, to differentiate among objects with the same description.
ii. An index selector uses a unique number to identify the object in a window.
1. The index selector uses numbers assigned at the time of creation of objects to identify the
object in a window. Use this selector if the location of objects with the same description may
change within a window.

47) How do you handle custom objects?


a) A custom object is any GUI object not belonging to one of the standard classes used by
WinRunner. WinRunner learns such objects under the generic object class. WinRunner records
operations on custom objects using obj_mouse_ statements.
b) If a custom object is similar to a standard object, you can map it to one of the standard classes.
You can also configure the properties WinRunner uses to identify a custom object during Context
Sensitive testing.

48) What is the name of custom class in WinRunner and what methods it applies on the
custom objects?
a) WinRunner learns custom class objects under the generic object class. WinRunner records
operations on custom objects using obj_ statements.

49) In a situation when obligatory and optional both the properties cannot uniquely
identify an object what method WinRunner applies?
a) In cases where the obligatory and optional properties do not uniquely identify an object,
WinRunner uses a selector to differentiate between them. Two types of selectors are available:
i. A location selector uses the spatial position of objects.
ii. An index selector uses a unique number to identify the object in a window.

108

50) What is the purpose of different record methods 1) Record 2) Pass up 3) As Object 4)
Ignore.
a) Record instructs WinRunner to record all operations performed on a GUI object. This is the
default record method for all classes. (The only exception is the static class (static text), for which
the default is Pass Up.)
b) Pass Up instructs WinRunner to record an operation performed on this class as an operation
performed on the element containing the object. Usually this element is a window, and the
operation is recorded as win_mouse_click.
c) As Object instructs WinRunner to record all operations performed on a GUI object as though its
class were object class.
d) Ignore instructs WinRunner to disregard all operations performed on the class.

51) How do you find out which is the start up file in WinRunner?
a) The test script name in the Startup Test box in the Environment tab in the General Options
dialog box is the start up file in WinRunner.

52) What are the virtual objects and how do you learn them?
a) Applications may contain bitmaps that look and behave like GUI objects. WinRunner records
operations on these bitmaps using win_mouse_click statements. By defining a bitmap as a virtual
object, you can instruct WinRunner to treat it like a GUI object such as a push button, when you
record and run tests.
b) Using the Virtual Object wizard, you can assign a bitmap to a standard object class, define the
coordinates of that object, and assign it a logical name.
To define a virtual object using the Virtual Object wizard:
i. Choose Tools > Virtual Object Wizard. The Virtual Object wizard opens. Click Next.
ii. In the Class list, select a class for the new virtual object. If rows that are displayed in the
window. For a table class, select the number of visible rows and columns. Click Next.
iii. Click Mark Object. Use the crosshairs pointer to select the area of the virtual object. You can
use the arrow keys to make precise adjustments to the area you define with the crosshairs. Press
Enter or click the right mouse button to display the virtual objects coordinates in the wizard. If the
object marked is visible on the screen, you can click the Highlight button to view it. Click Next.
iv. Assign a logical name to the virtual object. This is the name that appears in the test script
when you record on the virtual object. If the object contains text that WinRunner can read, the
wizard suggests using this text for the logical name. Otherwise, WinRunner suggests
virtual_object, virtual_push_button, virtual_list, etc.
v. You can accept the wizards suggestion or type in a different name. WinRunner checks that
there are no other objects in the GUI map with the same name before confirming your choice.

109

Click Next.

53) How you created you test scripts 1) by recording or 2) programming?


a) Programming. I have done complete programming only, absolutely no recording.
54) What are the two modes of recording?
a) There are 2 modes of recording in WinRunner
i. Context Sensitive recording records the operations you perform on your application by
identifying Graphical User Interface (GUI) objects.
ii. Analog recording records keyboard input, mouse clicks, and the precise x- and y-coordinates
traveled by the mouse pointer across the screen.

55) What is a checkpoint and what are different types of checkpoints?


a) Checkpoints allow you to compare the current behavior of the application being tested to its
behavior in an earlier version.
You can add four types of checkpoints to your test scripts:
i. GUI checkpoints verify information about GUI objects. For example, you can check that a button
is enabled or see which item is selected in a list.
ii. Bitmap checkpoints take a snapshot of a window or area of your application and compare this
to an image captured in an earlier version.
iii. Text checkpoints read text in GUI objects and in bitmaps and enable you to verify their
contents.
iv. Database checkpoints check the contents and the number of rows and columns of a result set,
which is based on a query you create on your database.

56) What are data driven tests?


a) When you test your application, you may want to check how it performs the same operations
with multiple sets of data. You can create a data-driven test with a loop that runs ten times: each
time the loop runs, it is driven by a different set of data. In order for WinRunner to use data to
drive the test, you must link the data to the test script which it drives. This is called parameterizing
your test. The data is stored in a data table. You can perform these operations manually, or you
can use the DataDriver Wizard to parameterize your test and store the data in a data table.

57) What are the synchronization points?

110

a) Synchronization points enable you to solve anticipated timing problems between the test and
your application. For example, if you create a test that opens a database application, you can add
a synchronization point that causes the test to wait until the database records are loaded on the
screen.
b) For Analog testing, you can also use a synchronization point to ensure that WinRunner
repositions a window at a specific location. When you run a test, the mouse cursor travels along
exact coordinates. Repositioning the window enables the mouse pointer to make contact with the
correct elements in the window.

58) What is parameterizing?


a) In order for WinRunner to use data to drive the test, you must link the data to the test script
which it drives. This is called parameterizing your test. The data is stored in a data table.

59) How do you maintain the document information of the test scripts?
a) Before creating a test, you can document information about the test in the General and
Description tabs of the Test Properties dialog box. You can enter the name of the test author, the
type of functionality tested, a detailed description of the test, and a reference to the relevant
functional specifications document.

60) What do you verify with the GUI checkpoint for single property and what command it
generates, explain syntax?
a) You can check a single property of a GUI object. For example, you can check whether a button
is enabled or disabled or whether an item in a list is selected. To create a GUI checkpoint for a
property value, use the Check Property dialog box to add one of the following functions to the test
script:
i. button_check_info
ii. scroll_check_info
iii. edit_check_info
iv. static_check_info
v. list_check_info
vi. win_check_info
vii. obj_check_info
Syntax: button_check_info (button, property, property_value );
edit_check_info ( edit, property, property_value );

111

61) What do you verify with the GUI checkpoint for object/window and what command it
generates, explain syntax?
a) You can create a GUI checkpoint to check a single object in the application being tested. You
can either check the object with its default properties or you can specify which properties to
check.
b) Creating a GUI Checkpoint using the Default Checks
i. You can create a GUI checkpoint that performs a default check on the property recommended
by WinRunner. For example, if you create a GUI checkpoint that checks a push button, the
default check verifies that the push button is enabled.
ii. To create a GUI checkpoint using default checks:
1. Choose Create > GUI Checkpoint > For Object/Window, or click the GUI Checkpoint for
Object/Window button on the User toolbar. If you are recording in Analog mode, press the
CHECK GUI FOR OBJECT/WINDOW softkey in order to avoid extraneous mouse movements.
Note that you can press the CHECK GUI FOR OBJECT/WINDOW softkey in Context Sensitive
mode as well. The WinRunner window is minimized, the mouse pointer becomes a pointing hand,
and a help window opens on the screen.
2. Click an object.
3. WinRunner captures the current value of the property of the GUI object being checked and
stores it in the tests expected results folder. The WinRunner window is restored and a GUI
checkpoint is inserted in the test script as an obj_check_gui statement
Syntax: win_check_gui ( window, checklist, expected_results_file, time );
c) Creating a GUI Checkpoint by Specifying which Properties to Check
d) You can specify which properties to check for an object. For example, if you create a
checkpoint that checks a push button, you can choose to verify that it is in focus, instead of
enabled.
e) To create a GUI checkpoint by specifying which properties to check:
i. Choose Create > GUI Checkpoint > For Object/Window, or click the GUI Checkpoint for
Object/Window button on the User toolbar. If you are recording in Analog mode, press the
CHECK GUI FOR OBJECT/WINDOW softkey in order to avoid extraneous mouse movements.
Note that you can press the CHECK GUI FOR OBJECT/WINDOW softkey in Context Sensitive
mode as well. The WinRunner window is minimized, the mouse pointer becomes a pointing hand,
and a help window opens on the screen.
ii. Double-click the object or window. The Check GUI dialog box opens.

112

iii. Click an object name in the Objects pane. The Properties pane lists all the properties for the
selected object.
iv. Select the properties you want to check.
1. To edit the expected value of a property, first select it. Next, either click the Edit Expected
Value button, or double-click the value in the Expected Value column to edit it.
2. To add a check in which you specify arguments, first select the property for which you want to
specify arguments. Next, either click the Specify Arguments button, or double-click in the
Arguments column. Note that if an ellipsis (three dots) appears in the Arguments column, then
you must specify arguments for a check on this property. (You do not need to specify arguments
if a default argument is specified.) When checking standard objects, you only specify arguments
for certain properties of edit and static text objects. You also specify arguments for checks on
certain properties of nonstandard objects.
3. To change the viewing options for the properties of an object, use the Show Properties buttons.
4. Click OK to close the Check GUI dialog box. WinRunner captures the GUI information and
stores it in the tests expected results folder. The WinRunner window is restored and a GUI
checkpoint is inserted in the test script as an obj_check_gui or a win_check_gui statement.
Syntax: win_check_gui ( window, checklist, expected_results_file, time );
obj_check_gui ( object, checklist, expected results file, time );

62) What do you verify with the GUI checkpoint for multiple objects and what command it
generates, explain syntax?
a) To create a GUI checkpoint for two or more objects:
i. Choose Create > GUI Checkpoint > For Multiple Objects or click the GUI Checkpoint for
Multiple Objects button on the User toolbar. If you are recording in Analog mode, press the
CHECK GUI FOR MULTIPLE OBJECTS softkey in order to avoid extraneous mouse movements.
The Create GUI Checkpoint dialog box opens.
ii. Click the Add button. The mouse pointer becomes a pointing hand and a help window opens.
iii. To add an object, click it once. If you click a window title bar or menu bar, a help window
prompts you to check all the objects in the window.
iv. The pointing hand remains active. You can continue to choose objects by repeating step 3
above for each object you want to check.
v. Click the right mouse button to stop the selection process and to restore the mouse pointer to
its original shape. The Create GUI Checkpoint dialog box reopens.
vi. The Objects pane contains the name of the window and objects included in the GUI
checkpoint. To specify which objects to check, click an object name in the Objects pane. The

113

Properties pane lists all the properties of the object. The default properties are selected.
1. To edit the expected value of a property, first select it. Next, either click the Edit Expected
Value button, or double-click the value in the Expected Value column to edit it.
2. To add a check in which you specify arguments, first select the property for which you want to
specify arguments. Next, either click the Specify Arguments button, or double-click in the
Arguments column. Note that if an ellipsis appears in the Arguments column, then you must
specify arguments for a check on this property. (You do not need to specify arguments if a default
argument is specified.) When checking standard objects, you only specify arguments for certain
properties of edit and static text objects. You also specify arguments for checks on certain
properties of nonstandard objects.
3. To change the viewing options for the properties of an object, use the Show Properties buttons.
vii. To save the checklist and close the Create GUI Checkpoint dialog box, click OK. WinRunner
captures the current property values of the selected GUI objects and stores it in the expected
results folder. A win_check_gui statement is inserted in the test script.
Syntax: win_check_gui ( window, checklist, expected_results_file, time );
obj_check_gui ( object, checklist, expected results file, time );

63) What information is contained in the checklist file and in which file expected results
are stored?
a) The checklist file contains information about the objects and the properties of the object we are
verifying.
b) The gui*.chk file contains the expected results which is stored in the exp folder

64) What do you verify with the bitmap check point for object/window and what command
it generates, explain syntax?
a) You can check an object, a window, or an area of a screen in your application as a bitmap.
While creating a test, you indicate what you want to check. WinRunner captures the specified
bitmap, stores it in the expected results folder (exp) of the test, and inserts a checkpoint in the
test script. When you run the test, WinRunner compares the bitmap currently displayed in the
application being tested with the expected bitmap stored earlier. In the event of a mismatch,
WinRunner captures the current actual bitmap and generates a difference bitmap. By comparing
the three bitmaps (expected, actual, and difference), you can identify the nature of the
discrepancy.
b) When working in Context Sensitive mode, you can capture a bitmap of a window, object, or of
a specified area of a screen. WinRunner inserts a checkpoint in the test script in the form of either
a win_check_bitmap or obj_check_bitmap statement.

114

c) Note that when you record a test in Analog mode, you should press the CHECK BITMAP OF
WINDOW softkey or the CHECK BITMAP OF SCREEN AREA softkey to create a bitmap
checkpoint. This prevents WinRunner from recording extraneous mouse movements. If you are
programming a test, you can also use the Analog function check_window to check a bitmap.
d) To capture a window or object as a bitmap:
i. Choose Create > Bitmap Checkpoint > For Object/Window or click the Bitmap Checkpoint for
Object/Window button on the User toolbar. Alternatively, if you are recording in Analog mode,
press the CHECK BITMAP OF OBJECT/WINDOW softkey. The WinRunner window is minimized,
the mouse pointer becomes a pointing hand, and a help window opens.
ii. Point to the object or window and click it. WinRunner captures the bitmap and generates a
win_check_bitmap or obj_check_bitmap statement in the script. The TSL statement generated for
a window bitmap has the following syntax:
win_check_bitmap ( object, bitmap, time );
iii. For an object bitmap, the syntax is:
obj_check_bitmap ( object, bitmap, time );
iv. For example, when you click the title bar of the main window of the Flight Reservation
application, the resulting statement might be:
win_check_bitmap ('Flight Reservation', 'Img2', 1);
v. However, if you click the Date of Flight box in the same window, the statement might be:
obj_check_bitmap ('Date of Flight:', 'Img1', 1);
Syntax: obj_check_bitmap ( object, bitmap, time [, x, y, width, height] );

65) What do you verify with the bitmap checkpoint for screen area and what command it
generates, explain syntax?
a) You can define any rectangular area of the screen and capture it as a bitmap for comparison.
The area can be any size: it can be part of a single window, or it can intersect several windows.
The rectangle is identified by the coordinates of its upper left and lower right corners, relative to
the upper left corner of the window in which the area is located. If the area intersects several
windows or is part of a window with no title (for example, a popup window), its coordinates are
relative to the entire screen (the root window).
b) To capture an area of the screen as a bitmap:

115

i. Choose Create > Bitmap Checkpoint > For Screen Area or click the Bitmap Checkpoint for
Screen Area button. Alternatively, if you are recording in Analog mode, press the CHECK
BITMAP OF SCREEN AREA softkey. The WinRunner window is minimized, the mouse pointer
becomes a crosshairs pointer, and a help window opens.
ii. Mark the area to be captured: press the left mouse button and drag the mouse pointer until a
rectangle encloses the area; then release the mouse button.
iii. Press the right mouse button to complete the operation. WinRunner captures the area and
generates a win_check_bitmap statement in your script.
iv. The win_check_bitmap statement for an area of the screen has the following syntax:
win_check_bitmap ( window, bitmap, time, x, y, width, height );

66) What do you verify with the database checkpoint default and what command it
generates, explain syntax?
a) By adding runtime database record checkpoints you can compare the information in your
application during a test run with the corresponding record in your database. By adding standard
database checkpoints to your test scripts, you can check the contents of databases in different
versions of your application.
b) When you create database checkpoints, you define a query on your database, and your
database checkpoint checks the values contained in the result set. The result set is set of values
retrieved from the results of the query.
c) You can create runtime database record checkpoints in order to compare the values displayed
in your application during the test run with the corresponding values in the database. If the
comparison does not meet the success criteria you
d) specify for the checkpoint, the checkpoint fails. You can define a successful runtime database
record checkpoint as one where one or more matching records were found, exactly one matching
record was found, or where no matching records are found.
e) You can create standard database checkpoints to compare the current values of the properties
of the result set during the test run to the expected values captured during recording or otherwise
set before the test run. If the expected results and the current results do not match, the database
checkpoint fails. Standard database checkpoints are useful when the expected results can be
established before the test run.
Syntax: db_check(, );
f) You can add a runtime database record checkpoint to your test in order to compare information
that appears in your application during a test run with the current value(s) in the corresponding

116

record(s) in your database. You add runtime database record checkpoints by running the
Runtime Record Checkpoint wizard. When you are finished, the wizard inserts the appropriate
db_record_check statement into your script.
Syntax:
db_record_check(ChecklistFileName,SuccessConditions,RecordNumber );
ChecklistFileName A file created by WinRunner and saved in the test's checklist folder. The file
contains information about the data to be captured during the test run and its corresponding field
in the database. The file is created based on the information entered in the Runtime Record
Verification wizard.
SuccessConditions Contains one of the following values:
1. DVR_ONE_OR_MORE_MATCH - The checkpoint passes if one or more matching database
records are found.
2. DVR_ONE_MATCH - The checkpoint passes if exactly one matching database record is found.
3. DVR_NO_MATCH - The checkpoint passes if no matching database records are found.
RecordNumber An out parameter returning the number of records in the database.

67) How do you handle dynamically changing area of the window in the bitmap
checkpoints?
a) The difference between bitmaps option in the Run Tab of the general options defines the
minimum number of pixels that constitute a bitmap mismatch

68) What do you verify with the database check point custom and what command it
generates, explain syntax?
a) When you create a custom check on a database, you create a standard database checkpoint
in which you can specify which properties to check on a result set.
b) You can create a custom check on a database in order to:
i. check the contents of part or the entire result set
ii. edit the expected results of the contents of the result set
iii. count the rows in the result set
iv. count the columns in the result set
c) You can create a custom check on a database using ODBC, Microsoft Query or Data Junction.

69) What do you verify with the sync point for object/window property and what command
it generates, explain syntax?
a) Synchronization compensates for inconsistencies in the performance of your application during

117

a test run. By inserting a synchronization point in your test script, you can instruct WinRunner to
suspend the test run and wait for a cue before continuing the test.
b) You can a synchronization point that instructs WinRunner to wait for a specified object or
window to appear. For example, you can tell WinRunner to wait for a window to open before
performing an operation within that window, or you may want WinRunner to wait for an object to
appear in order to perform an operation on that object.
c) You use the obj_exists function to create an object synchronization point, and you use the
win_exists function to create a window synchronization point. These functions have the following
syntax:
Syntax:
obj_exists ( object [, time ] );
win_exists ( window [, time ] );

70) What do you verify with the sync point for object/window bitmap and what command it
generates, explain syntax?
a) You can create a bitmap synchronization point that waits for the bitmap of an object or a
window to appear in the application being tested.
b) During a test run, WinRunner suspends test execution until the specified bitmap is redrawn,
and then compares the current bitmap with the expected one captured earlier. If the bitmaps
match, then WinRunner continues the test.
Syntax:
obj_wait_bitmap ( object, image, time );
win_wait_bitmap ( window, image, time );

71) What do you verify with the sync point for screen area and what command it
generates, explain syntax?
a) For screen area verification we actually capture the screen area into a bitmap and verify the
application screen area with the bitmap file during execution
Syntax: obj_wait_bitmap(object, image, time, x, y, width, height);

72) How do you edit checklist file and when do you need to edit the checklist file?
a) WinRunner has an edit checklist file option under the create menu. Select the Edit GUI
Checklist to modify GUI checklist file and Edit Database Checklist to edit database checklist
file. This brings up a dialog box that gives you option to select the checklist file to modify. There is
also an option to select the scope of the checklist file, whether it is Test specific or a shared one.
Select the checklist file, click OK which opens up the window to edit the properties of the objects.

118

73) How do you edit the expected value of an object?


a) We can modify the expected value of the object by executing the script in the Update mode.
We can also manually edit the gui*.chk file which contains the expected values which come under
the exp folder to change the values.

74) How do you modify the expected results of a GUI checkpoint?


a) We can modify the expected results of a GUI checkpoint be running the script containing the
checkpoint in the update mode.

75) How do you handle ActiveX and Visual basic objects?


a) WinRunner provides with add-ins for ActiveX and Visual basic objects. When loading
WinRunner, select those add-ins and these add-ins provide with a set of functions to work on
ActiveX and VB objects.

76) How do you create ODBC query?


a) We can create ODBC query using the database checkpoint wizard. It provides with option to
create an SQL file that uses an ODBC DSN to connect to the database. The SQL File will contain
the connection string and the SQL statement.

77) How do you record a data driven test?


a) We can create a data-driven testing using data from a flat file, data table or a database.
i. Using Flat File: we actually store the data to be used in a required format in the file. We access
the file using the File manipulation commands, reads data from the file and assign the variables
with data.
ii. Data Table: It is an excel file. We can store test data in these files and manipulate them. We
use the ddt_* functions to manipulate data in the data table.
iii. Database: we store test data in the database and access these data using db_* functions.

78) How do you convert a database file to a text file?


a) You can use Data Junction to create a conversion file which converts a database to a target
text file.

79) How do you parameterize database check points?


a) When you create a standard database checkpoint using ODBC (Microsoft Query), you can add
parameters to an SQL statement to parameterize the checkpoint. This is useful if you want to
create a database checkpoint with a query in which the SQL statement defining your query
changes.

119

80) How do you create parameterize SQL commands?


a) A parameterized query is a query in which at least one of the fields of the WHERE clause is
parameterized, i.e., the value of the field is specified by a question mark symbol ( ? ). For
example, the following SQL statement is based on a query on the database in the sample Flight
Reservation application:
i. SELECT Flights.Departure, Flights.Flight_Number, Flights.Day_Of_Week FROM Flights Flights
WHERE (Flights.Departure=?) AND (Flights.Day_Of_Week=?)
SELECT defines the columns to include in the query.
FROM specifies the path of the database.
WHERE (optional) specifies the conditions, or filters to use in the query.
Departure is the parameter that represents the departure point of a flight.
Day_Of_Week is the parameter that represents the day of the week of a flight.
b) When creating a database checkpoint, you insert a db_check statement into your test script.
When you parameterize the SQL statement in your checkpoint, the db_check function has a
fourth, optional, argument: the parameter_array argument. A statement similar to the following is
inserted into your test script:
db_check('list1.cdl', 'dbvf1', NO_LIMIT, dbvf1_params);
The parameter_array argument will contain the values to substitute for the parameters in the
parameterized checkpoint.

81) Explain the following commands:


a) db_connect
i. to connect to a database
db_connect(, );
b) db_execute_query
i. to execute a query
db_execute_query ( session_name, SQL, record_number );
record_number is the out value.

120

c) db_get_field_value
i. returns the value of a single field in the specified row_index and column in the session_name
database session.
db_get_field_value ( session_name, row_index, column );
d) db_get_headers
i. returns the number of column headers in a query and the content of the column headers,
concatenated and delimited by tabs.
db_get_headers ( session_name, header_count, header_content );
e) db_get_row
i. returns the content of the row, concatenated and delimited by tabs.
db_get_row ( session_name, row_index, row_content );
f) db_write_records
i. writes the record set into a text file delimited by tabs.
db_write_records ( session_name, output_file [ , headers [ , record_limit ] ] );
g) db_get_last_error
i. returns the last error message of the last ODBC or Data Junction operation in the
session_name database session.
db_get_last_error ( session_name, error );
h) db_disconnect
i. disconnects from the database and ends the database session.
db_disconnect ( session_name );
i) db_dj_convert
i. runs the djs_file Data Junction export file. When you run this file, the Data Junction Engine
converts data from one spoke (source) to another (target). The optional parameters enable you to
override the settings in the Data Junction export file.

121

db_dj_convert ( djs_file [ , output_file [ , headers [ , record_limit ] ] ] );

82) What check points you will use to read and check text on the GUI and explain its
syntax?
a) You can use text checkpoints in your test scripts to read and check text in GUI objects and in
areas of the screen. While creating a test you point to an object or a window containing text.
WinRunner reads the text and writes a TSL statement to the test script. You may then add simple
programming elements to your test scripts to verify the contents of the text.
b) You can use a text checkpoint to:
i. Read text from a GUI object or window in your application, using obj_get_text and win_get_text
ii. Search for text in an object or window, using win_find_text and obj_find_text
iii. Move the mouse pointer to text in an object or window, using obj_move_locator_text and
win_move_locator_text
iv. Click on text in an object or window, using obj_click_on_text and win_click_on_text

83) Explain Get Text checkpoint from object/window with syntax?


a) We use obj_get_text (, ) function to get the text from an object
b) We use win_get_text (window, out_text [, x1, y1, x2, y2]) function to get the text from a
window.

84) Explain Get Text checkpoint from screen area with syntax?
a) We use win_get_text (window, out_text [, x1, y1, x2, y2]) function to get the text from a
window.

85) Explain Get Text checkpoint from selection (web only) with syntax?
a) Returns a text string from an object.
web_obj_get_text (object, table_row, table_column, out_text [, text_before, text_after, index]);
i. object The logical name of the object.
ii. table_row If the object is a table, it specifies the location of the row within a table. The string is
preceded by the # character.
iii. table_column If the object is a table, it specifies the location of the column within a table. The
string is preceded by the # character.
iv. out_text The output variable that stores the text string.
v. text_before Defines the start of the search area for a particular text string.

122

vi. text_after Defines the end of the search area for a particular text string.
vii. index The occurrence number to locate. (The default parameter number is numbered 1).

86) Explain Get Text checkpoint web text checkpoint with syntax?
a) We use web_obj_text_exists function for web text checkpoints.
web_obj_text_exists ( object, table_row, table_column, text_to_find [, text_before, text_after] );
a. object The logical name of the object to search.
b. table_row If the object is a table, it specifies the location of the row within a table. The string is
preceded by the character #.
c. table_column If the object is a table, it specifies the location of the column within a table. The
string is preceded by the character #.
d. text_to_find The string that is searched for.
e. text_before Defines the start of the search area for a particular text string.
f. text_after Defines the end of the search area for a particular text string.

87) Which TSL functions you will use for


a) Searching text on the window
i. find_text ( string, out_coord_array, search_area [, string_def ] );
string The string that is searched for. The string must be complete, contain no spaces, and it must
be preceded and followed by a space outside the quotation marks. To specify a literal, casesensitive string, enclose the string in quotation marks. Alternatively, you can specify the name of
a string variable. In this case, the string variable can include a regular expression.
out_coord_array The name of the array that stores the screen coordinates of the text (see
explanation below).
search_area The area to search, specified as coordinates x1,y1,x2,y2. These define any two
diagonal corners of a rectangle. The interpreter searches for the text in the area defined by the
rectangle.
string_def Defines the type of search to perform. If no value is specified, (0 or FALSE, the
default), the search is for a single complete word only. When 1, or TRUE, is specified, the search
is not restricted to a single, complete word.

123

b) getting the location of the text string


i. win_find_text ( window, string, result_array [, search_area [, string_def ] ] );
window The logical name of the window to search.
string The text to locate. To specify a literal, case sensitive string, enclose the string in quotation
marks. Alternatively, you can specify the name of a string variable. The value of the string
variable can include a regular expression. The regular expression should not include an
exclamation mark (!), however, which is treated as a literal character. For more information
regarding Regular Expressions, refer to the 'Using Regular Expressions' chapter in your User's
Guide.
result_array The name of the output variable that stores the location of the string as a fourelement array.
search_area The region of the object to search, relative to the window. This area is defined as a
pair of coordinates, with x1,y1,x2,y2 specifying any two diagonally opposite corners of the
rectangular search region. If this parameter is not defined, then the entire window is considered
the search area.
string_def Defines how the text search is performed. If no string_def is specified, (0 or FALSE,
the default parameter), the interpreter searches for a complete word only. If 1, or TRUE, is
specified, the search is not restricted to a single, complete word.
c) Moving the pointer to that text string
i. win_move_locator_text (window, string [ ,search_area [ ,string_def ] ] );
window The logical name of the window.
string The text to locate. To specify a literal, case sensitive string, enclose the string in quotation
marks. Alternatively, you can specify the name of a string variable. The value of the string
variable can include a regular expression (the regular expression need not begin with an
exclamation mark).
search_area The region of the object to search, relative to the window. This area is defined as a
pair of coordinates, with x1, y1, x2, y2 specifying any two diagonally opposite corners of the
rectangular search region. If this parameter is not defined, then the entire window specified is

124

considered the search area.


string_def Defines how the text search is performed. If no string_def is specified, (0 or FALSE,
the default parameter), the interpreter searches for a complete word only. If 1, or TRUE, is
specified, the search is not restricted to a single, complete word.
d) Comparing the text
i. compare_text (str1, str2 [, chars1, chars2]);
str1, str2 The two strings to be compared.
chars1 One or more characters in the first string.
chars2 One or more characters in the second string. These characters are substituted for those in
chars1.

88) What are the steps of creating a data driven test?


a) The steps involved in data driven testing are:
i. Creating a test
ii. Converting to a data-driven test and preparing a database
iii. Running the test
iv. Analyzing the test results.

89) Record a data driven test script using data driver wizard?
a) You can use the DataDriver Wizard to convert your entire script or a part of your script into a
data-driven test. For example, your test script may include recorded operations, checkpoints, and
other statements that do not need to be repeated for multiple sets of data. You need to
parameterize only the portion of your test script that you want to run in a loop with multiple sets of
data.
To create a data-driven test:
i. If you want to turn only part of your test script into a data-driven test, first select those lines in
the test script.
ii. Choose Tools > DataDriver Wizard.
iii. If you want to turn only part of the test into a data-driven test, click Cancel. Select those lines in
the test script and reopen the DataDriver Wizard. If you want to turn the entire test into a datadriven test, click Next.
iv. The Use a new or existing Excel table box displays the name of the Excel file that WinRunner

125

creates, which stores the data for the data-driven test. Accept the default data table for this test,
enter a different name for the data table, or use
v. The browse button to locate the path of an existing data table. By default, the data table is
stored in the test folder.
vi. In the Assign a name to the variable box, enter a variable name with which to refer to the data
table, or accept the default name, table.
vii. At the beginning of a data-driven test, the Excel data table you selected is assigned as the
value of the table variable. Throughout the script, only the table variable name is used. This
makes it easy for you to assign a different data table
viii. To the script at a later time without making changes throughout the script.
ix. Choose from among the following options:
1. Add statements to create a data-driven test: Automatically adds statements to run your test in a
loop: sets a variable name by which to refer to the data table; adds braces ({and}), a for
statement, and a ddt_get_row_count statement to your test script selection to run it in a loop
while it reads from the data table; adds ddt_open and ddt_close statements
2. To your test script to open and close the data table, which are necessary in order to iterate
rows in the table. Note that you can also add these statements to your test script manually.
3. If you do not choose this option, you will receive a warning that your data-driven test must
contain a loop and statements to open and close your datatable.
4. Import data from a database: Imports data from a database. This option adds
ddt_update_from_db, and ddt_save statements to your test script after the ddt_open statement.
5. Note that in order to import data from a database, either Microsoft Query or Data Junction must
be installed on your machine. You can install Microsoft Query from the custom installation of
Microsoft Office. Note that Data Junction is not automatically included in your WinRunner
package. To purchase Data Junction, contact your Mercury Interactive representative. For
detailed information on working with Data Junction, refer to the documentation in the Data
Junction package.
6. Parameterize the test: Replaces fixed values in selected checkpoints and in recorded
statements with parameters, using the ddt_val function, and in the data table, adds columns with
variable values for the parameters. Line by line: Opens a wizard screen for each line of the
selected test script, which enables you to decide whether to parameterize a particular line, and if
so, whether to add a new column to the data table or use an existing column when
parameterizing data.
7. Automatically: Replaces all data with ddt_val statements and adds new columns to the data
table. The first argument of the function is the name of the column in the data table. The replaced
data is inserted into the table.

126

x. The Test script line to parameterize box displays the line of the test script to parameterize. The
highlighted value can be replaced by a parameter. The Argument to be replaced box displays the
argument (value) that you can replace with a parameter. You can use the arrows to select a
different argument to replace.
Choose whether and how to replace the selected data:
1. Do not replace this data: Does not parameterize this data.
2. An existing column: If parameters already exist in the data table for this test, select an existing
parameter from the list.
3. A new column: Creates a new column for this parameter in the data table for this test. Adds the
selected data to this column of the data table. The default name for the new parameter is the
logical name of the object in the selected. TSL statement above. Accept this name or assign a
new name.
xi. The final screen of the wizard opens.
1. If you want the data table to open after you close the wizard, select Show data table now.
2. To perform the tasks specified in previous screens and close the wizard, click Finish.
3. To close the wizard without making any changes to the test script, click Cancel.

90) What are the three modes of running the scripts?


a) WinRunner provides three modes in which to run testsVerify, Debug, and Update. You use
each mode during a different phase of the testing process.
i. Verify
1. Use the Verify mode to check your application.
ii. Debug
1. Use the Debug mode to help you identify bugs in a test script.
iii. Update
1. Use the Update mode to update the expected results of a test or to create a new expected
results folder.

91) Explain the following TSL functions:


a) Ddt_open
i. Creates or opens a datatable file so that WinRunner can access it.
Syntax: ddt_open ( data_table_name, mode );
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first

127

row in the file contains the names of the parameters. This row is labeled row 0.
mode The mode for opening the data table: DDT_MODE_READ (read-only) or
DDT_MODE_READWRITE (read or write).
b) Ddt_save
i. Saves the information into a data file.
Syntax: dt_save (data_table_name);
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table.
c) Ddt_close
i. Closes a data table file
Syntax: ddt_close ( data_table_name );
data_table_name The name of the data table. The data table is a Microsoft Excel file or a tabbed
text file. The first row in the file contains the names of the parameters.
d) Ddt_export
i. Exports the information of one data table file into a different data table file.
Syntax: ddt_export (data_table_namename1, data_table_namename2);
data_table_namename1 The source data table filename.
data_table_namename2 The destination data table filename.
e) Ddt_show
i. Shows or hides the table editor of a specified data table.
Syntax: ddt_show (data_table_name [, show_flag]);
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table.
show_flag The value indicating whether the editor should be shown (default=1) or hidden (0).
f) Ddt_get_row_count
i. Retrieves the no. of rows in a data tables

128

Syntax: ddt_get_row_count (data_table_name, out_rows_count);


data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters.
out_rows_count The output variable that stores the total number of rows in the data table.
g) ddt_next_row
i. Changes the active row in a database to the next row
Syntax: ddt_next_row (data_table_name);
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters.
h) ddt_set_row
i. Sets the active row in a data table.
Syntax: ddt_set_row (data_table_name, row);
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters. This row is labeled row 0.
row The new active row in the data table.
i) ddt_set_val
i. Sets a value in the current row of the data table
Syntax: ddt_set_val (data_table_name, parameter, value);
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters. This row is labeled row 0.
parameter The name of the column into which the value will be inserted.
value The value to be written into the table.
j) ddt_set_val_by_row

129

i. Sets a value in a specified row of the data table.


Syntax: ddt_set_val_by_row (data_table_name, row, parameter, value);
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters. This row is labeled row 0.
row The row number in the table. It can be any existing row or the current row number plus 1,
which will add a new row to the data table.
parameter The name of the column into which the value will be inserted.
value The value to be written into the table.
k) ddt_get_current_row
i. Retrieves the active row of a data table.
Syntax: ddt_get_current_row ( data_table_name, out_row );
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters. This row is labeled row 0.
out_row The output variable that stores the active row in the data table.
l) ddt_is_parameter
i. Returns whether a parameter in a datatable is valid
Syntax: ddt_is_parameter (data_table_name, parameter);
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters.
parameter The parameter name to check in the data table.
m) ddt_get_parameters
i. Returns a list of all parameters in a data table.
Syntax: ddt_get_parameters ( table, params_list, params_num );

130

table The pathname of the data table.


params_list This out parameter returns the list of all parameters in the data table, separated by
tabs.
params_num This out parameter returns the number of parameters in params_list.
n) ddt_val
i. Returns the value of a parameter in the active roe in a data table.
Syntax: ddt_val (data_table_name, parameter);
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters.
parameter The name of the parameter in the data table.
o) ddt_val_by_row
i. Returns the value of a parameter in the specified row in a data table.
Syntax: ddt_val_by_row ( data_table_name, row_number, parameter );
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters. This row is labeled row 0.
row_number The number of the row in the data table.
parameter The name of the parameter in the data table.
p) ddt_report_row
i. Reports the active row in a data table to the test results
Syntax: ddt_report_row (data_table_name);
data_table_name The name of the data table. The name may be the table variable name, the
Microsoft Excel file or a tabbed text file name, or the full path and file name of the table. The first
row in the file contains the names of the parameters. This row is labeled row 0.
q) ddt_update_from_db

131

i. imports data from a database into a data table. It is inserted into your test script when you
select the Import data from a database option in the DataDriver Wizard. When you run your test,
this function updates the data table with data from the database.

92) How do you handle unexpected events and errors?


a) WinRunner uses exception handling to detect an unexpected event when it occurs and act to
recover the test run.
WinRunner enables you to handle the following types of exceptions:
Pop-up exceptions: Instruct WinRunner to detect and handle the appearance of a specific
window.
TSL exceptions: Instruct WinRunner to detect and handle TSL functions that return a specific
error code.
Object exceptions: Instruct WinRunner to detect and handle a change in a property for a specific
GUI object.
Web exceptions: When the WebTest add-in is loaded, you can instruct WinRunner to handle
unexpected events and errors that occur in your Web site during a test run.

93) How do you handle pop-up exceptions?


a) A pop-up exception Handler handles the pop-up messages that come up during the execution
of the script in the AUT. TO handle this type of exception we make WinRunner learn the window
and also specify a handler to the exception. It could be
i. Default actions: WinRunner clicks the OK or Cancel button in the pop-up window, or presses
Enter on the keyboard. To select a default handler, click the appropriate button in the dialog box.
ii. User-defined handler: If you prefer, specify the name of your own handler. Click User Defined
Function Name and type in a name in the User Defined Function Name box.

94) How do you handle TSL exceptions?


a) A TSL exception enables you to detect and respond to a specific error code returned during
test execution.
b) Suppose you are running a batch test on an unstable version of your application. If your
application crashes, you want WinRunner to recover test execution. A TSL exception can instruct
WinRunner to recover test execution by exiting the current test, restarting the application, and
continuing with the next test in the batch.

132

c) The handler function is responsible for recovering test execution. When WinRunner detects a
specific error code, it calls the handler function. You implement this function to respond to the
unexpected error in the way that meets your specific testing needs.
d) Once you have defined the exception, WinRunner activates handling and adds the exception
to the list of default TSL exceptions in the Exceptions dialog box. Default TSL exceptions are
defined by the XR_EXCP_TSL configuration parameter in the wrun.ini configuration file.

95) How do you handle object exceptions?


a) During testing, unexpected changes can occur to GUI objects in the application you are
testing. These changes are often subtle but they can disrupt the test run and distort results.
b) You could use exception handling to detect a change in property of the GUI object during the
test run, and to recover test execution by calling a handler function and continue with the test
execution

96) How do you comment your script?


a) We comment a script or line of script by inserting a # at the beginning of the line.

97) What is a compile module?


a) A compiled module is a script containing a library of user-defined functions that you want to call
frequently from other tests. When you load a compiled module, its functions are automatically
compiled and remain in memory. You can call them directly from within any test.
b) Compiled modules can improve the organization and performance of your tests. Since you
debug compiled modules before using them, your tests will require less error-checking. In
addition, calling a function that is already compiled is significantly faster than interpreting a
function in a test script.

98) What is the difference between script and compile module?


a) Test script contains the executable file in WinRunner while Compiled Module is used to store
reusable functions. Complied modules are not executable.
b) WinRunner performs a pre-compilation automatically when it saves a module assigned a
property value of Compiled Module.
c) By default, modules containing TSL code have a property value of 'main'. Main modules are
called for execution from within other modules. Main modules are dynamically compiled into
machine code only when WinRunner recognizes a 'call' statement. Example of a call for the
'app_init' script:
call cso_init();

133

call( 'C:\\MyAppFolder\\' & 'app_init' );


d) Compiled modules are loaded into memory to be referenced from TSL code in any module.
Example of a load statement:
reload (C:\\MyAppFolder\\' & 'flt_lib');
or
load ('C:\\MyAppFolder\\' & 'flt_lib');

99) Write and explain various loop command?


a) A for loop instructs WinRunner to execute one or more statements a specified number of
times.
It has the following syntax:
for ( [ expression1 ]; [ expression2 ]; [ expression3 ] )
statement
i. First, expression1 is executed. Next, expression2 is evaluated. If expression2 is true, statement
is executed and expression3 is executed. The cycle is repeated as long as expression2 remains
true. If expression2 is false, the for statement terminates and execution passes to the first
statement immediately following.
ii. For example, the for loop below selects the file UI_TEST from the File Name list
iii. in the Open window. It selects this file five times and then stops.
set_window ('Open')
for (i=0; i<5; i++)
list_select_item('File_Name:_1','UI_TEST'); #Item Number2
b) A while loop executes a block of statements for as long as a specified condition is true.
It has the following syntax:
while ( expression )
statement ;
i. While expression is true, the statement is executed. The loop ends when the expression is
false. For example, the while statement below performs the same function as the for loop above.
set_window ('Open');
i=0;

134

while (i<5){
i++;
list_select_item ('File Name:_1', 'UI_TEST'); # Item Number 2
}
c) A do/while loop executes a block of statements for as long as a specified condition is true.
Unlike the for loop and while loop, a do/while loop tests the conditions at the end of the loop, not
at the beginning.
A do/while loop has the following syntax:
do
statement
while (expression);
i. The statement is executed and then the expression is evaluated. If the expression is true, then
the cycle is repeated. If the expression is false, the cycle is not repeated.
ii. For example, the do/while statement below opens and closes the Order dialog box of Flight
Reservation five times.
set_window ('Flight Reservation');
i=0;
do
{
menu_select_item ('File;Open Order...');
set_window ('Open Order');
button_press ('Cancel');
i++;
}
while (i<5);

100) Write and explain decision making command?


a) You can incorporate decision-making into your test scripts using if/else or switch statements.
i. An if/else statement executes a statement if a condition is true; otherwise, it executes another
statement.
It has the following syntax:
if ( expression )
statement1;
[ else

135

statement2; ]
expression is evaluated. If expression is true, statement1 is executed. If expression1 is false,
statement2 is executed.
b) A switch statement enables WinRunner to make a decision based on an expression that can
have more than two values.
It has the following syntax:
switch (expression )
{
case case_1: statements
case case_2: statements
case case_n: statements
default: statement(s)
}
The switch statement consecutively evaluates each case expression until one is found that
equals the initial expression. If no case is equal to the expression, then the default statements are
executed. The default statements are optional.

101) Write and explain switch command?


a) A switch statement enables WinRunner to make a decision based on an expression that can
have more than two values.
It has the following syntax:
switch (expression )
{
case case_1: statements
case case_2: statements
case case_n: statements
default: statement(s)
}
b) The switch statement consecutively evaluates each case expression until one is found that
equals the initial expression. If no case is equal to the expression, then the default statements are
executed. The default statements are optional.

102) How do you write messages to the report?

136

a) To write message to a report we use the report_msg statement


Syntax: report_msg (message);
103) What is a command to invoke application?
a) Invoke_application is the function used to invoke an application.
Syntax: invoke_application(file, command_option, working_dir, SHOW);

104) What is the purpose of tl_step command?


a) Used to determine whether sections of a test pass or fail.
Syntax: tl_step(step_name, status, description);

105) Which TSL function you will use to compare two files?
a) We can compare 2 files in WinRunner using the file_compare function.
Syntax: file_compare (file1, file2 [, save file]);

106) What is the use of function generator?


a) The Function Generator provides a quick, error-free way to program scripts. You can:
i. Add Context Sensitive functions that perform operations on a GUI object or get information from
the application being tested.
ii. Add Standard and Analog functions that perform non-Context Sensitive tasks such as
synchronizing test execution or sending user-defined messages to a report.
iii. Add Customization functions that enable you to modify WinRunner to suit your testing
environment.

107) What is the use of putting call and call_close statements in the test script?
a) You can use two types of call statements to invoke one test from another:
i. A call statement invokes a test from within another test.
ii. A call_close statement invokes a test from within a script and closes the test when the test is
completed.
iii. The call statement has the following syntax:
1. call test_name ( [ parameter1, parameter2, ...parametern ] );
iv. The call_close statement has the following syntax:
1. call_close test_name ( [ parameter1, parameter2, ... parametern ] );
v. The test_name is the name of the test to invoke. The parameters are the parameters defined
for the called test.
vi. The parameters are optional. However, when one test calls another, the call statement should

137

designate a value for each parameter defined for the called test. If no parameters are defined for
the called test, the call statement must contain an empty set of parentheses.

108) What is the use of treturn and texit statements in the test script?
a) The treturn and texit statements are used to stop execution of called tests.
i. The treturn statement stops the current test and returns control to the calling test.
ii. The texit statement stops test execution entirely, unless tests are being called from a batch
test. In this case, control is returned to the main batch test.
b) Both functions provide a return value for the called test. If treturn or texit is not used, or if no
value is specified, then the return value of the call statement is 0.
treturn
c) The treturn statement terminates execution of the called test and returns control to the calling
test.
The syntax is:
treturn [( expression )];
d) The optional expression is the value returned to the call statement used to invoke the test.
texit
e) When tests are run interactively, the texit statement discontinues test execution. However,
when tests are called from a batch test, texit ends execution of the current test only; control is
then returned to the calling batch test.
The syntax is:
texit [( expression )];

109) Where do you set up the search path for a called test.
a) The search path determines the directories that WinRunner will search for a called test.
b) To set the search path, choose Settings > General Options. The General Options dialog box
opens. Click the Folders tab and choose a search path in the Search Path for Called Tests box.
WinRunner searches the directories in the order in which they are listed in the box. Note that the
search paths you define remain active in future testing sessions.

110) How you create user-defined functions and explain the syntax?
a) A user-defined function has the following structure:
[class] function name ([mode] parameter...)
{

138

declarations;
statements;
}
b) The class of a function can be either static or public. A static function is available only to the
test or module within which the function was defined.
c) Parameters need not be explicitly declared. They can be of mode in, out, or inout. For all nonarray parameters, the default mode is in. For array parameters, the default is inout. The
significance of each of these parameter types is as follows:
in: A parameter that is assigned a value from outside the function.
out: A parameter that is assigned a value from inside the function.
inout: A parameter that can be assigned a value from outside or inside the function.

111) What does static and public class of a function means?


a) The class of a function can be either static or public.
b) A static function is available only to the test or module within which the function was defined.
c) Once you execute a public function, it is available to all tests, for as long as the test containing
the function remains open. This is convenient when you want the function to be accessible from
called tests. However, if you want to create a function that will be available to many tests, you
should place it in a compiled module. The functions in a compiled module are available for the
duration of the testing session.
d) If no class is explicitly declared, the function is assigned the default class, public.

112) What does in, out and input parameters means?


a) in: A parameter that is assigned a value from outside the function.
b) out: A parameter that is assigned a value from inside the function.
c) inout: A parameter that can be assigned a value from outside or inside the function.

113) What is the purpose of return statement?


a) This statement passes control back to the calling function or test. It also returns the value of
the evaluated expression to the calling function or test. If no expression is assigned to the return
statement, an empty string is returned.
Syntax: return [( expression )];

114) What does auto, static, public and extern variables means?

139

a) auto: An auto variable can be declared only within a function and is local to that function. It
exists only for as long as the function is running. A new copy of the variable is created each time
the function is called.
b) static: A static variable is local to the function, test, or compiled module in which it is declared.
The variable retains its value until the test is terminated by an Abort command. This variable is
initialized each time the definition of the function is executed.
c) public: A public variable can be declared only within a test or module, and is available for all
functions, tests, and compiled modules.
d) extern: An extern declaration indicates a reference to a public variable declared outside of the
current test or module.

115) How do you declare constants?


a) The const specifier indicates that the declared value cannot be modified. The class of a
constant may be either public or static. If no class is explicitly declared, the constant is assigned
the default class public. Once a constant is defined, it remains in existence until you exit
WinRunner.
b) The syntax of this declaration is:
[class] const name [= expression];

116) How do you declare arrays?


a) The following syntax is used to define the class and the initial expression of an array. Array
size need not be defined in TSL.
b) class array_name [ ] [=init_expression]
c) The array class may be any of the classes used for variable declarations (auto, static, public,
extern).

117) How do you load and unload a compile module?


a) In order to access the functions in a compiled module you need to load the module. You can
load it from within any test script using the load command; all tests will then be able to access the
function until you quit WinRunner or unload the compiled module.
b) You can load a module either as a system module or as a user module. A system module is
generally a closed module that is invisible to the tester. It is not displayed when it is loaded,
cannot be stepped into, and is not stopped by a pause command. A system module is not
unloaded when you execute an unload statement with no parameters (global unload).
load (module_name [,1|0] [,1|0] );

140

The module_name is the name of an existing compiled module.


Two additional, optional parameters indicate the type of module. The first parameter indicates
whether the function module is a system module or a user module: 1 indicates a system module;
0 indicates a user module.
(Default = 0)
The second optional parameter indicates whether a user module will remain open in the
WinRunner window or will close automatically after it is loaded: 1 indicates that the module will
close automatically; 0 indicates that the module will remain open.
(Default = 0)
c) The unload function removes a loaded module or selected functions from memory.
d) It has the following syntax:
unload ( [ module_name | test_name [ , 'function_name' ] ] );

118) Why you use reload function?


a) If you make changes in a module, you should reload it. The reload function removes a loaded
module from memory and reloads it (combining the functions of unload and load).
The syntax of the reload function is:
reload ( module_name [ ,1|0 ] [ ,1|0 ] );
The module_name is the name of an existing compiled module.
Two additional optional parameters indicate the type of module. The first parameter indicates
whether the module is a system module or a user module: 1 indicates a system module; 0
indicates a user module.
(Default = 0)
The second optional parameter indicates whether a user module will remain open in the
WinRunner window or will close automatically after it is loaded. 1 indicates that the module will
close automatically. 0 indicates that the module will remain open.
(Default = 0)

119) Why does the minus sign not appear when using obj_type(), win_type(), type()?
If using any of the type() functions, minus signs actually means hold down the button for the
previous character. The solution is to put a backslash character '\\' before the minus sign. This
also applies to + < >.

141

120) Write and explain compile module?


121) How do you call a function from external libraries (dll).
122) What is the purpose of load_dll?
123) How do you load and unload external libraries?
124) How do you declare external functions in TSL?
125) How do you call windows APIs, explain with an example?

126) Write TSL functions for the following interactive modes:


i. Creating a dialog box with any message you specify, and an edit field.
ii. Create dialog box with list of items and message.
iii. Create dialog box with edit field, check box, and execute button, and a cancel button.
iv. Creating a browse dialog box from which user selects a file.
v. Create a dialog box with two edit fields, one for login and another for password input.
127) What is the purpose of step, step into, step out, step to cursor commands for debugging
your script?
128) How do you update your expected results?
129) How do you run your script with multiple sets of expected results?
130) How do you view and evaluate test results for various check points?
131) How do you view the results of file comparison?
132) What is the purpose of Wdiff utility?
133) What are batch tests and how do you create and run batch tests ?
134) How do you store and view batch test results?
135) How do you execute your tests from windows run command?
136) Explain different command line options?
137) What TSL function you will use to pause your script?
138) What is the purpose of setting a break point?
139) What is a watch list?
140) During debugging how do you monitor the value of the variables?

142

LOAD RUNNER

1. Can we test j2me application with load runner ?


What is load testing? - Load testing is to test that if the application works fine with the loads that
result from large number of simultaneous users, transactions and to determine weather it can
handle peak usage periods. What is Performance testing? - Timing for both read and update
transactions should

2. Which protocol has to be selected for record/playback Oracle 9i application?


Seeing your application is running on which protocol, any of these protocols can be set because
all are supportive for Load RunnerODBCSybase libOracle libPeople
softSapBaanSiebelRTEFTSMTPPOPHTTPRMICORBACOM/DCOMJDBCWindows sockets

3. What are the enhancements which have been included in loadrunner 8.0 when
compared to loadrunner 6.2?
HiHow can i get the winrunner an the loadrunner wizard? I would like to learn how to use it ?Can
you please suggest a site where i can load it from..

4. Can we use Load Runner for testing desktop applications or non web based
applications and how do we use
Yes we can use LoadRunner for the desktop appliocation. When you start load runner VU
generator , it asks you to select the type of protocal to use. There you have plenty of options from
E-business application( web based) to client/server applications. hopr it helps

5. How to call winrunner script in Loadrunner?


1.Create a scenario by replacing the VUser script with the GUI WinRunner script.2.Select Host>Details options from menu3.Enable the check box for GUI Winrunner(Mandatory to run the WR
Script)4.Execute the ScenarioNote: As you can work with only one instance of the winrunner at a
time, the maximumno

6. What r the types of parameterisation in load runner?List the step to do strees


testing?How many terminals
pls send me answer to tkkumar3@yahoo.co.in

7. What are the steps for doing load and performance testing using Load Runner?Note: I
need the actual process

143

8. What is concurrent load ? and corollation? what is the processof load runner?

9. What is planning for the test.


Here, we develop a clearly defined test plan to ensure the test scenarios we develop will
accomplish load-testing objectives. null

10. What enables the controller and the host to communicate with each other in Load
Runner?
following component should enabled on Host machine.1. Agent 2. Remote louncher

11. Where is Load testing usually done?


The Load testing is carried in the controlled environment based on the requirement specs from
the client the Load Test Plan followed with the scenarios are created & executed to match the
requirements. To speak more precisely the Load testing Episode is carried once the Performance
exercise

12. What are the only means of measuring performance?


transactions are the only means of measuring performance.

13. Testing requirement and design are not part of what?

14. According to Market analysis 70% of performance problem lies with what?

15. What is the level of system loading expected to occur during specific business
scenario?

16. What is run-time-setting.


Run-time-setting include loop.log and timing information.

17. When load runner is used .


When multiple users work concurrently .

18. What protocols does LoadRunner support?


Answered by jayashree on 2005-05-10 00:24:47: Industry standard protocols for example HTTP
and ODBC are explicitly supported by LoadRunner. Furthermore any protocol that communicates
over a windows socket can be supported

144

19. What do you mean by creating vuser script.


Creating vuser script for emulate the action that virtual user Perform during the scenario
execution.

20. What is rendezvous point.


To emulate peak load on the server.

21. What is load runner.


Load runner accurately measure and analysis the system performance and its functionality.

22. What can I monitor with LoadRunner?


With Loadrunner, we can see the response of the system, CPU utilization while it is being used
by multiple users and subjected to stress.

23. What are all the types of correlation?


To speak more specific about the co-relation the automatic correlation is where we set some
rules for correlation. It can be application server specific. Here values are replaced by data, which
are created by these rules. In manual correlation, the value we want to correlate is scanned and
create correlation

24. What are all the functions available in Loadrunner to do the corrlation?
Wdiff -This is a Loadrunner tool which can be user to spot the dynamic data to be
correlated. web_reg_save_param (const char *ParamName, <List of Attributes>, LAST); This is a
built in loadrunner function that can be used to find and save occurrences of a text string (text to
be

25. How do we do the correclation?


Establish items to be correlated (dynamic value) Find the left and right boundary of the
occurrences of the dynamic value Add a web_reg_save funtion to parameterise all occurrences
of the dynamic value- text between the left and right boundary.(Remember the escape character

26. What is 'Correlation' in Loadrunner?


Correlation is the identifying and resolving data which are , unique for each run of the script or
each iteration of an action. These dynamic data differ in each replay from the original recording
and causes the replay to fail.

145

27. What are the advantage of using load runner.


1-loadrunner automatically records the performance of the client/server during test. 2-loadrunner
checks where performance delays occur network/client delays. 3-loadrunner monitor the network
and server resource to help the improve performance.

28. What is scenario.


A scenario defines the events that occur during is testing session. Exam (deposit cash, withdraw
money).

29. What is the vuser in the scenario .


Load runner replace the human user with vuser.

30. What is vuser script.


While run a scenarion every vuser execute a script that script known as vuser script .

31. What the vuser script contain.


The vuser script include the function that measure and record the performance of the server
during the scenario.

32. What is transaction .


Transaction measure the time which takes for the server to respond to task submitted by the
vuser.

33. When the rendezvous point is insert .


When multiple vuser to perform tasks at exactly the same time then insert the rendezvous point to
emulate the peak load on the server.

34. What is load runner controller .


Controller is manage and maintain the scenario . using controller you control all the vuser in
single work station .

35. what is Host.


Host is machine which execute the vuser script.

146

36. what are the load runner testing process .


There are 5 steps. 1-planning the test. 2-creating the vuser script. 3-creating the scenario. 4running the scenario. 5-analysis the test result.

37. what are the process for developing a vuser script.


There are 5 steps for developing a vuser script. 1-recording the vuser script . 2-edit the vuser
script. 3-runtime setting . 4-run the vuser script in stand-alone mode. 5-incorporate the vuser
script into a load runner scenario.

38. how to create a scenario .


We have to install load runner controller to the host . Then we include list of host(where vuser
script execute) then list of vuser script (where vuser run) and then list of vuser that run during the
scenario.

39. what do you mean by Remote Command Launcher(RCL).


Rcl enables the controller to start the application on the Host machine .

40. what is load runner Agent.


Agent is interface between host machine and controller.

41. how you load a load runner Agent.


Controller instruct the remote command luncher to lunch the Agent .

42. how many types of vuser are available .


There are several type of vuser(GUI ,Database ,RTE(terminal emulator), SAP, DCOME, People
soft, java, Baan)

43. what is GUI vuser and on which platform it will run.


GUI vuser operate graphical user interface application and it can run in either the MS-Windows /
X-Windows environment .

44. what is MS-windows.


Win runner used for MS-Window application .

45. what is X-Windows.


X-runner and VX-runner for X-Windows application.

147

46. what is load runner API function .


Data base vuser do not operate client application .using load runner API function the database
vuser can access the data from the server.

47. how you develop the database vuser script .


Developing the database vuser script either by recording with load runner vuser script generator
(VuGen) or by using load runner vuser script template.

48. what is VuGen.


It is a load runner vuser script generator(use for recording the data base vuser script )

49. how many section database vuser script have.


3 section ,written in code that assemble in C, SQL call to the database, written in TSL(test script
language).

50. how you enhance the basic script .


By adding control-flow, structure, by inserting transaction point and rendezvous point, adding
functions

51. what is stand-alone mode.


To verify that the script runs correctly .

52. what type of function generate and insert by the vugen to the script when you record a
script .
1-LR Function.(vuser function) 2- protocol function.

53. what is LR-function.


obtain the information about vuser running in a scenario .

54. what is protocol function.


Obtain the information about the type of vuser.

55. what are the section contain by the vugen while creating a vuser script .
Vugen contain the 3 section . 1-vuser-init 2-action. 3-vuser-end.

56. what is vuser-init section .


Record a log in to the server(vuser initialize loaded).

148

57. what is action section .


Record the client activity .

58. what is vuser-end section.


Record a log off in to the server (vuser stoped).

59. how vugen create a vuser script.


By recording the activity between client and server.

60. how you edit the script .


While editing the script we have to inserting the transaction point and rendezvous point .

61. what is the load runner start-transaction and its syntax.


It will start the transaction on the script. Syntax. Lr-start-transaction("transaction name").

62. what is the load runner end transaction and its syntax.
It will end the transaction. Syntax. Lr-end-transaction("transaction name", LR-AUTO).

63. where you insert the rendezvous point .


Rendezvous point insert in to the script to calculate the peak load of the server. Syntax. lrrendezvous("rendezvous name").

64. what are the element in the load runner controller.


Title bar(name of the scenarion presently working). Menu bar(selecting the various command).
Tool bar. Status bar.

65. what are the 5 icons appear in the buttom of the controller windows.
1-host windows(list of machine). 2-script windows(list of all the vuser script) 3-rendezvous
windows. 4-transaction windows(display all the transaction) . 5-output window( display error and
notification message).

66. what is .lrs.


Load runner save the information in a scenario files.

67. what is scenario wizard .


Through scenario wizard we can create a new scenario.

149

68. what is filtering and sorting.


We can filter the information display only those items that meet the selected criteria(filter box)
.exam you can filter vuser only those who are in ready state. Sorting - we can sort all the vuser in
the vuser list. In order to their vuser ID(1,2,3,4,5,6,7,8,9).

69. what are the information crating for each host.


1-the status of the host. 2-the platform type of the host(windows/unix). 3-details of the scenario.

70. how to create a host list for a scenario.


1-install remote command luncher on every machine. 2-add the name of the host to the host lists.
3-set attributes for each host. 4-select which hosts will take part in the scenario.

71. how to modify the host attribute .

72. what the host attributes determine .


1-the maximum number of vuser that host can run. 2-the initialization quota . 3-the location of the
win runner configuration file. 4. the location of the file during run-time.

73. how you set maximum number of vuser that a host can run.
We can modify the maximum number of vuser according to the (available resource , the needs of
your scenario, load runner license agreements).

74. what do you mean by initialization of quota.


Capabilities of the host that at a time how many vuser Are initialize .

75. when the load runner controller open the win runner file then what is the location of
the winner configuration
Wrun.ini.

76. what is scenario default .


Instruct the vuser to use the win runner configuration file.

77. what is local configuration file.


Instruct the vuser to use hosts win runner configuration file.

150

78. what do you mean by path.


Use win runner configuration file that is in a specific location on the network.

79. during run time where the hosts saves the files.
In temporally in the local drive of each host.

80. what is script list.


It contain all the vuser script that vuser can run.
81. what are the information contain by script windows for each script in the list.
1-name of the vuser script . 2-the type of the vuser. 3-the location(path). 4-command line option.

82. how to modify the script.


Using vuser script information dialog box.

83. what is the purpose of running the scenario .


To check the response time of the client/server system under load.

84. why we insert the rendezvous point while running the scenario.
If a multiple vuser to perform a tasks at exactly the same time.

85. when a scenario run exactly what happened .


1-The controller check the scenario configuration information. 2-then next it invoke the application
that you select to run with the scenario . 3- then transform each script to its related hosts, when
the vuser are ready they start execution.

86. how to run a scenario.


Open an existing scenario . Configure the scenario. Set the result directory. Run the scenario.

87. when you initialize the vuser what happen .


The vuser status change from DOWN to PENDING to INITILIZAING to READY. If vuser fails to
initialize , the vuser status changes to ERROR.

88. what is pause command.


It changes the status of the vuser from RUNNING TO PAUSE.

151

89. what is running virtual user graph.


It displays the number of the vuser that execute vuser script during each second of the scenario
run. Only running and rendez state are include.(loading, ready and pause are not displayed) .

90. what is report viewer .


Each report viewer contain the report header and report viewer tool bar.

91. what is report header and what are the information contains.
It display general scenario information and it contain the information like (title, scenario, result
start time, end time and duration).

92. what is rendezvous graph.


It indicate when vuser were released from rendezvous point and how many vuser are released
from each point.it help the transaction performance time .

93. what is transaction per second graph(pass).


It display the number of complited , successful transaction perform during each second of
scenario run.

94. what is transaction per second graph(pass).

95. what in percentile graph.


The percentage of transaction that were performed within a given time range.

96. what is transaction performance graph.


Display the average time taken to perform transaction during each second of the scenario run.

97. How many users can I emulate with Load-Runner on a PC?


That also depends on the licence of the loadrunner software.There are different licence
management available.For a normal loadrunner license we can generate upto 250 users...thats
the maximum limit............but depends on what kind of licence u have

98. What are the Vuser components in LoadRunner?


ApplicationComponents used are client, database or additionally business application
server.) Web Server works on and through LAN,WAN,or www connection. Application Server
components are client, business server and database server without use of www.but through
Protocols like

152

99. What are the reasons why parameterization is necessary when load testing the Web
server and the database
Parameterization is generally done to test with multiple set of data or records.

100. Load Runner Function - How to get current system time


This function is developed to usein Mercury Load Runner peformance tool.This main use of this
functions to return the current system time at any given point of time while load runner script is
running.This functiona can be used to report transaction times , script starti time and end
time. long

101. What do I need to know to do load testing in addition to knowing how to use the
Load-Runner tool?
In addition to knowing the tool : - Management aspects of Load Testing, Planning being
paramount - Requirements gathering, Profile/Mix, SLA, Acceptance Criteria.... - an general
understanding of the protocol you are working with, developers can be unhelpful - a basic
understanding.

102. What is load testing?


- Load testing is to test that if the application works fine with the loads that result from large
number of simultaneous users, transactions and to determine weather it can handle peak usage
periods.
103. What is Performance testing?
- Timing for both read and update transactions should be gathered to determine whether system
functions are being performed in an acceptable timeframe. This should be done standalone and
then in a multi user environment to determine the effect of multiple transactions on the timing of a
single transaction.
104. Did u use LoadRunner? What version?
- Yes. Version 7.2.
1. Explain the Load testing process?

153

Step 1: Planning the test. Here, we develop a clearly defined test plan to ensure the test
scenarios we develop will accomplish load-testing objectives.
Step 2: Creating Vusers. Here, we create Vuser scripts that contain tasks performed by each
Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions.
Step 3: Creating the scenario. A scenario describes the events that occur during a testing
session. It includes a list of machines, scripts, and Vusers that run during the scenario. We create
scenarios using LoadRunner Controller. We can create manual scenarios as well as goaloriented scenarios. In manual scenarios, we define the number of Vusers, the load generator
machines, and percentage of Vusers to be assigned to each script. For web tests, we may create
a goal-oriented scenario where we define the goal that our test has to achieve. LoadRunner
automatically builds a scenario for us.
Step 4: Running the scenario.
We emulate load on the server by instructing multiple Vusers to perform tasks simultaneously.
Before the testing, we set the scenario configuration and scheduling. We can run the entire
scenario, Vuser groups, or individual Vusers.
Step 5: Monitoring the scenario.
We monitor scenario execution using the LoadRunner online runtime, transaction, system
resource, Web resource, Web server resource, Web application server resource, database server
resource, network delay, streaming media resource, firewall server resource, ERP server
resource, and Java performance monitors.
Step 6: Analyzing test results. During scenario execution, LoadRunner records the
performance of the application under different loads. We use LoadRunner.s graphs and reports to
analyze the application.s performance.
2. When do you do load and performance Testing?
- We perform load testing once we are done with interface (GUI) testing. Modern system
architectures are large and complex. Whereas single user testing primarily on functionality and
user interface of a system component, application testing focuses on performance and reliability
of an entire system. For example, a typical application-testing scenario might depict 1000 users
logging in simultaneously to a system. This gives rise to issues such as what is the response time
of the system, does it crash, will it go with different software applications and platforms, can it

154

hold so many hundreds and thousands of users, etc. This is when we set do load and
performance testing.
3. What are the components of LoadRunner?
- The components of LoadRunner are The Virtual User Generator, Controller, and the Agent
process, LoadRunner Analysis and Monitoring, LoadRunner Books Online.
4. What Component of LoadRunner would you use to record a Script?
- The Virtual User Generator (VuGen) component is used to record a script. It enables you to
develop Vuser scripts for a variety of application types and communication protocols.
5. What Component of LoadRunner would you use to play Back the script in multi user
mode?
- The Controller component is used to playback the script in multi-user mode. This is done during
a scenario run where a vuser script is executed by a number of vusers in a group.
6. What is a rendezvous point?
- You insert rendezvous points into Vuser scripts to emulate heavy user load on the server.
Rendezvous points instruct Vusers to wait during test execution for multiple Vusers to arrive at a
certain point, in order that they may simultaneously perform a task. For example, to emulate peak
load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash
into their accounts at the same time.
7. What is a scenario?
- A scenario defines the events that occur during each testing session. For example, a scenario
defines and controls the number of users to emulate, the actions to be performed, and the
machines on which the virtual users run their emulations.
8. Explain the recording mode for web Vuser script?
- We use VuGen to develop a Vuser script by recording a user performing typical business
processes on a client application. VuGen creates the script by recording the activity between the
client and the server. For example, in web based applications, VuGen monitors the client end of
the database and traces all the requests sent to, and received from, the database server. We use

155

VuGen to: Monitor the communication between the application and the server; Generate the
required function calls; and Insert the generated function calls into a Vuser script.
9. Why do you create parameters?
- Parameters are like script variables. They are used to vary input to the server and to emulate
real users. Different sets of data are sent to the server each time the script is run. Better simulate
the usage model for more accurate testing from the Controller; one script can emulate many
different users on the system.
10. What is correlation? Explain the difference between automatic correlation and manual
correlation?
- Correlation is used to obtain data which are unique for each run of the script and which are
generated by nested queries. Correlation provides the value to avoid errors arising out of
duplicate values and also optimizing the code (to avoid nested queries). Automatic correlation is
where we set some rules for correlation. It can be application server specific. Here values are
replaced by data which are created by these rules. In manual correlation, the value we want to
correlate is scanned and create correlation is used to correlate.
11. How do you find out where correlation is required? Give few examples from your
projects?
- Two ways: First we can scan for correlations, and see the list of values which can be correlated.
From this we can pick a value to be correlated. Secondly, we can record two scripts and compare
them. We can look up the difference file to see for the values which needed to be correlated. In
my project, there was a unique id developed for each customer, it was nothing but Insurance
Number, it was generated automatically and it was sequential and this value was unique. I had to
correlate this value, in order to avoid errors while running my script. I did using scan for
correlation.
12. Where do you set automatic correlation options?
- Automatic correlation from web point of view can be set in recording options and correlation tab.
Here we can enable correlation for the entire script and choose either issue online messages or
offline actions, where we can define rules for that correlation. Automatic correlation for database
can be done using show output window and scan for correlation and picking the correlate query
tab and choose which query value we want to correlate. If we know the specific value to be
correlated, we just do create correlation for the value and specify how the value to be created.

156

13. What is a function to capture dynamic values in the web Vuser script?
- Web_reg_save_param function saves dynamic data information to a parameter.
14. When do you disable log in Virtual User Generator, When do you choose standard and
extended logs?
- Once we debug our script and verify that it is functional, we can enable logging for errors only.
When we add a script to a scenario, logging is automatically disabled. Standard Log Option:
When

you

select

Standard log, it creates a standard log of functions and messages sent during script execution to
use for debugging. Disable this option for large load testing scenarios.
When you copy a script to a scenario, logging is automatically disabled Extended Log Option:
Select extended log to create an extended log, including warnings and other messages. Disable
this option for large load testing scenarios. When you copy a script to a scenario, logging is
automatically disabled. We can specify which additional information should be added to the
extended log using the Extended log options.
15. How do you debug a LoadRunner script?
- VuGen contains two options to help debug Vuser scripts-the Run Step by Step command and
breakpoints. The Debug settings in the Options dialog box allow us to determine the extent of the
trace to be performed during scenario execution. The debug information is written to the Output
window.

We

can

manually

set

the

message

class

within

your

script

using

the

lr_set_debug_message function. This is useful if we want to receive debug information about a


small section of the script only.
16. How do you write user defined functions in LR? Give me few functions you wrote in
your previous project?
- Before we create the User Defined functions

we need to create the external

library (DLL) with the function. We add this library to VuGen bin directory. Once the library is
added then we assign user defined function as a parameter. The function should have the
following format: __declspec (dllexport) char* <function name>(char*, char*)Examples of user
defined functions are as follows:GetVersion, GetCurrentTime, GetPltform are some of the user
defined functions used in my earlier project.
17. What are the changes you can make in run-time settings?

157

- The Run Time Settings that we make are:


a) Pacing - It has iteration count.
b) Log - Under this we have Disable Logging Standard Log and
c) Extended Think Time - In think time we have two options like Ignore think time and Replay
think time.
d) General - Under general tab we can set the vusers as process or as multithreading and
whether each step as a transaction.
18. Where do you set Iteration for Vuser testing?
- We set Iterations in the Run Time Settings of the VuGen. The navigation for this is Run time
settings, Pacing tab, set number of iterations.
19. How do you perform functional testing under load?
- Functionality under load can be tested by running several Vusers concurrently. By increasing
the amount of Vusers, we can determine how much load the server can sustain.
20. What is Ramp up? How do you set this?
- This option is used to gradually increase the amount of Vusers/load on the server. An initial
value

is

set

and

value

to

wait

between

intervals

can

be

specified. To set Ramp Up, go to Scenario Scheduling Options


21. What is the advantage of running the Vuser as thread?
- VuGen provides the facility to use multithreading. This enables more Vusers to be run per
generator. If the Vuser is run as a process, the same driver program is loaded into memory for
each Vuser, thus taking up a large amount of memory. This limits the number of Vusers that can
be

run

on

a single

generator. If the Vuser is run as a thread, only one instance of the driver program is loaded into
memory

for

the

given

number

of

Vusers (say 100). Each thread shares the memory of the parent driver program, thus enabling
more Vusers to be run per generator.
22. If you want to stop the execution of your script on error, how do you do that?

158

- The lr_abort function aborts the execution of a Vuser script. It instructs the Vuser to stop
executing the Actions section, execute the vuser_end section and end the execution. This
function is useful when you need to manually abort a script execution as a result of a specific
error condition. When you end a script using this function, the Vuser is assigned the status
"Stopped". For this to take effect, we have to first uncheck the .Continue on error. option in RunTime Settings.
23. What is the relation between Response Time and Throughput?
- The Throughput graph shows the amount of data in bytes that the Vusers received from the
server in a second. When we compare this with the transaction response time, we will notice that
as throughput decreased, the response time also decreased. Similarly, the peak throughput and
highest response time would occur approximately at the same time.
24. Explain the Configuration of your systems?
- The configuration of our systems refers to that of the client machines on which we run the
Vusers. The configuration of any client machine includes its hardware settings, memory,
operating system, software applications, development tools, etc. This system component
configuration should match with the overall system configuration that would include the network
infrastructure, the web server, the database server, and any other components that go with this
larger system so as to achieve the load testing objectives.
25. How do you identify the performance bottlenecks?
- Performance Bottlenecks can be detected by using monitors. These monitors might be
application server monitors, web server monitors, database server monitors and network
monitors. They help in finding out the troubled area in our scenario which causes increased
response time. The measurements made are usually performance response time, throughput,
hits/sec, network delay graphs, etc.
26. If web server, database and Network are all fine where could be the problem?
- The problem could be in the system itself or in the application server or in the code written for
the application.
27. How did you find web server related issues?

159

- Using Web resource monitors we can find the performance of web servers. Using these
monitors we can analyze throughput on the web server, number of hits per second that occurred
during scenario, the number of http responses per second, the number of downloaded pages per
second.
28. How did you find database related issues?
- By running .Database. monitor and help of .Data Resource Graph. we can find database related
issues. E.g. You can specify the resource you want to measure on before running the controller
and than you can see database related issues
29. Explain all the web recording options?
30. What is the difference between Overlay graph and Correlate graph?
- Overlay Graph: It overlay the content of two graphs that shares a common x-axis. Left Y-axis
on the merged graph show.s the current graph.s value & Right Y-axis show the value of Y-axis of
the graph that was merged. Correlate Graph: Plot the Y-axis of two graphs against each other.
The active graph.s Y-axis becomes X-axis of merged graph. Y-axis of the graph that was merged
becomes merged graph.s Y-axis.
31. How did you plan the Load? What are the Criteria?
- Load test is planned to decide the number of users, what kind of machines we are going to use
and from where they are run. It is based on 2 important documents, Task Distribution Diagram
and Transaction profile. Task Distribution Diagram gives us the information on number of users
for a particular transaction and the time of the load. The peak usage and off-usage are decided
from this Diagram. Transaction profile gives us the information about the transactions name and
their priority levels with regard to the scenario we are deciding.
32. What does vuser_init action contain?
- Vuser_init action contains procedures to login to a server.
33. What does vuser_end action contain?
- Vuser_end section contains log off procedures.
34. What is think time? How do you change the threshold?

160

- Think time is the time that a real user waits between actions. Example: When a user receives
data from a server, the user may wait several seconds to review the data before responding. This
delay is known as the think time. Changing the Threshold: Threshold level is the level below
which the recorded think time will be ignored. The default value is five (5) seconds. We can
change the think time threshold in the Recording options of the Vugen.
35. What is the difference between standard log and extended log?
- The standard log sends a subset of functions and messages sent during script execution to a
log. The subset depends on the Vuser type Extended log sends a detailed script execution
messages to the output log. This is mainly used during debugging when we want information
about: Parameter substitution. Data returned by the server. Advanced trace.
36. Explain the following functions: - lr_debug_message
- The lr_debug_message function sends a debug message to the output log when the specified
message class is set. lr_output_message - The lr_output_message function sends notifications
to the Controller Output window and the Vuser log file. lr_error_message - The
lr_error_message function sends an error message to the LoadRunner Output window. lrd_stmt
- The lrd_stmt function associates a character string (usually a SQL statement) with a cursor. This
function sets a SQL statement to be processed. lrd_fetch - The lrd_fetch function fetches the
next row from the result set.
37. Throughput - If the throughput scales upward as time progresses and the number of
Vusers increase, this indicates that the bandwidth is sufficient.
If the graph were to remain relatively flat as the number of Vusers increased, it would
be

reasonable

to

conclude

that

the

bandwidth

is

constraining

the

volume

of

data delivered.
38. Types of Goals in Goal-Oriented Scenario
- Load Runner provides you with five different types of goals in a goal oriented scenario:
39. The number of concurrent Vusers
40. The number of hits per second
41. The number of transactions per second
42. The number of pages per minute
43. The transaction response time that you want your scenario

161

44. Analysis Scenario (Bottlenecks):


In Running Vuser graph correlated with the response time graph you can see that as the number
of Vusers increases, the average response time of the check itinerary transaction very gradually
increases. In other words, the average response time steadily increases as the load
increases. At 56 Vusers, there is a sudden, sharp increase in the average response
time. We say that the test broke the server. That is the mean time before failure (MTBF). The
response time clearly began to degrade when there were more than 56 Vusers running
simultaneously.
45. What is correlation? Explain the difference between automatic correlation and manual
correlation?
- Correlation is used to obtain data which are unique for each run of the script and which are
generated by nested queries. Correlation provides the value to avoid errors arising out of
duplicate values and also optimizing the code (to avoid nested queries). Automatic correlation is
where we set some rules for correlation. It can be application server specific. Here values are
replaced by data which are created by these rules. In manual correlation, the value we want to
correlate is scanned and create correlation is used to correlate.
46. Where do you set automatic correlation options?
- Automatic correlation from web point of view, can be set in recording options and correlation
tab. Here we can enable correlation for the entire script and choose either issue online messages
or offline actions, where we can define rules for that correlation. Automatic correlation for
database, can be done using show output window and scan for correlation and picking the
correlate query tab and choose which query value we want to correlate. If we know the specific
value to be correlated, we just do create correlation for the value and specify how the value to be
created.
47. What is a function to capture dynamic values in the web vuser script?
- Web_reg_save_param function saves dynamic data information to a parameter.

162

BUG TRACKING INTERVIEW QUESTIONS

1. Describe Error Handling in the FRD

2. whats the difference between usecase,testcase,testplan,and scenario and their


templates.
use case - Desighned before the project started.Test Case - which contains the test data .test
plan - A detailed plan to outline when to start and when to stop and constriants for automation or
manual and about human resources.Scenario - scenario's will be identified while testing.

3. How we can explain a bug which may arrive at the time of tesing. explain that bugs in
details.
Firstly i will contact to TL ..after confirmation from him i will forward this bug to Concerned
Developer.....

4. What is the difference between a Bug and a Defect?


Defect: Missing requirements is called defect.Bug:Dis satisfaction of the requirements.

5. How to post a BUG


There are tools available in the market such as Rational Clear Quest to post a bug. If Rational
Clear Quest is configured correctly when you post a bug an e-mail is automatically send to the
concerned developers.

6. how do we track a bug?plz send format of excel sheet in which we write the bug
details?how do we give
There are different bg tracking tools n the market , but rational clear quest is the most commonly
used tool.

7. What are the different types of Bugs we normally see in any of the Project? Include the
severity as wel
1. User Interface Defects -------------------------------- Low
2. Boundary Related Defects ------------------------------- Medium
3. Error Handling Defects --------------------------------- Medium
4. Calculation Defects ------------------------------------ High
5. Improper Service Levels (Control flow defects)

163

8. Top Ten Tips for Bug Tracking


A good tester will always try to reduce the repro steps to the minimal steps to reproduce; this is
extremely helpful for the programmer who has to find the bug. Remember that the only person
who can close a bug is the person who opened it in the first place. Anyone can resolve it, but only
the person

164

QTP INTERVIEW QUESTIONS

1. How can an object from a per action repository be called to another per action
repository?

2. How you write scripts in QTP? What's the main process in QTP? How do you run
scripts in QTP?

3. What is the command in QTP to invoke IE Brow?


SystemUtil.Run "iexplore"

4. Hi,I am new to QTP, please tell me how to invoke an application in QTP.Forexample:In


winrunner we use

5. differenced between quick test proffesional version 5.6 and 8.2


These are the new features which are available in QTP8.2 and which are not present in 6.5
version.Keyword View: Lets you easily build and maintain tests without writingVBScripts.AutoDocumentation: Provides improved test clarity and the ability toview test steps in plain
English.Step Generator: Allows

6. How would u manipulate the script so that when the test is run it takes a new login
name?
You can parameterize the values in the Gobal data table sheet, whatever the number of rows you
enter in this data table will instruct QuickTest to run same number of new login name you've
enter.

7. How can i add a action (external action) programatically?


You can add an external Action programatically using the CommandRunAction ActionName,
[IterationMode , IterationRange]Before you can use the RunAction statement in the Expert View
for an external action, you must first call or copy the external action into your test by choosing
Insert > Copy

8. How can i call a external action which is not added external action of an action. Means I
want to call
Yes u can do it by copying the Action c to Action A...In QTP 8.2 there is an menu called insertCopy of Action...

165

9. what is meant by SOURCE CONTROL ?


It is used to hold all the bulids of diff versions

10. how and what kind of Vb functions do u use in qtp?


You can use The following functionsAsc Function====CBool Function===CByte
Function===CCur Function===CDate Function===CDbl Function===Chr Function===CInt
Function===CLng FunctionCSng FunctionCStr FunctionHex FunctionOct Function===etc

11. how can u discribe the basic flow of automation with conditional and programatic
Executing of operators flow in the automation code if the question is that then my answer is
===For example: z = 78 * (96 + 3 + 45)There are five operators in this expression: =, *, (), +, and
another +. According to the rules of operator precedence, they are evaluated

12. HOW CAN I IMPLEMENT ERROR HANDLING IN QTP,I KNOW WITH RECOVERY
MANAGER BUT HOW PLZ GIVE ME DETAILED TO
U can do it thru Recovery Manager..Eg...Suppose there is an Edit box called Uname n
PWD...Just type in uname n don't enter in PWD..It displays a pop up msg called plz,,enter
PWD...Then stop recording..Goto Recovery MGR and call POPUP exception handling./../

13. How to recall a function in QTP


There also u follow the same procedure. See the sample codeFunction addition(x,y) z= x+y
msgbox zEnd FunctionCall addition(1,2)Call addition(2,2)I think i am clear :)

14. Give one example where you have used Regular Expression?
While validating 'Date format' .

15. How can I implement error handling in QTP, I know with Recovery Mangaer but how
please give me detailed

16. How to select particular value from the combo box in the current page which is
entered in the previous

17. If you have the same application screen with 7 drop down boxes and approximately 70
values how do you
Record the 7 test objects (dropdown boxs) and there will be many 70 properties ( and their
associated bvalues) Drop Down Box 1

166

18. When there is a task that gets repeated in multiple scripts, what do you do in QTP?
Split the action related to that task, make it Reusable & then call that Action as many times as
needed.

19. what is the descrirptive progrmaing?.what is the use of descriptive programing?


Descriptive programming is used to identify the objects that are not/cannot be stored in the object
repository. Descriptive programming can be implemented by creating and using a Description
object.

20. I Have an interview in Qtp..Please could any one give me the hints what will they ask in
interview..this

21. How to instruct QTP to display errors and ther description in the test results instead of
halting execution
Make use of Reporter.Reportevent eg.var=statementif var="True" ThenReporter.Reportevent
0,"Step Name","Description of the Passed step"elseReporter.Reportevent 1,"Step
Name","Description for the failed step"End IfI hope thats it :)

22. How you write scripts in qtp?what's the main process in qtp?How do you run scripts
in Qtp?Please anyone

23. What is descriptive programming?


Please see Questions Number 13 for answer. Its just 4 Questions above this questions. You can
find answer there.Thanks, Venkat

24. How to add run-time parameter to a datasheet?


Try using this line of code.DataTable("Col Name",dtGlobalSheet/LocalSheet)="Col Value"The
only disadvantage with tihs code is, u will be able to see the parameter till the script is running,
once stopped the parameter will vanish from the data table.

25. how to load the *.vbs or test generating script in a new machine?
Execute File statement can be included as part of the test script inorder to execute the vbs files.

26. how can u write a script without using a GUI in QTP?


GUI in Qtp?do you mean to say Object repository?without OR,tester need to write descriptive

167

tests,where you would directly assign property values and write methods.you do not need to save
OR.

27. How can we write scripts without having GUI(means u dont have any GUI and u want
to write a script in

28. Can we update the database though Qtp.

29. I am using the QTPlus Repositories Merge Utility to merge all my different repositories
into a single
Merge Utility have a lot of problems, try don't use this for file biggest the 8 MB

30. if a error occur during the excution of QTP script. how can we get the name of the
current object that
Use Err.descriptionExample. msgbox "Error:"&err.description

31. What is the procedure to test flash applications using QTP?

32. how to fetch test data from Database by using QTP?


In order to fetch test data from Database we have to create a adobdb connection object to
connect with data base. the syntax is .... >CreateObject("Adodb.connection").

33. how to handle java tree in QTP


first of all we need to have a java add-in to handle a java tree.In tools option we have the "object
identification" drop down list.There we have the java option to recognise the objects there select
the tree option.Add the properties to be recognised.Then the QTP will start

34. what if storage limit of shared object repository exceeds its limit(2 MB).how this kind
of situation
One can use advanced object repository Editor from Sirus SQA

35. Explain as to how would you design the driver code for a keyword based test script.

36. Testing > QTPWhich feature of QTP would you like to improve ?How would you go
about implementing it ?(This

168

37. How can we do the Frame work in QTP

38. how many types of recording modes in QTP?describe each type with an example
where we use them?
3 types of recording modes in QTP.1.norma 2.analog mode 3.low level recording mode.pls
describe where we use them exactly..

39. What is the file extension of the code file & object repository file in QTP?
.TSR

40. I want to open a Notepad window without recording a test and I do not want to use
SystemUtil.Run command
Another alternative to open a notepad is to use ShellObject. Check out with the following
example:Dim aSet a = WScript.CreateObject ("WSCript.shell")a.run "notepad.exe"

41. How many types of Actions are there in QTP?


In qtp 3 types of action r there 1)re-usable2)no-reusable3)Nested

42. How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the
difference
there's an in-built functionality called "Step Generator" in Insert->Step->Step Generator -F7,
which will generate the scripts as u enter the appropriate steps.

43. Explain the concept of object repository & how QTP recognises objects?
with QTP 8.2 ,there available QTP Plus,setup.It provides Repositories Merge Utility.The Object
Repository Merge Utility enables user to merge Object repository files into a single Object
repository file.

44. How do you data drive an external spreadsheet?


Import from External Spreadsheet File by selecting Import then From File . Which imports a
tabbed text file or a single sheet from an existing Microsoft Excel file into the table. The sheet
you import replaces all data in the currently selected sheet of the table, and the first row in the

45. IF we use batch testing.the result shown for last action only.in that how can i get
result for every
click on the icon in the tree view to view the result of every action

169

46. How to handle dynamic objects in QTP?


Using GETRO Property we will handle the runtime objects.

47. Can you do more than just capture and playback?


Yes you can do more than capture/playback. Descriptive Programming is the answer to this
question. We can write scripts without recording and it would still work fine.

48. How to handle the exceptions using recovery secnario manager in Qtp?
There are 4 trigger events during which a recovery scenario should be activated. They are A pop
up window appears in an opened application during the test run. A property of an object changes
its state or value. A step in the test does not run successfully. An open application fails

49. What are the Features & Benefits of Quick Test Pro(QTP)..?
Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality
Center. Introduces next-generation zero-configuration Keyword Driven testing technology in
QuickTest Professional 8.0 allowing for fast test creation, easier maintenance, and more
powerful data-driving capability

50. How does Parameterization and Data-Driving relate to each other in QTP?

51. Explain in brief about the QTP Automation Object Model.

52. What is a Run-Time Data Table? Where can I find and view this table?
The test results tree also includes the table-shaped icon that displays the run-time Data Tablea
table that shows the values used to run a test containing Data Table parameters or the Data
Table output values retrieved from a test while application test run.

53. What are the different scripting languages you could use when working with QTP ?
This will also support java script, but i hve not tries refer Quick test plus help for each function
they have give code in vbs and js.

54. How do you test siebel application using qtp?


In SWE section u need to addAutomationEnable = TRUE and at the same time you need to use
SWECmd= AutoOn in the URL

170

55. How the exception handling can be done using QTP


Recovery scenario manager provides a wizard that guides you through the defining recovery
scenario. Recovery scenario has three steps 1. Triggered Events 2. Recovery steps 3. Post
Recovery Test-Run

56. What is the difference between check point and output value.
additional comment on Above comment:An output value is a value retrieved during the
runsession and entered into runtime table or data table subsequently it can be used as input
value in your test.

57. What are the properties you would use for identifying a browser & page when using
descriptive programming
Logical Name of BrowserLogical Name of Pagee.g. Browser("myBrowser").Page("myPage")

58. What projects have you used WinRunner on? Tell me about some of the challenges
that arose and how you
pbs :WR fails to identify the object in gui. If there is a non std window obk wr cannot recognize it
,we use GUI SPY for that to handle such situation

59. Differentiate the two Object Repository Types of QTP.


In Qtp there are 2 object repositories, they are1.Shared Object Repository2.Per Action Mode,by
default it's per action mode.we will use shared OR for calling a particular action,it's like calling
external libraries.we will use per action for a particular action ie, for one action only.

60. Explain the concept of how QTP identifies object.


During recording qtp looks at the object and stores it as test object.For each test object QT learns
a set of default properties called mandatory properties,and look at the rest of the objects to check
whether this properties are enough to uniquely identify the object. During test run,QT

61. What is the difference between Call to Action and Copy Action.?
when u insert a call to action,they r read only in the calling test.It can be modified in the original
test.where as come to copy action,you can make changes to the copied action,your changes will
not effect the original action where it created.

62. have you ever written a compiled module? If yes tell me about some of the functions
that you wrote.

171

functions for Capturing the dynamic data during runtime. Function used for Capturing Desktop,
browser and pages.

63. Explain what the difference between Shared Repository and Per_Action Repository
In Shared reporsitory, one object is used in more than one actions and in per action reporsitory,
everytime in every action, objects are stored differently and are not shared.

64. Discuss QTP Environment.


QuickTest Pro environment using the graphical interface and ActiveScreen technologies - A
testing process for creating test scripts, relating manual test requirements to automated
verification features - Data driving to use several sets of data using one test script.

65. What the differences are and best practical application of each.
Per Action: For Each Action, one Object Repository is created. Shared : One Object Repository
is used by entire application

66. Few basic questions on commonly used Excel VBA functions.


common functions are: Coloring the cell Auto fit cell setting navigation from link in one cell to
other saving

67. Explain the keyword createobject with an example.


Createobject:Creates and returns a reference to an Automation object.Example:Dim
ExcelSheetSet ExcelSheet = CreateObject("Excel.Sheet")

68. How long have you used the product?

69. How to use the Object spy in QTP 8.0 version?

70. Give me an example where you have used a COM interface in your QTP project?
com inteface appears in the scenario of front end and back end.for eg:if you r using oracle as
back end and front end as VB or any language then for better compatibility we will go for an
interface.of which COM wil be one among those intefaces.

71. what is the use of Text output value in Qtp?


Answer posted by shreethik on 2005-06-09 08:36:38: Output values enable to view the values
that the application talkes during run time.When paramaterised, the values change for each

172

iteration.Thus by creating output values, we can capture the values that the application takes for
each run and output

72. Where can I get Quck Test pro(QTP Pro) software.. This is Just for Information
purpose Only.
Introduction to QuickTest Professional 8.0, Computer Based Training: Please find the step to get
QuickTest Professional 8.0 CBT Step by Step Tutorial and Evaluation copy of the software. The
full CBT is 162 MB. You will have to create account to be able to download evaluation copies of
CBT and Software.Click

173

DATABASE TESTING

1. what SQL statements have you used in Database Testing?

2. How to test data loading in Data base testing


Using with Query analyser.

3. What is way of writing testcases for database testing?


For writing test cases in Database first one should define the project name, then module,Bug
number,objective,steps/action undertaken,expected result,actual result, then status, priority and
severity.

4. What is Database testing?

5. What we normally check for in the Database Testing?


In DB testing we need to check for, 1. The field size validation 2. Check constraints. 3. Indexes
are done or not (for performance related issues) 4. Stored procedures 5. The field size defined in
the application is matching with that in the db.

6. How to Test database in Manually? Explain with an example


We should also check the non editable fields thru databasefor example,If a field is non editable
via front end, then the user should not be allowed to add a record thru database also

1. How do you rename all of the jobs to support your new File-naming conventions?
2. Does the selection of 'Clear the table and Insert rows' in the ODBC stage send a
Truncate statement to the DB or does it do some kind of Delete logic.
3. Tell me one situation from your last project, where you had faced problem and How did
u solve it?
4. The above might rise another question: Why do we have to load the dimensional tables
first, then fact tables:
5. How will you determine the sequence of jobs to load into data warehouse?
6. What are the command line functions that import and export the DS jobs?
7. What is the utility you use to schedule the jobs on a UNIX server other than using
Ascential Director?
8. How would call an external Java function which are not supported by DataStage?

174

9. What will you in a situation where somebody wants to send you a file and use that file
as an input or reference and then run job.
10. Read the String functions in DS
11. How did u connect with DB2 in your last project?
12. What are Sequencers?
13. How did you handle an 'Aborted' sequencer?
14. What are other Performance tunings you have done in your last project to increase the
performance of slowly running jobs?
15. How did you handle reject data?
16. If worked with DS6.0 and latest versions what are Link-Partitioner and Link-Collector
used for?
17. What are Routines and where/how are they written and have you written any routines
before?
18. What are OConv () and Iconv () functions and where are they used?
19. How did u connect to DB2 in your last project?
20. Do u know about METASTAGE?
21. Do you know about INTEGRITY/QUALITY stage?
22. Explain the differences between Oracle8i/9i?
23. How good are you with your PL/SQL?
24. Did you work in UNIX environment?
25. What other ETL's you have worked with?
26. What versions of DS you worked with?
27. What is DS Designer used for - did u use it?
28. What is DS Administrator used for - did u use it?
29. What is DS Director used for - did u use it?
30. What is DS Manager used for - did u use it?
31. What are Static Hash files and Dynamic Hash files?
32. What is Hash file stage and what is it used for?
33. Have you ever involved in updating the DS versions like DS 5.X, if so tell us some the
steps you have taken in doing so?
34. Did you Parameterize the job or hard-coded the values in the jobs?
35. How do you merge two files in DS?

175

SILK TEST
SilkTest is
A powerful tool for running automated test cases on the front end
A tool for testing Web based applications across different browsers
Very very stupid you have to tell it everything in its own language (4test)
Inflexible when it comes to interpreting your commands
_ It cannot guess at what you mean
_ It requires a certain syntax with certain words
This can be quite maddening

Different Versions in Silk Test.


1. Silk Test 5.0
2. Silk Test 5.2
3. Silk Test 5.6
4. Silk Test 6.0
5. Silk Test 6.5
6. Silk Test 7.1

Latest Version of the Silk Test is 7.5


Note: The Following Questions are based on the latest version of the Silk Test

Q1. How do I add steps to DefaultBaseState?


The easiest method is to add a BaseState () method to the main window of the application. That's
the one that wMainWindow is set to. If you define this method, it will be executed at the end of
DefaultBaseState (). Suggestion: By using GetTestCaseState (), you can make your method
behave differently depending on whether the testcase is starting or stopping. This function will tell
you whether the testcase is starting or stopping.

Q2. Where can I find all the methods for a class?


Use the Library Browser. Its invoked by choosing Help-->Library Browser from the SilkTest menu.
Select the class tab, then select the class you want to view. The methods for the class appear in
the right panel. You can click on a method and view its syntax. If you check the box marked Show
Inherited, all the methods from the ancestor classes will be shown. Its major disadvantage is that
you can't copy from it.

Q3. Why don't methods defined in a derived class inherit ?

176

When you create a class using winclass MoveableWin : MoveableWin, you're actually deriving a
new class which has the same name as the original class. All objects automatically become
instances of the new derived class. However, other derived classes, such as DialogBox in this
case, have already been inherited from the original MoveableWin. This happened at startup and
can't be changed. Therefore, any methods you added to the inherited MoveableWin class will not
be available for use by DialogBox objects

Q4. How can I change test frames in the middle of a testplan?


First you need to understand optionsets. This feature lets you save your configuration in a file.
The configuration includes your Agent Options, Runtime Options and Class Mappings. The
feature is very useful when you try to open your test frame on a new machine. The optionset
brings all the settings from one machine to another, including the test frame. This is also very
useful for a team.

Q5. Can I pass global variables from SilkOrganizer to SilkTest ?


Yes, you can just reference them directly. For example, if you have a list of string defined
in the test frame, you can pass the variable from SilkOrganizer as testdata or directly in the
testcase statement.

Q6. Is the Extension Kit difficult to use ?


No, if you have the cooperation of the developer (s). If they understand the value of adding
functionality for you and if you're perfectly clear about what you need, you will have very quick
success at implementing the EK. This assumes that the technology for them to retrieve the
information you want exists within their application. Sometimes with 3rd party controls, there is no
exposed API which provides what you need. Unfortunately, sometimes you will need to verify
some custom objects manually (visually).

Q7. Can I call Silk Scripts from an external shell program. ?


Yes. One way is to just call Silk and pass the name of the script using the command line
arguments. The complete list of arguments is shown below.

Command Line Options


Syntax:
optionset: filename
-m
Machine Name
-r

177

Script / Testplan / or Suite Name


-q
Quit SilkTest after the script or plan completes execution.
-query
Testplan query to run
-p
Post error count to calling program
-resexport
Output results files to rex files
partner -m LabMachine13 -q -query FunctionalTests -r InsertNewData.pln

Q8. What's the difference between SilkTest and QA Partner ?


Originally there was only one product, QA Partner. In 1996, Silk (later renamed SilkTest), was
introduced as the Web Testing tool. It was actually the same executable as QA Partner, but with
browser capabilities turned on. This turned out to be confusing for most customers. If you bought
Silk, you could just turn off the browser feature and then you'd have QA Partner. However, if you
bought QA Partner, you wouldn't have the ability to test browsers. Starting with SilkTest 5.0, there
is only one product again.

Q9. What is Immediate If?


Immediate If is a 4-test operator which is little known. It allows you to do an if-then-else
on a single line. The syntax is as follows:
boolean ? ReturnValueIfTrue : ReturnValueIfFalse
BOOLEAN bFirstTime = FALSE
STRING sGreeting = bFirstTime ? "Welcome" : "Welcome back"

Q10. When do you need to use the "this" keyword and when don't you?
The "this" keyword is used in window class methods to refer to the instance variable which is
calling the method at runtime. The "this" keyword is only required when you want to access a
data member which is uniquely defined in the instance. Otherwise its use is optional.

Example:
winclass DialogBox : DialogBox
Close ()
this.wCloseButton.Click ()
NewMethod ()
if (Exists ())

178

// Perform some steps


window DialogBox Test
tag "Test"
parent MyApplication
window wCloseButton = Exit
PushButton Exit
tag "Exit"
main ()
Test.Close ()
Notes:
In the close method above, the "this" keyword is required because the method needs to
reference a data member which is declared in the instance "Test". In the NewMethod
above, this.Exists () is not required, because it is referencing a method which is defined at
the class level.

Q11. Should I create a function or a method?


If the action you are automating is:
closely related to a specific window, create a method of that specific window. closely related to a
class of objects, create a method of that window class. more of a utility, not related to a window or
class of windows, create a function.

Q12. What does the recording statement do?


The recording statement set the following Agent Verification options to FALSE
o OPT_REQUIRE_ACTIVE
o OPT_VERIFY_ACTIVE
o OPT_VERIFY_CLOSED
o OPT_VERIFY_EXPOSED
This can be useful if you specifically want to turn these verifications off for a specific
block of code, but usually it is better to remove the recording statement after you record
the statements you need (run with these options set to TRUE)

Q13. When and why is the Sleep () statement needed?


Sometimes Silk can't tell when an application is busy. When this happens, Silk tries to
execute the next step which gets thrown away by the application or causes an error which
is usually very difficult to reproduce either manually or under debug mode. When this
happens, a well-placed Sleep (2) or Sleep (5) can often solve this annoying problem. A

179

few extra sleep statements to make sure that the application is ready to move forward
may be worth the small difference in the time it takes to execute your scripts.

14. What is WinClass?


Declares a window class for an application-specific window or control.
Note Window class declarations must appear outside of any function.

15. Features in silk 7.5


The list of New features in 7.5 are
1) Support for Infragistics Grid and Toolbar controls
2) Project packaging for relocating and emailing
3) Project Explorer enhancements
4) Java Custom Windows record and playback enhancements
5) Beta support for .NET Framework Version 2
6) Updated technology support
JDK 1.5
AOL 9 Security Edition
Sybase PowerBuilder 10
Silent Installation
Support for Microsoft's Source Code Control Integration

16. What is Frame File


The test frame file
The test frame file includes the following:
A constant named wMainWindow
A window of class BrowserChild
A constant named wMainWindow
This constant points to the home page of your application, that is, the page that was loaded when
you created the test frame. The recovery system uses wMainWindow to restore the browser to
that page when a test fails. Just as a non-Web application typically has a state where you want
the tests to start (the base state), Web applications also have a base state. Typically, it is the first
page in the application. See Web applications and the recovery system for more information.
A window of class BrowserChild The window has the same identifier as the value of
wMainWindow. It is this window that, by default, SilkTest loads in order to restore the base state.
The window declaration contains:

180

The constant sLocation, which is the URL for the page. The recovery system uses
this constant to load the page when necessary.
Two commented constants, sUserName and sPassword which specify the user name and
password to access the application. See Specifying username and password.
Two commented constants, BrowserSize and bDefaultFont, which specify the size of the
browser window and the default font to use for displaying text. See Specifying browser size and
fonts.
All the objects in the page, such as HtmlHeadings, HtmlText, HtmlLinks, HtmlText,
HtmlPushButtons, and so on

17. How to run the script in Remote Machine


Running tests on one remote target
There are three ways in SilkTest to specify that you want a script, suite, or testplan to run
on a remote target instead of the host:
Enter the target Agents name in the hosts Runtime Options dialog. You also need to select a
network protocol in the dialog. If you have been testing a script by running SilkTest and the Agent
on the same system, you can then test the script on a remote system without editing your script
by using this method.
Specify the target Agents name by enclosing it within brackets before the script
or suite name [Ohio]myscript.t You can select "(none)" in the hosts Runtime Options dialog and
then specify the target Agents name in a call to the Connect function in your script. For example,
to connect to a machine named Ontario:
testcase MyTestcase ()
Connect ("Ontario")
// Call first testcase
DoTest1 ()
// Call second testcase
DoTest2 ()
Disconnect ("Ontario")
When you are only driving one remote target, there is no need to specify the current machine; all
testcase code will automatically be directed to the only connected machine. When you use the
multi-application support functions, you will not have to make explicit calls to Connect; the support
functions will issue these calls for you.

18. What is Results File

181

A results file provides information about the execution of the testcase, script, suite, or testplan. By
default, the results file has the same name as the executed script, suite, or testplan, but with a
.res extension (for example, find.res). Whenever you run tests, SilkTest generates a results file,
which indicates how many tests passed and how many failed, describes why tests failed, and
provides summary information. You can invoke comparison tools from within the results file that
pinpoint exactly how the runtime results differ from your known baselines. Testplan results files
offer additional features, such as the ability to generate a Pass/Fail report or compare different
runs of the testplan. When SilkTest displays a results file, on the menu bar it includes the Results
menu, which allows you to manipulate the results file and locate errors. The Results menu
appears only when the active window displays a results file.
A .res file can be opened by multiple users, as long as no test is in process. This means you
cannot have 2 users run tests at the same time and write to the same results file. You can run a
test on the machine while the file is open on the other machine. However, you must not add
comments to the file on the other machine, or you will corrupt the .res file and will not be able to
report the results of the test. If you add comments to the file on both machines, the comments will
be saved only for the file that is closed (and therefore saved) first. By default, the results file
displays an overall summary at the top of the file, including the name of the script, suite, or
testplan; the machine the tests were run on; the number of tests run; the number of errors and
warnings; actual errors; and timing information. To hide the overall summary, click on the
summary and select Results/Hide Summary. For a script or suite results file, the individual test
summaries contain timing information and errors or warnings. For a testplan results file, the
individual test summaries contain the same information as in the overall summary plus the name
of the testcase and script file.
While SilkTest displays the most current version of the script, suite, or testplan, by default
SilkTest saves the last five sets of results for each script, suite, or testplan executed. (To change
the default number, use the Runtime Options dialog.) As results files grow after repeated testing,
a lot of unused space can accumulate in the files. You can reduce a results files size with the
Compact menu option. The format for the rest of a testplan results file follows the hierarchy of test
descriptions that were present in the testplan. Test statements in the testplan that are preceded
by a pound sign (#) as well as comments (using the comment statement) are also printed in the
results file, in context with the test descriptions.
To change the default name and directory of the results file, edit the Runtime Options dialog.

19. How to Generate a Testplan Completion report

182

To measure your QA departments progress in implementing a large testplan, you can generate a
Completion report. The Completion report considers a test complete if the test description is
linked to a testcase, with two exceptions:
1 If the testcase statement invokes a data-driven testcase and a symbol being passed
to the data-driven testcase is assigned the value ? (undefined), the test is considered
incomplete.
2 If the testcase is manual and marked as Incomplete in the Update Manual Tests
dialog, the test is considered incomplete. (A manual testcase is indicated with the
testcase:manual syntax; for more information, see indicating manual tests in a testplan .
To generate a testplan completion report:
1 Open the testplan you want to report on.
2 Select Testplan/Completion Report to display the Testplan Completion Report
dialog.
3 In the Report Scope group box, indicate whether the report is for the entire plan or
only for those tests that are marked.
4 To subtotal the report by a given attribute, select an attribute from the Subtotal by
Attribute field.
5 Click Generate. The testplan editor generates the report and displays it in the
lower half of the dialog. If the testplan is structured as a master plan with associated
subplans, the testplan editor opens any closed subplans prior to generating the report.
You can:
Print the report.
Export the report to a comma-delimited ASCII file. You can then bring the report
into a spreadsheet application that accepts comma- delimited data.
Chart (graph) the report, just as you can chart a Pass/Fail reportFor more information, see
Producing a Pass/Fail chart (everything in that section also applies to charting Completion
reports, except for the description of adding results from another execution of the testplan, which
applies only to Pass/Fail reports).

20. What is a TestCase


A test case has three stages
Each testcase that you record should have the following stages:

183

1 Stage 1: The testcase drives the application from the initial state to the state you
want to test.
2 Stage 2: The testcase verifies that the actual state matches the expected (correct)
state. (Your QA department might use the term baseline to refer to this expected state.)
This stage is the heart of the testcase.
3 Stage 3: The testcase cleans up the application, in preparation for the next
testcase, by undoing the steps performed in stage 1.
Each test case is independent
Each testcase you record should perform its own setup in stage 1, and should undo this setup in
stage 3, so that the testcase can be executed independently of every other testcase. In other
words, the testcase should not rely upon the successful or unsuccessful completion of another
testcase, and the order in which it is executed should have no bearing on its outcome.
If a testcase relies on a prior testcase to perform some setup actions, and an error causes
the setup to fail or, worse yet, the application to crash, all subsequent testcases will fail
because they cannot achieve the state where the test is designed to begin.
A testcase has a single purpose
Each testcase you record should verify a single aspect of the application in stage 2. When
a testcase designed in this manner passes or fails, it s easy to determine specifically what aspect
of the target application is either working or not working.
If a testcase contains more than one objective, many outcomes are possible. Therefore, an
exception may not point specifically to a single failure in the software under test but rather to
several related function points. This makes debugging more difficult and time consuming and
leads to confusion in interpreting and quantifying results. The net result is an overall lack of
confidence in any statistics that might be generated. Note But there are techniques you can use
to do more than one verification in a testcase. See Performing more than one verification in a
testcase.
A testcase starts from a base state
In order for a testcase to be able to function properly, the application must be in a stable
state when the testcase begins to execute. This stable state is called the base state. The
recovery system is responsible for maintaining the base state in the event the application

184

fails or crashes, either during a testcases execution or between testcases.


DefaultBaseState
To restore the application to the base state, the recovery system contains a routine called
DefaultBaseState that makes sure that
The application is running and is not minimized
All other windows (for example, dialogs) are closed
The main window of the application is active
If these conditions are not sufficient for your application, you can customize the recovery
system.
Defining test requirements
When defining test requirements, the goal is to rigorously test each application feature.
To do so, you need to decide which set of inputs to a feature will provide the most
meaningful test results.

21. How to Enter the TestData


Entering the testdata statement manually
1 Open up a new line after the test description and indent the line one level.
2 Enter the testdata statement as follows, if the testcase expects:
one or more variables, use this syntax: testdata: data [,data], where data is any valid 4Test
expression
a record, use the same syntax as above, but open and close the list of record fields with curly
braces: testdata: {data [,data]}, where data is any valid 4Test expression
Note Be sure to follow the testdata keyword with a colon. If you enter the keyword correctly, the
statement appears in dark red, the default color. Otherwise, the statement appears in either blue
or black, indicating the compiler is interpreting the line as a description.
Specifying unique and shared data
If a data value is unique to a single test description: you should place it in the plan at the same
level as the test description, using the testdata statement. You can add the testdata statement
using the Testplan Detail dialog or type the testdata statement directly into the testplan.

185

If data is common to several tests: you can factor out the data that is common to a group of tests
and define it at a level in the testplan where it can be shared by the group. To do this, you define
symbols and assign them values. Using symbols results in less redundant data, and therefore,
less maintenance.
Using the Testplan Detail dialog to enter the testdata statement
1 Place the insertion point at the end of the test description. If a testdata statement is not
associated with a test description, the compiler generates an error.
2 Select Testplan/Detail. To provide context, the multi-line list box at the top of the Testplan Detail
dialog displays the line in the testplan that the cursor was on when the dialog was invoked,
indicated by the black arrow icon. If the testcase and script associated with the current test
description are inherited from a higher level in the testplan, they are shown in blue; otherwise,
they are shown in black.
3 Enter the data in the Test Data field, separating each data element with a comma.
Remember, if the testcase expects a record, you need to enclose the list of data with the list
constructor operator (the curly braces); otherwise, SilkTest interprets the data as individual
variables, not a record, and will generate a data type mismatch compiler error. 4 Click OK.
SilkTest closes the Testplan Detail dialog closes and enters the testdata statement and data
values in the plan.

22. What is a Mater Plan.


Dividing a testplan into a master plan and subplans
If several engineers in your QA department will be working on a testplan, it makes sense to break
up the plan into a master plan and subplans. This approach allows multi-user access, while at the
same time maintaining a single point of control for the entire project. The master plan contains
only the top few levels of group descriptions, and the subplans contain the remaining levels of
group descriptions and test descriptions. Statements, attributes, symbols, and test data defined in
the master plan are accessible within each of the subplans. Subplans are specified with an
include statement. To expand the subplan files so that they are visible within the master plan,
double-click in the left margin next to the include statement. Once a subplan is expanded inline,
the subplan statement changes from red (the default color for statements) to magenta, indicating
that the line is now read-only and that the subplan is expanded inline. At the end of the expanded
subplan is the <eof> marker, which indicates the end of the subplan file.

23. How to create a Sub Plan

186

Creating a subplan
You create a subplan in the same way you create any testplan: by opening a new testplan file
and entering the group descriptions, test descriptions, and the testplan editor statements that
comprise the subplan, either manually or using the Testplan Detail dialog.

24. What is a Lock


About locks
When first opened, a master plan and its related subplans are read-only. This allows many users
to open, read, run, and generate reports on the plan. When you need to actually edit the master
plan or a subplan, you must first acquire a lock, which prevents others from making changes that
conflict with your changes.

25. What is the importance of options menu


Options menu
The Options menu contains the following commands:
General opens the General Options dialog, which you use to set such aspect s of general system
behavior as the editor and your workspace.
Editor Font opens the Editor Font dialog, which allows you to select a screen font in the family,
size, and style of your choice.
Editor Colors opens the Editor Colors dialog, which you use to set the screen colors for various
elements of 4Test code, results information, and the testplan (if available).
Runtime opens the Runtime Options dialog, which allows you to specify settings that SilkTest
uses when it runs a script.
Agent opens the Agent Options dialog, which allows you to set global options for how the SilkTest
Agent software interacts with the application under test.
Extensions opens the Extensions dialog, which you use to enable extensions and fault trapping
for applications under test on your host machine.
Recorder opens the Recorder Options dialog, which allows you to specify settings that SilkTest
uses when recording.
SilkPerformer Recorder opens the SilkPerformer Recorder Options dialog which you use to set
recording options for SilkTest's SilkPerformer Recorder.
Class Map opens the Class Map dialog, which you use to map custom classes to standard
classes supported by SilkTest.
Property Sets opens the Property Sets dialog, which allows you to create, modify, combine, and
delete property sets, which are used to verify properties in testcases.

187

Source Control is available if you have a software control (version control) application installed.
Displays cascading menu that allows you to manage your SilkTest test files with your installed
software control application. This is not available with SilkTest International.
Test Manager URLs opens the SilkCentral URLs dialog, which you can use to change the "home
page" address (URL) for the Issue Manager and Test Manager consoles that are displayed in
embedded browser windows in SilkTest.
Open Options Set opens the Open Options Set dialog, a standard file-opening dialog that you can
use to load the set of custom Agent, runtime, and class map options and Library Browser Help
files that you want to be in effect for the current suite, script, or testplan.
Save New Options Set opens the Save Options Set As dialog, which you use to save the current
set of Agent, runtime, and class map options and Library Browser Help files. Close Options Set
deactivates the current options set. This command is available only when a set of custom Agent,
runtime, and class map options is in effect. The file name disappears from the title bar. The
default options are now in effect.
n option-file-name displays a list of from 1 to n file names. Each is a custom options file that you
have loaded during the current work session. File names are prefaced by an integer, n, where the
last-loaded options file is listed first. You can click on a file name to have a new set of options in
effect. Alternatively, you can select a file name by its number; for example, to load the options in
the second file in the list, press Alt+O+2.
26. What is the importance of Results Menu
Select displays the Select Results dialog, which allows you to chose which set of results to
display. You can also use this dialog to add a comment to individual results sets. This dialog is
available only when the active window is a results window. Move to description of Select Results
dialog: By default, SilkTest saves the results of five executions per script, suite, or testplan. To
change the default number of results saved, edit the History Size option in the Runtime Options
dialog, available by clicking Options/Runtime.
Merge displays the Merge Results dialog, which you use to combine the active results file with the
results file of your choice. This dialog is available only when the active window is the testplan
editor results window. For more information, see Merging testplan
results.
Delete displays the Delete Results dialog. When you select a set of results and click OK, SilkTest
deletes it. This dialog is available only when the active window is a results window.
Extract displays the Extract Results dialog, which allows you to place selected information from a
results file in ASCII format into a new editor window or a file or send the information to a printer.
This dialog is available only when the active window is a results window.

188

Export displays the Export Results dialog, which you can use to export your results to a
structured file that is suitable for further processing by an application such as a spreadsheet. This
dialog is availlable only when the active window is a results window.
Send to Issue Manager displays the Send Results dialog, which you can use to send your results
directly to Issue Manager, the Segue product that you can use to manage your applications bug
reports, enhancement requests, and documentation issues. This dialog is available only when the
active window is a results window. For more information, see sending results to Issue Manager.
Convert to Plan displays the Convert Results to Plan dialog, which allows you to transform a
results file into a testplan. This dialog is available only when the active window is a results
window and you have run a script, a suite, or a single testcase from a script.
Compact removes unused space in a results file, thereby reducing the file size. This command is
available only when the active window is a results window for a testplan. Show Summary displays
the results summary for the current suite, testplan, script, or testcase, including the start and
elapsed time, and error totals. This command is available only when the active window is a
results window. By default, a summary is shown for the script.
Hide Summary hides the display of results summary of the current suite, script, testplan, or
testcase. To have the summary hidden by default, see see Overall results summary.
This dialog is available only when the active window is a results window.
View Options displays the View Options dialog that lets you specify which information you want
displayed in the results window and how you want the information sorted.
Goto Source displays a script file associated with the current results file, if it is closed, and makes
it the active window. If the cursor was positioned at an error message in the results file, SilkTest
positions the cursor at the error line in the script. If the cursor was positioned at the results for a
particular testcase, SilkTest positions the cursor at the beginning of the testcase in the script file.
This dialog is available only when the active window is a results window.
View Differences opens the Difference Viewer when you click on the icon. This command is
available only when the active window is a results window, and the current line of the results file
displays a box icon preceding an error message. For more information, see Finding application
logic errors.
Mark Failures in Plan marks all testcases in the testplan that generated errors during the last plan
execution and makes the testplan the active window. A black stripe in the margin denotes the
marked testcases. Mark Failures in Plan is useful if you want to fix errors and rerun only failed
tests. This dialog is available only when the active window is a the testplan editor results window.
Update Expected Value replaces the expected value in the testcase with the actual value when
an error message is selected. This command is available only when the active window is a results

189

window. This works for certain error messages, namely those that contain a box icon and are
neither bitmap nor table verification errors. This command updates data within a testcase, not
data passed in from the testplan. It also makes the associated script file active.
Pass/Fail Report displays the Results Pass/Fail Report dialog, which generates an onscreen
report on the number and percentage of tests that have passed. This dialog is available only
when a results file produced by running a testplan is the active window.
Compare Two Results opens the Compare Two Results... which lets you to see results that have
changed from a previous run of the testplan. This command is available only when the active
window is a results window for a testplan.
Next Result Difference locates the next difference between two results files. You use this
command after you click Results/Compare Two Results. This command is available only when a
results file produced by running a testplan is the active window.
Next Error Difference locates the next difference between two results files that is due to the
pass/fail state of a test changing (skipping over differences resulting from the addition or removal
of tests). You use this command after you click Results/Compare Two Results. This command is
available only when a results file produced by running a testplan is the active window. For more
information, see Comparing different runs of a testplan.

27. What is the importance of Record Menu


Record menu
The Record menu contains the following commands.
Window Declarations opens the Record Windows Declarations dialog. Use this dialog to record
descriptions, called window declarations, of the GUI objects in your application and insert them
into a declarations file, called an include file (*.inc).
Application State opens the Record Application State dialog which you use to define an
application state routine that SilkTest runs before it executes your testcase.
Testcase opens the Record Testcase dialog which you use to record an entire testcase,
specifying the application state of your choice and including verification statements. Method
opens the Record Method dialog which you use to record a method for a class or window
declaration.
Actions opens the Record Actions dialog where you record actions you perform to test an
application.

190

Class opens the Record Class dialog where you record a new Visual Basic, Active X, or Java
class declaration.
Window Identifiers opens the Record Window Identifiers dialog which you use to record a fully
qualified GUI object name.
Window Locations opens the Record Window Locations dialog which you use to record the x, y
locations of a graphical control, such as a toolbar.
SilkPerformer Script opens the Record SilkPerformer Script dialog which you use to record a
SilkPerformer script from SilkTest.

28. What is the importance of Run Menu


Run menu
The Run menu contains the following commands.
Compile compiles the testplan, suite, or script and all dependent files (such as include files), if
they have changed since they were last compiled.
Compile all compiles the script or suite and all dependent include files, even if they have not
changed since they were last compiled. If the Save object files during compilation checkbox is
enabled on the Runtime Options dialog, then Compile All will create object files (*.o).
Note If the Save object files during compilation checkbox is not enabled, SilkTest does not create
object files (*.o) when you select Run/Compile all. In order to force SilkTest to create an object file
without enabling the Save object files during compilation checkbox, you must modify the source
file and compile or save it. (Compiling saves modified files, and saving saves source, object, and
backup files.)
Run compiles and runs the 4Test script, suite, or testplan in the active window.
Run All Tests executes all the tests in the testplan, first expanding any subplans. This command
is available only for the testplan editor.
Run Marked Tests executes only the marked tests in the testplan, first expanding any subplans.
This command is available only for the testplan editor.

191

Debug reads the script in the active window into a debugging window and enters debugging
mode. This is available only when the file in the active window is a script.
Application State opens the Run Application dialog where you run or debug an application state
defined in your test frame file or the active script file.
Testcase opens the Run Testcase dialog where you can select a testcase to run or debug.
Show Status hides or shows the Runtime Status dialog when running a script, suite, testcase, or
testplan on a target machine that is not the host machine.
Abort terminates the script, suite, testcase, or testplan that is currently executing. This command
is available only when a program is being run or debugged on a target machine other than the
host machine.

29. What is the Importance of Debug Menu


Debug menu
The Debug menu contains the following commands, all of which are available only in
debugging mode.
Abort terminates execution of the script you are debugging. Abort appears when you have
executed scripts on a target machine.
Exit quits debugging mode.
Finish Function executes the script until the current function returns.
Reset frees memory and all variables, and clears the call stack of the script you are debugging.
Run and Debug/Continue runs the script in the debugging window until the first breakpoint, if any,
is reached. Execution stops just before the line with the breakpoint.
Run to Cursor sets a temporary breakpoint (indicated by a hollow red circle in the margin) on the
line containing the cursor. SilkTest immediately runs the script, stopping at the current line. The
breakpoint is cleared after it is hit.
Step Into is available only after using Debug/Run and execution has stopped at a breakpoint.

192

Executes the current line of 4Test code in the active script or in a file called by the active script. If
the current line has a breakpoint, SilkTest executes the line. If the current line contains a function
call, control passes into the function; SilkTest stops at the first statement. Step Over is available
only after using Debug/Run and execution has stopped at a breakpoint. Executes the current line
of 4Test code in the active script or in a file called by the active script, without stepping into any
functions called by the current line. Control stops at the next statement.

30. What is Data Driven Testing


Working with data driven testcases
This information will be helpful to know when you are working with data driven testcases.
When you are working with a data driven testcase, the 4Test Editor contains additional menu
selections and toolbars for you to use.
SilkTest can data drive only one testcase at a time.
You cannot duplicate testcase names. Data driven testcases in the same script must have
unique names.
The Classic 4Test editor is not available with data driven testcases (in .g.t files).
You cannot create data driven testcases from testcases in .inc files; you can only create data
driven testcases from testcases in .t or .g.t files. However, you can open a project, add the *.inc,
select the testcase from the testcase folder of the project, and then select data drive. When you
data drive a [use '<script>.t'] is added to the data driven testcase. This is the link to the .t file
where the testcase originated. If you add a testcase from another script file then another use line
pointing to that file is added. If the Script file is in the same Directory as the <script.g.t> then no
path is given otherwise the absolute path is added to the use line. If this path changes, it is up to
you to correct the path; SilkTest will not automatically update the path.
When you open a .g.t file using File/Open, SilkTest automatically loads the data source
information for that file. If you are in a .g.t file and that files data source is edited, you need to
click Edit/Data Driven/Reload Database to refresh the information from the data source.
If you add a new data driven testcase to an existing .g.t file that is fully collapsed, SilkTest
expands the previous testcase, but does not edit it.

31. What is the use .Jou File


Can't open results file
Problem
SilkTest crashes while running a script and reports the error "Can't open results file." Solution
While SilkTest is running a script, it temporarily stores results in a journal file (.jou) which is
converted to a .res file when the script finishes running. Delete all .jou files in the same directory

193

as the script. (You do not have to delete your results files.) Restart SilkTest and run your script
again.

32. What is Enable Extensions Dialog


Enable Extensions dialog
Use the Enable Extensions dialog to select the application for which you want to enable
extensions. SilkTest can automatically configure extensions for many development environments.
SilkTest gathers information from the application you select and displays the suggested extension
settings on the Extension Settings dialog. Access this dialog by clicking Enable Extensions on the
Basic Workflow bar (Workflows/Basic) or by clicking Tools/Enable Extensions. Application lists all
open applications that are not minimized, including any Web applications, which are identified by
the currently loaded pages title. Click an application and then click Select to choose the
application for which you want enable extensions. If you choose an executable name containing
spaces, you must enclose the name in quotation marks. If you want to test an applet, make sure
you navigate to the applet page, click Refresh, and then select the applet page from the
Application list. Select selects the highlighted application. SilkTest gathers information from this
application and displays suggested extension settings on the Extension Settings dialog. Refresh
click to update the list of applications from which you can select. Cancel click to exit the Enable
Extensions dialog without selecting an application.

33. What is Set Recovery System Dialog


Set Recovery System dialog
Use the Set Recovery System dialog to identify the starting point of the application you are
testing, the BaseState. SilkTests recovery system will return your application to this BaseState:
before running a testcase; during a testcase, if an error occurs; and after a testcase completes.
For more information, see Overview of the recovery system. If you are using the the Basic
workflow bar, you access this dialog by clicking the Set Recovery System button.
If you are recording a testcase, you access this dialog by clicking the Set Recovery System
button on the Record Application State dialog or the Record Testcase dialog. This dialog
contains:
Frame file name displays the default name and path of the frame file you are creating.
This field appears only if you access this dialog from the Basic workflow bar. The default is
frame.inc. If frame.inc already exists, SilkTest appends the next logical number to the new frame
file name; for example, frame1.inc.
Modify the frame file name and click Browse to specify the location in which you want to save this
file. Frame files must have a .inc extension.

194

Application lists all open applications that are not minimized, including any Web applications,
which are identified by the currently loaded pages title. Click to select an application. This list is
dynamic and will update if you open a new application.
Command line displays the path to the executable (.exe) for the application that you selected.
This field appears only if you selected a non-Web application.
Start testing on this page displays the URL for the application you selected. This field appears
only if you selected a Web application.
If an application appears in the list, but the URL does not display in this field, your extensions
may not be enabled correctly. Click the Enable Extensions button in the Basic workflow bar to
automatically enable and test extension settings.
Working directory displays the path of the application you selected. This field only appears if you
selected a non-Web application.
Window name displays the window name, a suggested identifier that you can use in your
testcases to identify your application. You can change the window name; we recommend using a
short name to identify your application.

34. What is Link Tester?


About Link Tester
Link Tester is a tool you can invoke from within SilkTest and use to identify problems
with hyperlinks in web sites/pages.
Link Tester tests both standard hyperlinks, which link pages or an image to a URL, and visible
links, which are links that exist on a web page but are not displayed in a certain context, for
example image rollovers.
You can specify that Link Tester test the links on only a single web page, or all links from a top
level page down as many levels of the web site hierarchy as you want. In the link test, you can
include other domains inside or outside a particular web site.
For example, you can have Link Tester start at a site's home page and check each link from that
page to every other page, then go to each of the other pages and check links from each to other
pages, and so on. Link Tester "walks" the links of the web, testing each link to make sure it
works.
To create a link analysis report, you first have to use Link Tester to analyze the links of a web
site.
Link Tester displays an analysis that allows you to easily identify broken links and performance
bottlenecks. For each link analyzed, Link Tester lists:
The parent page
The link response time (time it took to access the object the link refers to)
Broken links (displayed in a different color)

195

A status message, if there is a problem with the link


After Link Tester completes the analysis, you can generate a report that includes information on:
All links
Links that have an error
E-mail links
Links that have an warning condition
Note The current version of Link Tester scans links that use the HTTP protocol (as
opposed to HTTPS, FILE, or FTP).

What are Compiler Constants?


Compiler Constants dialog
Use the Compiler Constants dialog to define constants and assign values to them. You
can use the defined constants in scripts and include files anywhere you can specify an
expression. Constants are evaluated and replaced with their values at compile time.
Access this dialog by clicking Options/Runtime Options/Compiler Constants button.

This dialog contains:


Constant Name and Value this box displays the list of defined constants and the values
associated with them.
Constant Name type the name of the constant you want to add to the list.
Value type the value of the constant you specified in the Constant Name box.
Edit button click to modify the constant you selected from the Constant Name and Value
box. You must select a constant from the list before the Edit button is available.
Remove button click to delete the constant you selected from the Constant Name and
Value box. You must select a constant from the list before the Remove button is
available.
Add button specify a Constant Name and Value in the appropriate boxes and then click
Add to add the new constant to the list.

Explain the differences between DOM & VO?

196

Differences between DOM and VO


There are several areas where DOM and VO work differently:

DOM uses the name attribute for input elements as the objects window ID. This
makes object recognition for input objects independent of the way those object
appear in a browser.

the way HTML headings and HTML text are found -- to be considered an
HtmlHeading by DOM the text must be tagged with <H1> through <H6>. If the
text is tagged with <TH>(table header), the text will be identified as a header if it
is in the first row, or as HtmlText otherwise. If the text is simply bold it is
considered simply a row and GetTextProp("$FontStyle") will record FS_BOLD. If
you have bold text, DOM does not interpret that text as headings.

how GetText works. With the DOM extension, GetText returns the first line as is
defined by line break characters, if any (e.g. <BR>). However, GetText with the
VO extension returns the first line seen in the browser; this value can change if
you resize the browser. Because the DOM extension does not offer a visual
interpretation of browser content, GetText always returns the same value
regardless of browser size, font size, or browser.

the number of objects that are found. Declarations generated with DOM will find
more objects; for example, the text in one paragraph under VO may turn into
more than one object under DOM.

when you use the DOM extension, SilkTest attempts to group HTML text objects
into one 4Test text object. However, SilkTest will separate objects if it encounters
<br> tags.This means if you use <br> tags within your HTML pages, SilkTest
may record more text objects than you expect. This is because with the DOM
extension, SilkTest considers text separated by <br> tags as separate objects.
For example:
<p>
Welcome
<br>
and Opening Remarks
</p>

197

You might expect this to be recorded as one object, but SilkTest records this as two.

for images, the DOM extension records both an HtmlImage and an HtmlLink

the way nested lists and tables are found

the names of images

with VO, if you spawn an additional browser window, the second one is
seen as a dialogbox. With the DOM extension, SilkTest sees the second
browser as another BrowserPage. You have to set the window active
before interacting with it. This will ensure that you are working with the
correct browser window.

Note : spawn statement


A spawn statement begins execution of the specified statement or block of
statements in a new thread. Since the purpose of spawn is to initiate concurrent
test operations on multiple machines, the structure of a block of spawned code is
typically:

A SetMachine command, which directs subsequent machine operations


to the specified Agent.

A set of machine operations to drive the application.

A verification of the results of the machine operations.

the way multitags are formed with new caption values.

the way character styles (such as centered, bold, italic) for text and heading
objects are found. With the DOM extension, SilkTest captures only the first text
style within a paragraph and assumes that style applies to the whole paragraph.
With VO, SilkTest captures every style used within a paragraph.

198

 Explain the Difference between Basic and Data Driven work flow bars
Workflows menu
(Difference between Basic and Data Driven)
The Workflows menu has the following commands.
Basic displays the Basic workflow bar, which guides you through the process of creating
a testcase. Using this workflow bar, you create a project, automatically enable and test
extension settings, configure the recovery system, and record and run a testcase.
Data Driven displays the Data Driven workflow bar, which starts the process of creating
a data driven testcase. Using this workflow bar, you select the testcase you want to data
drive, find and replace values in that testcase with links to values in tables and columns,
and then select the rows from the tables you want to run for this data driven testcase.

How to declare dlls


dll declaration

Action
Declares functions in a DLL so that they can be called from a 4Test script.

Syntax
dll dllname.dll
prototype
[prototype]...

Variable

Description

dllname

The name of the DLL file that contains the


functions you want to call.

prototype

The function prototype of a DLL function you want


to call. Each prototype has the syntax shown below.

Prototype syntax
[return-type] func-name ( [arg-list] ) [alias dll-fname]

Variable

Description

return-type

Optional The data type of the return value, if there


is one.

199

func-name

An identifier that specifies the name of the function.

dll-fname

Optional. A string that specifies the name of the


function within the DLL. If specified, func-name is the
alias name to be used in 4Test. See the example below.

arg-list Optional.

A comma-delimited list of arguments. Each


argument in arg-list has the syntax shown below.

Argument syntax
[pass-mode] data-type arg-name

Variable

Description

pass-mode

Optional. Whether the argument is passed into the


function, passed out of the function, or both. pass-mode
can be in, out, or inout. The default is in. Refer to
Function declaration for a description of pass modes.

data-type

The C data type of the argument. See the


information on C data types below.

arg-name

An identifier specifying the name of the argument.

Notes
Alias names
If a DLL function has the same name as a 4Test reserved word, or the function does not
have a name but an ordinal number, rename the function within your 4Test declaration
and use the alias keyword to map the declared name to the actual name. The second
example below defines an alias name for the DLL function exit.

C data types
Since DLL functions are written in C, the arguments you pass to these functions must
have C data types or be records containing fields of these types. For a list of these data
types, see C data types for DLL functions.

Passing arguments
The table below provides additional information about passing certain types of arguments
to DLL functions:

Variable type

How to pass

Pointer to a character

Pass a 4Test string variable to a DLL which

200

requires a pointer to a character (null terminated).


Pointer to a numerical array

Pass a 4Test array or list of the appropriate type to a


DLL which requires a pointer to a numerical array.

Pointer to a record

Pass a 4Test record to a DLL which requires a


pointer to a record. If the record has a dwSize field,
then you must set it to the size of the record. 4Test
records are always passed by reference to a DLL.

Pointer to a function

You cannot pass a pointer to a function to a DLL


function.

Null string pointer

To pass a null pointer to a string, use the null


keyword in 4Test.

Window handle

Use the hWnd property or the GetHandle method of


the AnyWin class to get the window handle you
need.

Arguments that may be passed by reference by the DLL function


A few special rules apply for declaring arguments that can be passed by reference by the
DLL function:

Declare an argument whose value will be passed by reference by a DLL function


must be declared using the out keyword.

Declare an argument that is sometimes passed by reference and sometimes not


using the in keyword. In the call to the DLL function, preface the argument with
the out keyword, enclosed in brackets.

inprocess keyword
Note

This feature is provided as a convenience to you, but it has not yet been

thoroughly tested.
Normally, when you make a dll function call, the dll gets loaded into the Agent and called
from there. However, if

you specify that a function is "inprocess", it uses the first

argument (which has to be a window handle - not the window id) and loads the DLL into
that application's process. If the DLL's function's first argument is not a window handle,
you must write a wrapper so that it is. For example, your dll declaration could say

201

inprocess SendMessage(HWND ......


and then when you called SendMessage, it would get loaded into the application that
contains the window handle you provided.
If there is a return type, the return type comes after the inprocess keyword.
You can have DLL functions that are both "inprocess" and not inprocess by using aliases.

DLL support files


SilkTest provides several files of declarations, data types, and constants to support the
calling of hundreds of functions within the Windows API from within your 4Test scripts.
Example
dll "toolhelp.dll"
BOOL MemManInfo (out MEMMANINFO MemManInfo)
dll "mydll.dll"
my_exit ()

alias "exit"

 How to define Virtual Methods?


DEFINING Virtual Methods

Defining "virtual" methods


You can define a method as being virtual, which means that the version of the method
that is executed is determined at runtime, not at compile time (4Test virtual methods are
analogous to virtual member functions in C++). You would want to define a method as
virtual if, in a derived class, you want to override a method of a parent class that will be
called by another method of the parent class.
You use the virtual keyword to define a virtual method for a class. You only need to use
the virtual keyword with the top-level method definition. A derived class can provide its
own instance of a virtual method or it can inherit the virtual method from its parent class.

202

Example
winclass MyWin : AnyWin
WhatAmI ()
Print ("I am a MyWin")
GetInfo ()
WhatAmI ()
winclass MySubWin : MyWin
WhatAmI ()
Print ("I am a MySubWin")
window MySubWin WinInstance
main ()
WinInstance.GetInfo ( )
This prints "I am a MyWin". That's because the call to WhatAmI in GetInfo is resolved at
compile time to the implementation of WhatAmI in the MyWin class.
By making WhatAmI a virtual method, resolution of WhatAmI calls are deferred until
runtime, as shown in the following example:
winclass MyWin : AnyWin
virtual WhatAmI ()
Print ("I am a MyWin")
GetInfo ()
WhatAmI ()
winclass MySubWin : MyWin
WhatAmI ()
Print ("I am a MySubWin")
window MySubWin WinInstance
main ()
WinInstance.GetInfo ( )

203

This prints "I am a MySubWin" because the version of WhatAmI is determined at runtime,
when the class of object calling WhatAmI can be identified as a MySubWin, so the
MySubWin version of WhatAmI is used.

204

 What are Infragistics controls


Infragistics controls
SilkTest has several built-in 4Test classes that supports recording and playback for key
Infragistics Window Forms controls. This includes:

the UltraGrid controls through the 4Test DataGrid class

the UltraToolbar container and the elements within the UltraToolbar through the

4Test Toolbar class (Infragistics ToolBase)


Native support means that features such as the following are available when testing
these controls:

action-based recording

record Window declarations

record identifiers

record class

Before you can use SilkTest to test Infragistics Windows Forms controls, you must:

have a valid SilkTest .Net license

have the.NET Framework installed

have the NetAdvantage Window Forms installed

For specific versions of these applications and other installation requirements, see the
release notes.
Testing the Infragistics UltraGrid and UltraToolbar
SilkTest has two new classes:

DataGrid, which supports the Infragistics UltraGrid

205

UltraToolbar, which supports the Infragistics UltraToolbar container and the


UltraToolbar elements within the UltraToolbar

There are many 4Test methods available with these new classes, some of which are
available for recording.

 What are the different types of Verify functions?


1. VerifyActive method
Class
AnyWin class
Action
Verifies that the window is active.
Syntax
window.VerifyActive ( )

2. VerifyBitmap method
Class
AnyWin class

Action
Verifies that the screen image matches a saved bitmap of the image.

Syntax
window.VerifyBitmap (sBitmapFile [, Rect] [, sMaskFile])
Variable

Description

sBitmapFile

The name of the file to compare against the current state


of the screen (typically a baseline). STRING.

Rect

Optional. The area to capture, relative to the window. If


you omit Rect, SilkTest captures the entire window.
RECT.

sMaskFile

Optional. The name of the file containing a mask for the


comparison. STRING.

3. VerifyCaption method
Class

206

MoveableWin class

Action
Verifies the caption of the window.

Syntax
window.VerifyCaption(sCaption)

Variable

Description

sCaption

The caption you expect the window to have. STRING.

4. VerifyDefaultButton method
Class
DialogBox class

Action
Verifies the default button on a dialog box.

Syntax
dialogbox.VerifyDefaultButton(wWindow)

Variable

Description

wWindow

The button you expect to be the default.

5. FuzzyVerify function

Action
Verifies that an actual value matches an expected value using fuzzy verification. See
Fuzzy verification for more information.

Syntax
FuzzyVerify (aActual, aExpected [, sDesc])

Variable

Description

aActual

The value to verify. ANYTYPE.

aExpected

The expected value. ANYTYPE.

sDesc

Optional. A message describing the comparision string

207

6. Verify function
Action
Verifies that an actual value matches an expected value.

Syntax
Verify (aActual, aExpected [, sDesc])

Variable

Description

aActual

The value to verify. ANYTYPE.

aExpected

The expected value. ANYTYPE.

sDesc

Optional. A message describing the comparision string

Enabling and disabling workflow bars


Only one workflow bar can be enabled at a time.
To enable or disable a workflow bar, click Workflows and then select the workflow bar
that you want to turn on or off; for example, Workflows/Basic.
You can select one of the following workflows:

Basic workflow: guides you through the process of creating a testcase. Using this
workflow bar, you create a project, automatically enable and test extension
settings, configure the recovery system, and record and run a testcase.

Data Driven workflow: guides you through the process of creating a data driven
testcase.

208

 How to set the options for XML recognition


Setting options for XML recognition
To set SilkTest to recognize XML elements:
1

In SilkTest, click Options/Extensions to display the Extension dialog.

Select the DOM extension for either Internet Explorer 5.x or Netscape 6.

In the Options area, click Extension (the button is disabled until you have
selected a DOM extension).

On the DOM Extension dialog, check the XML checkbox and click OK.

Close the Option Extensions dialog, click OK.

Close the Extensions dialog, click OK.

To turn off XML recognition simply uncheck the checkbox you checked in step 4 above.

 How to add my steps to the Default Base State


Adding to the DefaultBaseState
If you want the recovery system to perform additional steps after it restores the default
BaseState, you need to record a new method named BaseState and paste it into the
declaration for your applications main window. SilkTest provides the Record/Method
menu command to record a BaseState method. (See Record menu.)
To record a BaseState method:
1

Open your application and the applications test frame file.

Place the insertion point on the declaration for the applications main window.

Select Record/Method. SilkTest displays the Record Method dialog, which allows
you to record a method for a class or window declaration.

Select BaseState from the drop-down list in the Method Name field.

Click the Start Recording pushbutton. SilkTest closes the Record Method dialog
and displays the Record Status window, which indicates that you can begin
recording the BaseState method. The Status field flashes the word Recording.

209

When you have finished recording the BaseState method, click the Done
pushbutton on the Record Status window. SilkTest redisplays the Record Method
dialog. The Method Code field contains the 4Test code youve just recorded.

Click OK to close the Record Method dialog and place the new BaseState
method in the declaration for your main window.

 How to modify the Default Recovery System


Modifying the default recovery system
The default recovery system is implemented in defaults.inc, which is located in the
directory in which you installed SilkTest. If you want to modify the default recovery
system, instead of overriding some of its features, as described in Overriding the default
non-Web recovery system, you can modify defaults.inc.

Note

Segue cannot provide support for modifying defaults.inc or the results.

We dont recommend that you modify defaults.inc, but if you decide you need to modify it,
be sure that you:

Make a backup copy of the shipped defaults.inc file.

Tell Segue Technical Support when reporting problems that you have modified
the default recovery system.

210

HR Questions (Most commonly asked Interview Questions)


1. Tell me about you!
Keep your answer to one or two minutes; don't ramble. Stick to what you've written in your
resume summary. To answer this question well, you'll need to start with a solid and
concise resume summary.
2. What do you know about our company?
Do your homework before the interview! Spend some time online or at the library
researching the company. Find out as much as you can, including products, size, income,
reputation, image, management talent, people, skills, history and philosophy. Project an
informed

interest;

let

the

interviewer

tell

you

about

the

company.

3. Why do you want to work for us?


Don't talk about what you want; first, talk about their needs: You would like to be part of a
specific company project; you would like to solve a company problem; you can make a
definite contribution to specific company goals.
4. What would you do for us?
What they really want to know is... What can you do for us that someone else can't? Relate
past experiences that show you've had success in solving previous employer problem(s)
that may be similar to those of the prospective employer. Make sure you have a strongly
worded Employment History section in your resume, that you can refer to.
5. What about the job offered do you find the most attractive? Least attractive?
List three or more attractive factors and only one minor unattractive factor.

6. Why should we hire you?


Because of your knowledge, experience, abilities and skills.
7. What do you look for in a job?
An opportunity to use your skills, to perform and be recognized.

211

8. Please give me your definition of a.... (the position for which you are being interviewed).
Keep it brief -- give an action- and results-oriented definition.
9. How long would it take you to make a meaningful contribution to our firm?
Not long at all -- you expect only a brief period of adjustment to the learning curve.

10. How long would you stay with us?


As long as we both feel I'm contributing, achieving, growing, etc.
Warm-Up Questions
1. What made you apply for this position?
2. How did you hear about this job opening?
3. Briefly, would you summarize your work history & education for me?
Work History
1. What special aspects of your work experience have prepared you for this job?
2. Can you describe for me one or two of your most important accomplishments?
3. How much supervision have you typically received in your previous job?
4. Describe for me one or two of the biggest disappointments in your work history?
5. Why are you leaving your present job? (or, Why did you leave your last job?)
6. What is important to you in a company? What things do you look for in an
organization?
Job Peformance
1. Everyone has strengths & weaknesses as workers. What are your strong points for
this job?
2. What would you say are areas needing improvement?
3. How did your supervisor on your most recent job evaluate your job performance?
What were some of the good points & bad points of that rating?
4. When you have been told , or discovered for yourself , a problem in your job
performance, what have you typically done? Can you give me an example?
5. Do you prefer working alone or in groups?
6. What kind of people do you find it most difficult to work with? Why?

212

7. Starting with your last job, tell me about any of your achievements that were
recognized by your superiors.
8. Can you give me an example of your ability to manage or supervise others?
9. What are some things you would like to avoid in a job? Why?
10. In your previous job what kind of pressures did you encounter?
11. What would you say is the most important thing you are looking for in a job?
12. What are some of the things on your job you feel you have done particularly well or
in which you have achieved the greatest success? Why do you feel this way?
13. What were some of the things about your last job that you found most difficult to
do?
14. What are some of the problems you encounter in doing your job? Which one
frustrates you the most? What do you usually do about it?
15. What are some things you particularly liked about your last job?
16. Do you consider your progress on the job representative of your ability? Why?
17. How do you feel about the way you & others in the department were managed by
your supervisor?
18. If I were to ask your present (most recent) employer about your ability as
a____________________, what would he/she say?
EDUCATION
1. What special aspects of your education or training have prepared you for this job?
2. What courses in school have been of most help in doing your job?
CAREER- GOALS
1. What is your long-term employment or career objective?
2. What kind of job do you see yourself holding five years from now?
3. What do you feel you need to develop in terms of skill & knowledge in order to be
ready for that opportunity?
4. Why might you be successful in such a job?
5. How does this job fit in with your overall career goals?
6. Who or what in your life would you say influenced you most with your career
objectives?
7. Can you pinpoint any specific things in your past experience that affected your
present career objectives?
8. What would you most like to accomplish if you had this job?
9. What might make you leave this job?

213

SELF-ASSESSMENT
1. What kind of things do you feel most confident in doing?
2. Can you describe for me a difficult obstacle you have had to overcome? How did
you handle it? How do you feel this experience affected your personality or ability?
3. How would you describe yourself as a person?
4. What do you think are the most important characteristics & abilities a person must
possess to become a successful ( )? How do you rate yourself in these areas?
5. Do you consider yourself a self-starter? If so, explain why ( and give examples)
6. What do you consider to be your greatest achievements to date? Why?
7. What things give you the greatest satisfaction at work?
8. What things frustrate you the most? How do you usually cope with them?
CREATIVITY
1. In your work experience, what have you done that you consider truly creative?
2. Can you think of a problem you have encountered when the old solutions didn't
work & when you came up with new solutions?
3. Of your creative accomplishments big or small , at work or home, what gave you
the most satisfaction?
4. What kind of problems have people recently called on you to solve? Tell me what
you have devised.
DECISIVENESS
1. Do you consider yourself to be thoughtful, analytical or do you usually make up
your mind fast? Give an example. (Watch time taken to respond)
2. What was your most difficult decision in the last six months? What made it
difficult?
3. The last time you did not know what decision to make, what did you do?
4. How do you go about making an important decision affecting your career?
5. What was the last major problem that you were confronted with? What action did
you take on it?
RANGE OF INTERESTS
1. What organizations do you belong to?

214

2. Tell me specifically what you do in the civic activities in which you participate.
(Leading questions in selected areas. i.e. sports, economics, current events,
finance.)
3. How do you keep up with what's going on in your company / your industry/ your
profession?
MOTIVATION
1. What is your professional goal?
2. Can you give me examples of experience on the job that you felt were satisfying?
3. Do you have a long & short-term plan for your department? Is it realistic?
4. Did you achieve it last year?
5. Describe how you determine what constitutes top priorities in the performance of
your job.
WORK STANDARDS
1. What are your standards of success in your job?
2. In your position, how would you define doing a good job? On what basis was your
definition determined?
3. When judging the performance of your subordinate, what factors or characteristics
are most important to you?
LEADERSHIP
1. In your present job what approach do you take to get your people together to
establish a common approach to a problem?
2. What approach do you take in getting your people to accept your ideas or
department goals?
3. What specifically do you do to set an example for your employees?
4. How frequently do you meet with your immediate subordinates as a group?
5. What sort of leader do your people feel you are? Are you satisfied?
6. How do you get people who do not want to work together to establish a common
approach to a problem?
7. If you do not have much time & they hold seriously differing views, what would be
your approach?
8. How would you describe your basic leadership style? Give specific examples of
how you practice this?

215

9. Do you feel you work more effectively on a one to one basis or in a group
situation?
10. Have you ever led a task force or committee or any group who doesn't report to
you, but from whom you have to get work? How did you do it? What were the
satisfactions & disappointments? How would you handle the job differently?
ORAL PRESENTATION SKILLS
1. Have you ever done any public or group speaking? Recently? Why? How did it go?
2. Have you made any individual presentations recently? How did you prepare?
WRITTEN COMMUNICATION SKILLS
1. Would you rather write a report or give a verbal report? Why?
2. What kind of writing have you done? For a group? For an individual?
3. What is the extent of your participation in major reports that have to be written?
FLEXIBILITY
1. What was the most important idea or suggestion you received recently from your
employees? What happened as a result?
2. What do you think about the continuous changes in company operating policies &
procedures?
3. How effective has your company been in adapting its policies to fit a changing
environment?
4. What was the most significant change made in your company in the last six
months which directly affected you, & how successfully do you think you
implemented this change?
STRESS TOLERANCE
1. Do you feel pressure in your job? Tell me about it.
2. What has been the highest pressure situation you have been under in recent
years? How did you cope with it?
STABILITY & MATURITY
1. Describe your most significant success & failure in the last two years.
2. What do you like to do best?

216

3. What do you like to do least?


4. What in your last review did your supervisor suggest needed improvement?
5. What have you done about it?
INTEREST IN SELF DEVELOPMENT
1. What has been the most important person or event in your own self development?
2. How much of your education did you earn?
3. What kind of books & other publications do you read?
4. Have you taken a management development course?
5. How are you helping your subordinates develop themselves?

217

UNANSWERED QUESTIONS

TESTING GENERAL
1. What is workadround ?
2. What is a show stopper?
3. What is Traceability Matrix? Who prepares this document?
4. What is testlog document in testing process?
5. What is the Entry And Exit Criteria of a test plan? 2.How to Automate your test plan?
6. What is the role of QA in a company that produces software?
7. What is terminologe? Why testing necessary? Fundamental test process psychology of
testing
8. What are the common bugs encountered while testing an application manually or using
test?
9. What are the bug and testing metrics?
10. For a bug with high severity can we give the priority also to be high...If so why we need
both?
11. How would you differentiaite between Bug, Defect, Failure, Error.
12. What is the difference between Client Server Testing and Web Testing?
13. What is backward compatibility testing ?
14. What certifications are available in testing?
15. What is release candidate?
16. What do you think the role of test-group manager should be?
17. What is a test data? Give examples
18. What is the difference between QA, QC and testing?
19. What is seviarity & priority? What is test format? Test procedure?
20. What are the different is manual database checking types?

218

WEB TESTING
1. What is the difference between testing in client-server applications and web based
applications?
2. Without using GUI map editor, Can we recognise the application in Winrunner?
3. What command is used to launch a application in Winrunner?
4. What is the difference in testing a CLIENT-SERVER application and a WEB application ?
6. What bugs are mainly come in Web Testing? What severity and priority we are giving?
WHITE BOX TESTING
1. What are the table contents in test plans and test cases?
2. What are the tables in test plans and test cases?
WIRELESS TESTING
1. What is Wireless Testing? How do we do it? What are the concepts a test engineer
should have knowledge of? How do you classify testing of wireless products?
TEST CASES
1. How will you prepare test cases?
2. Write the testcases on ATM Transactions?
3. What is meant by Hot Keys?
4. How is test case written?
5. How can we write a good test case?
6. How will you check that your test cases covered all the requirements
7. For a triangle (sum of two sides is greater than or equal to the third side), what is the
minimal number of test cases required.
TEST DIRECTOR
1. Difference between WEBINSPECT-QAINSPECT and WINRUNNER/TEST DIRECTOR?
2. How will you generate the defect ID in test director? Is it generated automatically or not?
3. Difference between TD 8.0 (Test director) and QC 8.0 (Quality Center).
4. How do you ensure that there are no duplication of bugs in Test Director?
5. Difference between WinRunner and Test Director?
6. How will you integrated your automated scripts from TestDirector?
7. What is the use of Test Director software?

219

TESTING-SCENARIOS
1. How to find out the length of the edit box through WinRunner?
2. Is it compulsary that a tester should study a Design Document for writing integration
and system test casses
3. What is Testing Scenario? What is scenario based testing? Can you explain with an
example?
4. Lets say we have an GUI map and scripts, and we got some 5 new pages included in an
application, How do we do that?
5. How do you complete the testing when you have a time constraint?
6. Given an yahoo application how many test cases u can write?
7. GUI contains 2 fields. Field 1 to accept the value of x and Field 2 displays the result of
the formula a+b/c-d where a=0.4*x, b=1.5*a, c=x, d=2.5*b; How many system test cases
would you write
8. How do you know that all the scenarios for testing are covered?
TEST AUTOMATION
1. Give me an example where you have customized an automated test script.
2. What steps have you followed while automating?
.......a) Running the test manually and ensuring a "pass".
.......b) Recording
.......c) Checkpoints/Verification
3. Can you automate Context-sensitive help? If so, how do you that?
4. What are the major differences between Stress testing, Load testing, Volume testing?
5. What is the difference between quality assurance and testing?
6. What are the main attributes of test automation?
7. What is data - driven automation?
8. What is 'configuration management'?
9. What is memory leaks and buffer overflows?
10. Why does software have bugs?
11. How do you do usability testing, security testing, installation testing, ADHOC, safety
and smoke testing?
12. Describe some problem that you had with automating testing tool.
13. How do we test for severe memory leakages?
14. What are the problems encountered during the testing the application compatibility on
different browsers and on different operating systems
15. How will you evaluate the fields in the application under test using automation tool?

220

16. How did you use automating testing tools in your job?
17. What skills needed to be a good test automator?
18. Can the activities of test case design be automated?
19. What types of scripting techniques for test automation do you know? .What are
scripting techniques? Could you describe the 5 techniques mentioned?
20. What tools are available for support of testing during software development life cycle?

SOFTWARE TESTING
1. What is the diffrence between Regression testing and Retesting?
2. What are the errors encountered while testing an application manually or using
automated tool like Testdirector, Winrunner?
3. What is Inspection, Review?
4. What is the actual different between re-testing and regressiontesting. brefily explain
5. Explain Test Strategy
6. What is Tracebility Matrix ?
7. What are the major diff. between the Winrunner 6.0 and 7.0 (with internal procedure)?
8. What test you perform mostly? Regression or retesting in your testing process?
9. What did you do as a team leader?
10. How do we know about the build we are going to test? where do you see this?
11. What is system testing and what are the different types of tests you perform in system
testing?
12. What is the difference between Return and treturn?
13. How do you test a weblink which is changing dynamically?
14. What are the flaws in water fall model and how to overcome it?
15. What is defect leakage?
16. Did you ever have to deal with someone who doesn't believe in testing? What did u
do?
17. How will you write test cases for a code currently under development?
18. Describe the last project scenario and generate test cases for it?
19. If there are a lot of bugs to be fixed, which one would you resolve first
20. How will you test a stapler?

QA TESTING

221

1. If the actual result doesn't match with expected result in this situation what should we
do?
2. What is the importance of requirements traceability in a product testing?
3. When is the best time for system testing?
4. What is use case? What is the diffrence between test cases and use cases?
5. What is the difference between the test case and a test script
6. Describe to the basic elements you put in a defect report?
7. How do you test if you have minimal or no documentation about the product?
8. How do you decide when you have tested enough?
9. How do you determine what to test?
10. In general, how do you see automation fitting into the overall process of testing?
11. How do you deal with environments that are hostile to quality change efforts?
12. Describe to me the Software Development Life Cycle as you would define it?
13. Describe to me when you would consider employing a failure mode and defect
analysis?
14. What is the role of QA in a company that produces software?
15. How do you scope, organize, and execute a test project?
16. How can you test the white page
17. What is the role of QA in a project developement?
18. How you used whitebox and block box technologies in your application?
19. 1) What are the demerits of winrunner?2) We write the test data after what are the
principles to do testing an application?
20. What is the job of Quality Assurance Engineer? Difference between the Testing &
Quality Assurance job.
WINRUNNER INTERVIEW QUESTIONS
1.. How to recognise the objects during runtime in new build version (test suite)
comparing with old guimap?
2. wait(20) - What is the minimum and maximum time the above mentioned
synchronization statements will wait given that the global default timeout is set to 15
seconds.
3. Where in the user-defined function library should a new error code be defined?
4. In a modular test tree, each test will receive the values for the parameters passed from
the main test. These parameters are defined in the Test properties dialog box of each
test.Refering to the above, in which one of the following files are changes made in the test
properties dialog saved?
5. What is the scripting process in Winrunner?

222

6. How many scripts can we generate for one project?


7. What is the command in Winrunner to invoke IE Browser? And once I open the IE
browser is there a unique way to identify that browser?
8. How do you load default comments into your new script like IDE's?
9. What is the new feature add in QTP 8.0 compare in QTP 6.0
10. When will you go to automation?
11. How to test the stored procedure?
12. How to recognise the objects during runtime in new build version (test suite)
comparing with old guimap
13. what is use of GUI files in winrunner.
14. Without using the datadriven test, how can we test the application with different set of
inputs?
15. How do you load compiled module inside a comiled module?
16. Can you tell me the bug life cycle
17. How to find the length of the edit box through WinRunner?
18. What is file type of WinRunner test files, its extension?
19. What is candidate release?
20. What type of variables can be used with in the TSL function?
RATIONAL ROBOT
1. In which directory are the .sbl files stored?
2. What SQABasic commands have you used?
3. Difference between SQAgetpropertyArray and SQAGetPropertyAsString?
4. What do .sbl and .sbh represent?
5. Is there any Load testing tool called Rational Site Load tool?
6. What is the difference between rational robot and QTP or Winrunner? Which is more
ueful of the three?
7. What is the difference between Rational Robot (Rational Functional Tester) and IBM
functional tester? which is better?
QTP
1. How can I add an action (external action) programmatically?
2. How can I call an external action, which is not added external action of an action.
3. What is meant by Source Control?
4. How and what kind of VB functions do u use in QTP?
5. How can u describe the basic flow of automation with conditional and programmatic

223

logic?
6. How can I implement error handling in QTP,
7. How to recall a function in QTP
8. Give one example where you have used Regular Expression?
9. How can I implement error handling in QTP?
10. How to select particular value from the combo box in the current page which is entered
in the previous page edit box after parameterization?
11. If you have the same application screen with 7 drop down boxes and approximately 70
values how do you test with QTP?
12. When there is a task that gets repeated in multiple scripts, what do you do in QTP?
13. What is the descriptive programming?
14. What is the use of descriptive programming?
15. How to instruct QTP to display errors and other description in the test results instead
of halting execution by throwing error in the mid of execution due to an error (for example
Object not found)?
16. How you write scripts in QTP? What's the main process in QTP? How do you run
scripts in QTP? Please anyone can answer my questions.......
17. What is descriptive programming?
18. How to add run-time parameter to a datasheet?
19. How to load the *.vbs or test generating script in a new machine?
20. How can you write a script without using a GUI in QTP?
LOADRUNNER
1. What is load testing? Can we test J2ME application with load runner ? What is
Performance testing?
2. Which protocol has to be selected for record/playback Oracle 9i application?
3. What are the enhancements which have been included in loadrunner 8.0 when
compared to loadrunner 6.2?
4. Can we use Load Runner for testing desktop applications or non web based
applications and how do we use it.?
5. How to call winrunner script in Loadrunner?
6. What arr the types of parameterisation in load runner? List the step to do strees
testing?
7. What are the steps for doing load and performance testing using Load Runner?
8. What is concurrent load and corollation? What is the process of load runner?
9. What is planning for the test?
10. What enables the controller and the host to communicate with each other in Load

224

Runner?
11. Where is Load testing usually done?
12. What are the only means of measuring performance?
13. Testing requirement and design are not part of what?
14. According to Market analysis 70% of performance problem lies with what?
15. What is the level of system loading expected to occur during specific business
scenario?
16. What is run-time-setting.
17. When load runner is used .
18. What protocols does LoadRunner support?
19. What do you mean by creating vuser script.?
20. What is rendezvous point?
LOAD TESTING
1. What are the uses of load testing ? What is defered graphs? What are the different
components in loadrunner?
2. How you analyze graphics in loadrunner? How do you work bug log?
3. How can data caching have a negative effect on load testing results?
4. What criteria would you use to select Web transactions for load testing?
5. For what purpose are virtual users created?
6. What is the difference between Load testing and Performace Testing?
7. Why do you need to parameterize fields in your virtual user script?
8. What are the reasons why parameterization is necessary when load testing the Web
server and the database server?
9. Why it is recommended to add verification checks to your all your scenarios?
10. Load Testing - What should be analyzed.
11. In what situation would you want to parameterize a text verification check?
12. What usually indicates that your virtual user script has dynamic data that is dependent
on you parameterized fields?
13. What are the benefits of creating multiple actions within any virtual user script?
DATABASE TESTING
1. What SQL statements have you used in Database Testing?
2. How to test data loading in Database testing
3. What is way of writing testcases for database testing?
4. What is Database testing?

225

5. What we normally check for in the Database Testing?


6. How to Test database Manually? Explain with an example
COMMON INTERVIEW QUESTIONS
1. What Technical Environments have you worked with?
2. Have you ever converted Test Scenarios into Test Cases?
3. What is the ONE key element of 'test case'?
4. What is the ONE key element of a Test Plan?
5. What is SQA testing? tell us steps of SQA testing
6. How do you promote the concept of phase containment and defect prevention?
7. Which Methodology you follow in your Testcase?
8. Specify the tools used by MNC companies
9. What are the test cases prepared by the testing team
10. During the start of the project how will the company come to an conclusion that tool is
required for testing or not?
11. Define Bug Life Cycle? What is Metrics
12. What is a Test procedure?
13. What is the difference between SYSTEM TESTING and END-TO-END TESTING?
14. What is Traceability Matrix? Is there any interchangeable term for Traceability Matrix
?Are Traceability Matrix and Test Matrix same or Different ?
15. What is the differance between an exception and an error?
16. Correct bug tracking process - Reporting, Re-testing, Debigging, .....?
17. What is the difference between bug and defect?
18. How much time is/should be alloated for Testing out of total Development time based
on industry standards?
19. What are test bugs?
20. Define Quality - bug free, Functionality working or both?
COMMON QUESTIONS
1. If you have an application, but you do not have any requiremnts available, then how
would you perform the testing?
2. How can you know if a test case is necessary?
3. What is peer review in practical terms?
4. How do you know when you have enough test cases to adequately test a software
system or module?
5. Who approved your test cases?

226

6. What will you when you find a bug?


7. What test plans have you written?
8. What is QA? What is Testing? Are they both same or different?
9. How to write Negative Testcase? Give ex.
10. In an application currently in production, one module of code is being modified. Is it
necessary to re-test the whole application or is it enough to just test functionality
associated with that module?
11. What is included in test strategy? What is overall process of testing step by step and
what are various documnets used testing during process?
12. What is the most challenging situation you had during testing
13. What are you going to do if there is no Functional Spec or any documents related to
the system and developer who wrote the code does not work in the company anymore, but
you have system and need to test?
14. What is the major problem did you resolve during testing process
15. What are the types of functional testing?
16. 1. How will you write integration test cases 2. How will you track bugs from winrunner.
3.How will you customise the bugs as pass/fail. 4. You find a bug How will you repair 5. In
testcases you have bug or not. 6. What is use case ? what does it contains.
17. What is the difference between smoke testing and sanity testing
18. What is Random Testing?
19. What is smoke testing?
20. What is stage containment in testing?
BUG TRACKING
1. What is the difference between a Bug and a Defect?
2. How to post a BUG
3. How do we track a bug?plz send format of excel sheet in which we write the bug
details? How do we give the severithy and priority to the bugs?
4. What are the different types of Bugs we normally see in any of the Project? Include the
severity as well.
5. Top Ten Tips for Bug Tracking

DB2 INTERVIEW QUESTIONS

1. Can you display the index?


2. At what stage db2 must be up?
3. When do you use subroutines?

227

4. Initial position of cursor of the exucuton of open statements?


5. What is the index ,types of index ?
6. How many clustering indexes are pasing for a table?
7. When u will use curser with hold option?
8. File opening modes in cobol and corresponding dispositions?
9. What will happened .if the file is open in extend mode and corresponding is equal to
old in jcl?
10. How to know other person job status?
11. What will happened ,if the subprogram is called second time?
12. Can u see s9(4)comp3 data?
13. Commenly facing errors?
14. What is low values and high values?
15. How to enter in xpediter?
16. A dataset contains 1000 records ,I want to brouse particular record in file-id?
17. There are two programs say A&B,A is only cobol program,B iscobol-db2 program,
how to compile both programs?
18. How to pass return codes from Cobol to jcl?
19. In my jcl ,the 1st step is delete step, if the data set is existing, I want to delete, that
one ,if dataset is no existing, I do not want abend the job, how can I code in disp?
20. What is diff b/w check pending and copy pending?
21. How to Repair the table?
22. How to see the status of the table?
23. How to load data to a table?
24. What is diff b/w QMF & Spoofi?
25. I have update Row in table using spoofi.how Revert that update Row it means original
position?
26. Quick Respendse and REspondce time in file-aid?
27. File contains 5 records say D,E,F,C,A-I want to copy D and A records only by using
file-aid?
28. What is severity one error in production support?
29. How to increase table space in db2?
30. What is the indexset and sequence set in vsam ksds?
31. How to read last record in vsam file.,I don't know how many records are there?
32. I have 1000 records in vsam,I want to read records 500 to 900
33. Explain Reuse and upgrade
34. How do you read vsam file?
35. How can we over come the same situation when using flat file.

228

36. what r the compiler options we use?where the compiler option will be?What is the
need of compiler options?
37. Suppose there is cobol-db2 program.I made changes only in the cobol program.Is
there need recomile the DBRM again?why?
38. After bind i how can we run a cobol-db2 program?
39. By using any condition is there any way to abend a program.?If so how?
40. What is the diff bet plan,package,dbrm?
41. After retrieving the elements from production,how can do the testing before moving
the changes to production. Whether we have to create the JCL for testing or it will
automatically tested and compiled?
42. What is a packed decimal..?

DATASTAGE INTERVIEW QUESTIONS

1. How do you rename all of the jobs to support your new File-naming conventions?
2. Does the selection of 'Clear the table and Insert rows' in the ODBC stage send a
Truncate statement to the DB or does it do some kind of Delete logic.
3. Tell me one situation from your last project, where you had faced problem and How did
u solve it?
4. The above might rise another question: Why do we have to load the dimensional tables
first, then fact tables:
5. How will you determine the sequence of jobs to load into data warehouse?
6. What are the command line functions that import and export the DS jobs?
7. What is the utility you use to schedule the jobs on a UNIX server other than using
Ascential Director?
8. How would call an external Java function which are not supported by DataStage?
9. What will you in a situation where somebody wants to send you a file and use that file
as an input or reference and then run job.
10. Read the String functions in DS
11. How did u connect with DB2 in your last project?
12. What are Sequencers?
13. How did you handle an 'Aborted' sequencer?
14. What are other Performance tunings you have done in your last project to increase the
performance of slowly running jobs?
15. How did you handle reject data?
16. If worked with DS6.0 and latest versions what are Link-Partitioner and Link-Collector
used for?

229

17. What are Routines and where/how are they written and have you written any routines
before?
18. What are OConv () and Iconv () functions and where are they used?
19. How did u connect to DB2 in your last project?
20. Do u know about METASTAGE?
21. Do you know about INTEGRITY/QUALITY stage?
22. Explain the differences between Oracle8i/9i?
23. How good are you with your PL/SQL?
24. Did you work in UNIX environment?
25. What other ETL's you have worked with?
26. What versions of DS you worked with?
27. What is DS Designer used for - did u use it?
28. What is DS Administrator used for - did u use it?
29. What is DS Director used for - did u use it?
30. What is DS Manager used for - did u use it?
31. What are Static Hash files and Dynamic Hash files?
32. What is Hash file stage and what is it used for?
33. Have you ever involved in updating the DS versions like DS 5.X, if so tell us some the
steps you have taken in doing so?
34. Did you Parameterize the job or hard-coded the values in the jobs?
35. How do you merge two files in DS?

.NET INTERVIEW QUESTIONS


1. Explain the differences between Server-side and Client-side code?
2. What type of code (server or client) is found in a Code-Behind class?
3. Should validation (did the user enter a real date) occur server-side or client-side? Why?
4. What does the "EnableViewState" property do? Why would I want it on or off?
5. What is the difference between Servers? Transfer and Response. Redirect? Why would I
choose one over the other?
6.Can you give an example of when it would be appropriate to use a web service as
opposed to a non-serviced .NET component
7.Let's say I have an existing application written using Visual Studio 6 (VB 6, InterDev 6)
and this application utilizes Windows 2000 COM+ transaction services. How would you
approach migrating this application to .NET
8.Can you explain the difference between an ADO.NET Dataset and an ADO Recordset?
9. Can you give an example of what might be best suited to place in the Application Start
and Session Start subroutines?

230

10. If I'm developing an application that must accommodate multiple security levels
though secure login and my ASP.NET web application is spanned across three webservers (using round-robin load balancing) what would be the best approach to maintain
login-in state for the users?
JAVA INTERVIEW QUESTIONS
JAVA:1) What is static variable.
2) What is transient variable?
3) What is final variable.
4) What is final method.
5) What is native method.
6) What is abstract method
7) what is innerclass.
8) What is static class?
9) What is final class.
10) What is anonymous class?

JDBC:
1) What is a transaction. (*)
2) What is the purpose of setAutoCommit(). (*)
3) What are the three statements in JDBC & differences between them. (*)
4) What is stored procedure. How do you create stored procedure? (*)
5) What are batch updates.

JSP:
1)What is JSP. (*)
2)What are advantages of JSP.
3)What is the difference between include directive & jsp:include action. (*)
4)What are Custom tags. Why do you need Custom tags. How do you create Custom tag.
(*)
5)What are the implicit objects in JSP & differences between them. (*)

Servlets:
1)What are Servlets.
2)What are the advantages of Servlet.

231

3)What is the Life cycle of Servlet. (*)


4)What is the difference between Servlet and JSP. (*)

EJB:- (All questions are important)


1)What is the difference between normal Java object and EJB.
2)What is the difference between JavaBean and EJB.
3)What is EJB.
4)What is Session Bean. What are the various types of Session Bean.

XML:1)What is the difference between SAX parser and DOM parser. (*)
2)What is the difference between Schema and DTD. (*)
3)How do you parse/validate the XML document. (*)
4)What is XML Namespace.
5)What is Xpath.
PEOPLESOFT INTERVIEW QUESTIONS
1)What is the APP engine event in peoplecode.
2)what are the different actions in APP ENGINE.
3)How many temp records are there in app engine.
4)How do you debug your AE.
5)Why temp records are needed?
6)Why state records are needed?
7)Differences between State and temp records.
8)Different ways to run AE, SQR.(Command, process scheduler)
7)Different sql statements and metasql statements.
8)How do you retrieve a value from scroll..scroll select?
9)What is scroll select, etc
10)what is record, row peoplecode.

DATABASE QUESTIONS
1)What are copybooks(DB2)?
2)What is plan?
3)Tell me the sections in COBOL?

232

4)Connectivity to DB2 from COBOL.


5)What are the customizations in COBOL?
6)Diff between union and union all?
7)Give me example for group by.
8)What is SPUFI?
9)Replacement of query analyzer--- SPUFI(DB2)

233

ABAP QUESTIONS:
1.Elementary search helps, Collective search help.
2.Difference between Search Helps and Match Codes
3.Have you created database tables?
4.Difference between client dependent and client independent tables?
5.How to create client independent tables
6.Have you created Maintenance dialog or Table Maintenance?
7.On ABAP: Did you set up a workflow? Are you familiar with all steps for setting up a
workflow?
8.Have you used performance tuning? What major steps will you use for these?
9.In the select statement what is group by?
10.Have you worked with field groups? Have you used Import/Export statements?
ABAP EDITOR:
1.Fixed point arithmetic what is the use? How to set this?
2.Have you used client dependent ABAP programs?
DATABASE COMMANDS:
1.Select statement to read data into internal tables. Types of Select statements
2.What happens Update command is used without where clause ?
3.Difference between Insert, Update and Modify
4.Explain Commit and Roll back
5.Catch Command
6.What is Group by in Select statement?
TEST AUTOMATION:
1.What automating testing tools are you familiar with?
2.How did you use automating testing tools in your job?
3.Describe some problem that you had with automating testing tool.
4.How do you plan test automation?
5.Can test automation improve test effectiveness?
6.What is data - driven automation?
7.What are the main attributes of test automation?
8.Does automation replace manual testing?
9.How will you choose a tool for test automation?
10.How you will evaluate the tool for test automation?

234

LOAD TESTING:
1.What criteria would you use to select Web transactions for load testing?
2.For what purpose are virtual users created?
3.Why it is recommended to add verification checks to your all your scenarios?
4.In what situation would you want to parameterize a text verification check?
5.Why do you need to parameterize fields in your virtual user script?
GENERAL QUESTIONS:
1.What types of documents would you need for QA, QC, and Testing?
2.What did you include in a test plan?
3.Describe any bug you remember.
4.What is the purpose of the testing?
5.What do you like (not like) in this job?
6.What is quality assurance?
7.What is the difference between QA and testing?
8.How do you scope, organize, and execute a test project?
9.What is the role of QA in a development project?
10.What is the role of QA in a company that produces software?

235

C C PLUS PLUS INTERVIEW QUESTIONS


1. What is the output of printf("%d")
2. Difference between "C structure" and "C++ structure".
3. Difference between a "assignment operator" and a "copy constructor"
4. What is the difference between "overloading" and "overriding"?
5. Explain the need for "Virtual Destructor".
6. Can we have "Virtual Constructors"?
7. What are the different types of polymorphism?
8. What are Virtual Functions? How to implement virtual functions in "C"
9. What are the different types of Storage classes?
10. What is Namespace?
VISUAL BASIC INTERVIEW QUESTIONS
1. 3 main differences between flexgrid control and dbgrid control
2. ActiveX and Types of ActiveX Components in VB
3. Advantage of ActiveX Dll over Active Exe
4. Advantages of disconnected recordsets
5. Benefit of wrapping database calls into MTS transactions
6. Benefits of using MTS
7. Can database schema be changed with DAO, RDO or ADO?
8. Can you create a tabletype of recordset in Jet - connected ODBC database engine?
9. Constructors and distructors
10. Controls which do not have events
SQL Server
1.What are primary keys and foreign keys?
2.What is the difference between clustered and non-clustered indices? ...and why do you
use a clustered index?
3.What is an outer join?
4.What are Cartesian joins?
5.How is referential integrity enforced in a SQL Server database?
6.What are the inserted and deleted tables and what are they used for?
7.What is the name of the SQL language used in SQL Server stored procedures?
8.What is the purpose of having stored procedures in a database?
9.Why might you create a stored procedure with the 'with recompile' option?

236

10.What is a cursor? Within a cursor, how would you update fields on the row just
fetched?
SQL, ORACLE, PRO*C/C++
1.What are the different types of joins?
2.Explain normalization with examples.
3.What cursor type do you use to retrieve multiple recordsets?
4.Difference between a "where" clause and a "having" clause
5.What is the difference between "procedure" and "function"?
6.How will you copy the structure of a table without copying the data?
7.How to find out the database name from SQL*PLUS command prompt?
8.Talk about "Exception Handling" in PL/SQL?
9.What is the difference between "NULL in C" and "NULL in Oracle?"
10.What is Pro*C? What is OCI?
ORACLE CONCEPTS AND ARCHITECTURE DATABASE STRUCTURES
1.What are the components of physical database structure of Oracle database?
2.What are the components of logical database structure of Oracle database?
3.What is a tablespace?
4.What is SYSTEM tablespace and when is it created?
5.Explain the relationship among database, tablespace and data file.
6.What is schema?
7.What are Schema Objects?
8.Can objects of the same schema reside in different tablespaces?
9.Can a tablespace hold objects from different schemes?
10.What is Oracle table?
SIEBEL INTERVIEW QUESTIONS
1.How do you control visibility in Siebel?
2.What is the difference between an organization and division in Siebel?
3.What does position represents in Siebel?
4.How do you assign responsibilities to employees in Siebel?
5.How do you set up employees in Siebel?
6.What happens if you create an employee in Siebel application and forget to create the
employee in the database?
7.Why do you need to create employees at the database in Siebel?

237

8.What is position type field in position applet?


9.What does an opportunity, account contact do in Siebel?
10.How is the opportunity related to an account?
DATAWARE

HOUSING

INTERVIEW

QUESTIONS(ETL,

BUSINESS

INTELLIGENCE,ABINITIO)

GENERAL :
1. What is a data-warehouse?
2. What are Data Marts?
4. What is ER Diagram?
5. What is a Star Schema?
6. What is Dimensional Modelling?
7. What is Snow Flake Schema?
ETL QUESTIONS:
1. What is a staging area? Do we need it? What is the purpose of a staging area?
2. What is a three tier data warehouse?
3. What are the various methods of getting incremental records or delta records from the source
systems?

BUSINESS INTELLIGENCE:
1. What is Business Intelligence?
2. What is OLAP?
3. What is OLAP, MOLAP, ROLAP, DOLAP, HOLAP? Examples?
ABINITIO:
1.What is the function you would use to transfer a string into a decimal?
2.How many parallelisms are in Abinitio? Please give a definition of each.
3.What is the difference between a DB config and a CFG file?

238

Web tester interview questions


1. Define load, performance and stress testing?
2. What are the goals of a performance testing of a web application?
3. State a generalized process for load test? Or explain how you did it previously.
4. How do you determine user soad for a perf test of a Web application?
5. What do you understand by the terms Response Time, Pages Per Second,
Transactions Per Secpnd?
6. How would you determine the performance of a web application by looking at the values
of Response Time and Pages Per Second?
7. What will be your approach if a particular script in Load Test fails?
8. Talk about the terms: Soak Perf Test, Resilience Perf Test, Regression Perf Test.
9. Which Server Stats are essentially monitored during a Perf test of a Web Application?
10. What are the major components of Perf Test Report?
Test Automation:
1. What automating testing tools are you familiar with?
2. How did you use automating testing tools in your job?
3. Describe some problem that you had with automating testing tool.
4. How do you plan test automation?
5. Can test automation improve test effectiveness?
6. What is data - driven automation?
7. What are the main attributes of test automation?
8. Does automation replace manual testing?
9. How will you choose a tool for test automation?
10. How you will evaluate the tool for test automation?
11. What are main benefits of test automation?
12. What could go wrong with test automation?
13. How you will describe testing activities?
14. What testing activities you may want to automate?
15. Describe common problems of test automation.
16. What types of scripting techniques for test automation do you know?
17. What are principles of good testing scripts for automation?
18. What tools are available for support of testing during software development life cycle?
19. Can the activities of test case design be automated?
20. What are the limitations of automating software testing?
21. What skills needed to be a good test automator?

239

22. How to find that tools work well with your existing system?
23.Describe some problem that you had with automating testing tool.
24.What are the main attributes of test automation?
25.What testing activities you may want to automate in a project?
26.How to find that tools work well with your existing system?

Load Testing:
1.What criteria would you use to select Web transactions for load testing?
2.For what purpose are virtual users created?
3.Why it is recommended to add verification checks to your all your scenarios?
4.In what situation would you want to parameterize a text verification check?
5.Why do you need to parameterize fields in your virtual user script?
6.What are the reasons why parameterization is necessary when load testing the Web server
and the database server?
7.How can data caching have a negative effect on load testing results?
8.What usually indicates that your virtual user script has dynamic data that is dependent on you
parameterized fields?
9.What are the benefits of creating multiple actions within any virtual user script?

General questions:
1. What types of documents would you need for QA, QC, and Testing?
2.

What did you include in a test plan?

3.

Describe any bug you remember.

4.

What is the purpose of the testing?

5.

What do you like (not like) in this job?

6.

What is quality assurance?

7.

What is the difference between QA and testing?

8.

How do you scope, organize, and execute a test project?

9.

What is the role of QA in a development project?

10. What is the role of QA in a company that produces software?


11. Define quality for me as you understand it
12. Describe to me the difference between validation and verification.
13. Describe to me what you see as a process. Not a particular process, just the basics of
having a process.
14. Describe to me when you would consider employing a failure mode and effect analysis.

240

15. Describe to me the Software Development Life Cycle as you would define it.
16. What are the properties of a good requirement?
17. How do you differentiate the roles of Quality Assurance Manager and Project Manager?
18. Tell me about any quality efforts you have overseen or implemented. Describe some of
the challenges you faced and how you overcame them.
19. How do you deal with environments that are hostile to quality change efforts?
20. In general, how do you see automation fitting into the overall process of testing?
21. How do you promote the concept of phase containment and defect prevention?
22. If you come onboard, give me a general idea of what your first overall tasks will be as far
as starting a quality effort.
23. What kinds of testing have you done?
24. Have you ever created a test plan?
25. Have you ever written test cases or did you just execute those written by others?
26. What did your base your test cases?
27. How do you determine what to test?
28. How do you decide when you have 'tested enough?'
29. How do you test if you have minimal or no documentation about the product?
30. Describe me to the basic elements you put in a defect report?
31. How do you perform regression testing?
32. At what stage of the life cycle does testing begin in your opinion?
33. How do you analyze your test results? What metrics do you try to provide?
34. Realising you won't be able to test everything - how do you decide what to test first?
35. Where do you get your expected results?
36. If automating - what is your process for determining what to automate and in what order?
37. In the past, I have been asked to verbally start mapping out a test plan for a common
situation, such as an ATM. The interviewer might say, "Just thinking out loud, if you were
tasked to test an ATM, what items might you test plan include?" These type questions are
not meant to be answered conclusively, but it is a good way for the interviewer to see
how you approach the task.
38. If you're given a program that will average student grades, what kinds of inputs would
you use?
39. Tell me about the best bug you ever found.
40. What made you pick testing over another career?
41. What is the exact difference between Integration & System testing, give me examples
with your project.
42. How did you go about testing a project?
43. When should testing start in a project? Why?

241

44. How do you go about testing a web application?


45. Difference between Black & White box testing
46. What is Configuration management? Tools used?
47. What do you plan to become after say 2-5yrs (Ex: QA Manager, Why?)
48. Would you like to work in a team or alone, why?
49. Give me 5 strong & weak points of yours
50. Why do you want to join our company?
51. When should testing be stopped?
52. What sort of things would you put down in a bug report?
53. Who in the company is responsible for Quality?
54. Who defines quality?
55. What is an equivalence class?
56. Is a "A fast database retrieval rate" a testable requirement?
57. Should we test every possible combination/scenario for a program?
58. What criteria do you use when determining when to automate a test or leave it manual?
59. When do you start developing your automation tests?
60. Discuss what test metrics you feel are important to publish an organization?
61. In case anybody cares, here are the questions that I will be asking:
62. Describe the role that QA plays in the software lifecycle.
63. What should Development require of QA?
64. What should QA require of Development?
65. How would you define a "bug?"
66. Give me an example of the best and worst experiences you've had with QA.
67. How does unit testing play a role in the development / software lifecycle?
68. Explain some techniques for developing software components with respect to testability.
69. Describe a past experience with implementing a test harness in the development of
software.
70. Have you ever worked with QA in developing test tools? Explain the participation
Development should have with QA in leveraging such test tools for QA use.
71. Give me some examples of how you have participated in Integration Testing.
72. How would you describe the involvement you have had with the bug-fix cycle between
Development and QA?
73. What is unit testing?
74. Describe your personal software development process.
75. How do you know when your code has met specifications?
76. How do you know your code has met specifications when there are no specifications?
77. Describe your experiences with code analyzers.

242

78. How do you feel about cyclomatic complexity?


79. Who should test your code?
80. How do you survive chaos?
81. What processes/methodologies are you familiar with?
82. What type of documents would you need for QA/QC/Testing?
83. How can you use technology to solve problem?
84. What type of metrics would you use?
85. How to find that tools work well with your existing system?
86. What automated tools are you familiar with?
87. How well you work with a team?
88. How would you ensure 100% coverage of testing?
89. How would you build a test team?
90. What problem you have right now or in the past? How you solved it?
91. What you will do during the first day of job?
92. What would you like to do five years from now?
93. Tell me about the worst boss you've ever had.
94. What are your greatest weaknesses?
95. What are your strengths?
96. What is a successful product?
97. What do you like about Windows?
98. What is good code?
99. Who is Kent Beck, Dr Grace Hopper, Dennis Ritchie?
100.

What are basic, core, practises for a QA specialist?

101.

What do you like about QA?

102.

What has not worked well in your previous QA experience and what would you

change?
103.

How you will begin to improve the QA process?

104.

What is the difference between QA and QC?

105.

What is UML and how to use it for testing?

106.

What is CMM and CMMI? What is the difference?

107.

What do you like about computers?

108.

Do you have a favourite QA book? More than one? Which ones? And why.

109.

What is the responsibility of programmers vs QA?

110.

What are the properties of a good requirement?

111.

How to do test if we have minimal or no documentation about the product?

112.

What are all the basic elements in a defect report?

113.

Is an "A fast database retrieval rate" a testable requirement?

243

Software Quality Assurance


1. What is software quality assurance?
2. What is the value of a testing group? How do you justify your work and budget?
3. What is the role of the test group vis-is documentation, tech support, and so forth?
4. How much interaction with users should testers have, and why?
5. How should you learn about problems discovered in the field, and what should you learn from
those problems?
6. What are the roles of glass-box and black-box testing tools?
7. What issues come up in test automation, and how do you manage them?
8. What development model should programmers and the test group use?
9. How do you get programmers to build testability support into their code?
10. What is the role of a bug tracking system?
11. What are the key challenges of testing?
12. Have you ever completely tested any part of a product? How?
13. Have you done exploratory or specification-driven testing?
14. Should every business test its software the same way?
15. Discuss the economics of automation and the role of metrics in testing.
16. Describe components of a typical test plan, such as tools for interactive products and for
database products, as well as cause-and-effect graphs and data-flow diagrams.
17. When have you had to focus on data integrity?
18. What are some of the typical bugs you encountered in your last assignment?
19. How do you prioritize testing tasks within a project?
20. How do you develop a test plan and schedule? Describe bottom-up and top-down
approaches.
21. When should you begin test planning?
22. When should you begin testing?
23. Do you know of metrics that help you estimate the size of the testing effort?
24. How do you scope out the size of the testing effort?
25. How many hours a week should a tester work?
26. How should your staff be managed? How about your overtime?
27. How do you estimate staff requirements?
28. What do you do (with the project tasks) when the schedule fails?
29. How do you handle conflict with programmers?
30. How do you know when the product is tested well enough?
31. What characteristics would you seek in a candidate for test-group manager?

244

32. What do you think the role of test-group manager should be? Relative to senior
management?
Relative

to

other

technical

groups

in

the

company?

Relative

to

your

staff?

33. How do your characteristics compare to the profile of the ideal manager that you just
described?
34. How does your preferred work style work with the ideal test-manager role that you just
described? What is different between the way you work and the role you described?
35. Who should you hire in a testing group and why?
36. What is the role of metrics in comparing staff performance in human resources management?
37. How do you estimate staff requirements?
38. What do you do (with the project staff) when the schedule fails?
39. Describe some staff conflicts youve handled.
Here are some questions you might be asked on a job interview for a testing opening:
1. Why did you ever become involved in QA/testing?
2. What is the testing lifecycle and explain each of its phases?
3. What is the difference between testing and Quality Assurance?
4. What is Negative testing?
5. What was a problem you had in your previous assignment (testing if possible)? How did
you resolve it?
6. What are two of your strengths that you will bring to our QA/testing team?
7. How would you define Quality Assurance?
8. What do you like most about Quality Assurance/Testing?
9. What do you like least about Quality Assurance/Testing?
10. What is the Waterfall Development Method and do you agree with all the steps?
11. What is the V-Model Development Method and do you agree with this model?
12. What is the Capability Maturity Model (CMM)? At what CMM level were the last few
companies you worked?
13. What is a "Good Tester"?
14. Could you tell me two things you did in your previous assignment (QA/Testing related
hopefully) that you are proud of?
15. List 5 words that best describe your strengths.
16. What are two of your weaknesses?
17. What methodologies have you used to develop test cases?
18. In an application currently in production, one module of code is being modified. Is it
necessary to re- test the whole application or is it enough to just test functionality
associated with that module?

245

19. Define each of the following and explain how each relates to the other: Unit, System, and
Integration testing.
20. Define Verification and Validation. Explain the differences between the two.
21. Explain the differences between White-box, Gray-box, and Black-box testing.
22. How do you go about going into a new organization? How do you assimilate?
23. Define the following and explain their usefulness: Change Management, Configuration
Management, Version Control, and Defect Tracking.
24. What is ISO 9000? Have you ever been in an ISO shop?
25. When are you done testing?
26. What is the difference between a test strategy and a test plan?
27. What is ISO 9003? Why is it important
28. What are ISO standards? Why are they important?
29. What is IEEE 829? (This standard is important for Software Test Documentation-Why?)
30. What is IEEE? Why is it important?
31. Do you support automated testing? Why?
32. We have a testing assignment that is time-driven. Do you think automated tests are the
best solution?
33. What is your experience with change control? Our development team has only 10
members. Do you think managing change is such a big deal for us?
34. Are reusable test cases a big plus of automated testing and explain why.
35. Can you build a good audit trail using Compuware's QACenter products. Explain why.
36. How important is Change Management in today's computing environments?
37. Do you think tools are required for managing change. Explain and please list some
tools/practices which can help you managing change.
38. We believe in ad-hoc software processes for projects. Do you agree with this? Please
explain your answer.
39. When is a good time for system testing?
40. Are regression tests required or do you feel there is a better use for resources?
41. Our software designers use UML for modeling applications. Based on their use cases, we
would like to plan a test strategy. Do you agree with this approach or would this mean
more effort for the testers.
42. Tell me about a difficult time you had at work and how you worked through it.
43. Give me an example of something you tried at work but did not work out so you had to go
at things another way.
44. How can one file compare future dated output files from a program which has change,
against the baseline run which used current date for input. The client does not want to
mask dates on the output files to allow compares. - Answer-Rerun baseline and future

246

date input files same # of days as future dated run of program with change. Now run a file
compare against the baseline future dated output and the changed programs' future
dated output.
Interviewing Suggestions
1. If you do not recognize a term ask for further definition. You may know the
methodology/term but you have used a different name for it.
2. Always keep in mind that the employer wants to know what you are going to do for them,
with that you should always stay/be positive.
Pre interview Questions
1. What is the structure of the company?
2. Who is going to do the interview-possible background information of interviewer?
3. What is the employer's environment (platforms, tools, etc.)?
4. What are the employer's methods and processes used in software arena?
5. What is the employer's philosophy?
6. What is the project all about you are interviewing for-as much information as possible?
7. Any terminologies that the company may use.

247

SOFTWARE TESTING GLOSSARY

Acceptance test. Formal tests conducted to determine whether or not a system satisfies
its acceptance criteria and to enable the customer to determine whether or not to accept
a system. This particular kind of testing is performed with the STW/Regression suite of

tools.
Action statement. A non-decision statement in a program that results in executable

code.
Activation clause. A clause in the SMARTS' ATS file which is comprised of the
activation keyword and a sequence of system commands to be performed during test

execution.
Ada. The DoD standard programming language.

Ancestor node. A node in a STW/Coverage directed graph that lies on some path (i.e.,

sequence of logical branches) that leads to the specified node.


apg. All Paths Generator. A TCAT-PATH facility that generates equivalence classes that

include all program paths from a directed graph.


Arc. In a directed graph, the oriented connection between two nodes. This is also

referred to as an edge.
Archive file. A file generated from STW/Coverage's cover, scover or ctcover utility

containing test trace information in reduced form.


ASCII synchronization. The process by which a playback (e.g. from CAPBAK/X) holds

back execution until a character string is located.


ATS. A SMARTS user-designed description file which references a test suite. Test cases
are referenced in a hierarchically organized structure and can be supplemented with
activation commands comparison arguments, pass/fail evaluation criteria, and system
commands. When SMARTS is run on either a X Window or UNIX system, the ATS is
written in SMARTS' Description Language (which is similar to C language syntax). The
ATS file is written in SMARTS C-Interpreter Language when SMARTS is run on a MS

Windows system.
AUT. Application-under-test.

Automated Test Script. See ATS.

Automatic flow control. When CAPBAK/UNIX is being run in terminal emulation record
mode, a record of the manual flow control is stored in the keysave file and response
file.When CAPBAK/UNIX is transmitting keys in playback mode the flow control is

maintained by using the information saved in these files.


Automated Test Script. See ATS.

Automatic flow control. When CAPBAK/UNIX is being run in terminal emulation record
mode, a record of the manual flow control is stored in the keysave file and response
file.When CAPBAK/UNIX is transmitting keys in playback mode the flow control is
maintained by using the information saved in these files.

248

Back-to-back testing. For software subject to parallel implementation, back-to-back


testing is the execution of a test on the similar implementations and comparing the

results.
Basis paths. The set of non-iterative paths.
Black-Box testing. A test method where the tester views the program as a black box,
that is the test is completely unconcerned about the internal behavior and structure of the
program. Rather the tester is only interested in finding circumstances in which the
program does not behave according to its specifications. Test data are derived solely
from the specifications without taking advantage of knowledge of the internal structure of

the program. Black-box testing is performed with the STW/Regression suite of tools.
Bottom-up testing. Testing starts with lower level units. Driver units must be created for
units not yet completed, each time a new higher level unit is added to those already
tested. Again a set of units may be added to the software system at the time, and for
enhancements the software system may be complete before the bottom up tests starts.
The test plan must reflect the approach, though. The STW/Coverage suite of tools

supports this type of testing.


Built-in testing. Any hardware or software device which is part of an equipment,
subsystem of system and which is used for the purpose of testing that equipment,

subsystem or system.
Byte mask. A differencing mask used by EXDIFF that specifies to disregard differences
based on byte counts.

C. The programming language C. ANSI standard and K&R C are normally grouped as
one language. Certain extensions supported by popular C compilers are also included as

normal C.
C++. The C++ object oriented programming language. The current standard is ANSI C++

and/or AT&T C++. Both are supported by TCAT/C++.


C0 coverage. The percentage of the total number of statements in a module that are

exercised, divided by the total number of statements present in the module.


C1 coverage. The percentage of logical branches exercised in a test as compared with

the total number of logical branches known in a program.


Call graph. The function call tree capability of S-TCAT. This utility show caller-callee
relationship of a program. It helps the user to determine which function calls need to be

tested further.
Call pair. A connection between two functions in which one function "calls" (references)

the other function.


Coding rule. A rule that specifies a particular way in which a program is to be expressed.

Coding style. A general measure of the programming nature of a system; abstractly, the

way the programming language is used in a real system.


Combinational flow. Combinational flow is represented by a sequence of logical

branches with the property that no logical branch is repeated within the flow.
Command mode. This mode of execution of keysave files allows the user to program the
keysave file in order to do conditional execution based on system calls. The other mode

249

of execution is Data Mode. Command mode is supported by CAPBAK/X, and

CAPBAK/UNIX.
Complexity. A relative measurement of the ``degree of internal complexity'' of a software

system, expressed possibly in terms of some algorithmic complexity measure.


Complexity report. This METRIC report lists all a source code program's encountered
procedures and lists Software Science metrics (which are concerned with the "size" of
software) and Cyclomatic Complexity measures (which are concerned with the flow of

control within the program's code). This report is also referred to as a Full report.
Component. A part of a software system smaller than the entire system but larger than

an element.
Conditional playback. Certain STW components incorporate a language that provides
for logical operations to control behavior during test execution. E.g. a SMARTS test can
involve use of the if or while constructs, as can a CAPBAK script. See also Playback

programming.
Configuration file. A file used to declare start-up time parameter values. Usually suffixed

as *.rc.
Connected directed graph. A directed graph is connected if there is at least one path

from every entry node to every exit node.


Control statement. A statement that involves some predicate operation. For example:

an if statement or a while statement.


correctness proof. A mathematical process which demonstrates the consistency
between a set of assertions about a program and the properties of the program, when

executed in a known environment.


Coverage testing. Coverage testing is concerned with the degree to which test cases
exercise or cover the logic (source code) of the software module or unit. It is also a

measure of coverage of code lines, code branches and code branch combinations.
Cross-reference. An indication, for a selected symbol, of where instances of that symbol

lie in a software system.


Ct coverage. The percentage of independently executable sub-trees of the hierarchical
decomposition tree of a program that has been exercised, in terms of all of the possible

sub-trees that can be executed for that program.


Cumulative coverage. The test coverage attained by a set of several test runs.

Cumulative report. This TCAT or S-TCAT report charts branch and/or call-pair coverage

for the current test cumulatively, and for each module in the total system.
Cycle. A sequence of logical branches that forms a closed loop, so that at least one node

is repeated.
Cyclomatic number. A number which assesses program complexity according to a
program's flow of control. A program's flow of control is based on the number and
arrangement of decision statements within the code. The cyclomatic number of a flow
graph can be calculated as follows

250

Data Mode. In this mode of execution of keysave files, text is interpreted as saved
keystrokes to be played back along with timing information which is inclosed in brackets.

The Data mode is supported by CAPBAK/X and CAPBAK/UNIX.


DD-path. See Logical branch.
De-instrumentation. When certain parts of your code have already been tested, you can
use TCAT's and S-TCAT's de-instrumentations utilities to exclude those parts from

instrumentation. For large programs, this can save time.


Debug. After testing has identified a defect, one "debugs" the software by making certain

changes that repair the defect.


Decision node. A node in the program directed graph which corresponds to a decision

statement within the program.


Decision statement. A decision statement in a module is one in which an evaluation of
some predicate is made, which (potentially) affects the subsequent execution behavior of

the module.
Decision-to-decision path. See Logical branch.

Decisional depth. The number of decisions that must take on a particular value prior to

arriving at a specified logical branch. "The decisional depth for this logical branch is..."
Defect. Any difference between program specifications and actual program behavior of
any kind, whether critical or not. What is reported as causing any kind of software

problem.
Deficiency. See Defect.

Delay multiplier. The multiplier used to expand or contract playback rates.

Directed graph. A directed graph consists of a set of nodes which are interconnected
with oriented arcs. An arbitrary directed graph may have many entry nodes and many exit

nodes. A program directed graph has only one entry and one exit node.
Dynamic analysis. A process of systematically demonstrating properties of programs by
a series of constructed executions. The STW/Coverage suite of tools performs dynamic

analysis.
Dynamic call-tree display. An organic diagram showing modules and their call-pair
structure, where the call-pairs are "animated" based on behavior of the instrumented

program being tested.


Dynamic directed graph display. An organic diagram showing the connection between
logical branches in a program, where the logical branches are "animated" based on
behavior of the instrumented program being tested.

Edge. In a directed graph, the oriented connection between two nodes.

End-to-end testing. Test activity aimed at proving the correct implementation of a


required function at a level where the entire hardware/software chain involved in the

execution of the function is available.


Entry logical branch. An entry logical branch is one which has no predecessors, a

situation which can occur only at the entrance (i.e., invocation point) of a module.
Entry node. In a program directed graph, a node which has more than one out-way and
zero in-ways. An entry node has an in-degree of zero and a non-zero out-degree.

251

Environment Clause. A clause in the SMARTS ATS file that defines local environment

variables that can be used as variables in the activation and evaluation clauses.
Error. A difference between program behavior and specification that renders the program

results unacceptable. See Defect.


Essential edges. The set of paths that first include each edge which is on only one of the

original set of paths.


Essential logical branch. A logical branch of a program that exists on only one path.
Hence, execution of an essential logical branch is required to obtain complete segment

(branch) coverage.
Essential paths. The set of paths that include one essential edge, that is an edge that

lies on no other path.


Evaluation clause. A clause in the SMARTS' ATS file that specifies how to assess the

correctness of a test.
Event synchronization. The process by which a playback (e.g. from CAPBAK/X or

CAPBAK/MSW) is forced to wait until an menu opening is completed.


Exception report. A METRIC report which identifies source code procedures that

exceed a user-defined metric threshold.


EXDIFF. The extended differencing system, a component of STW/Regression. EXDIFF
compares two files and reports the difference between them, and it ignores difference

that lie within a user-defined masked area.


Executable statement. A statement in a module which is executable in the sense that it
produces object code instructions. A non-executable statement is not the opposite: it may

be a declaration. Only comments can be left out without affective program behaviour.
Execution verifier. A system to analyze the execution-time behavior of a test object in

terms of the level of testing coverage attained.


Exit logical branch. An exit logical branch is one for which there are no successor
logical branches. This occurs only when the consequence of the logical branch is an exit

from the module.


Exit node. In a directed graph, a node which has more than one in-way, but has zero

out-ways. An exit node has an out-degree of zero and a non-zero in-degree.


Exit structure. The exit structure of a program directed graph is the set of logical
branches which, if executed, lead unalterably to termination of program flow without

involving subsequent repetition of any logical branches.


Explicit predicate. A program predicate whose formula is displayed explicitly in the
program text. For example: a single conditional always involves an explicit program
predicate. A predicate is implicit when it is not visible in the source code of the program.
An example is a program exception, which can occur at any time.

Filter. A stage in a software process that attempts to identify defects so they can be

removed.
Filter Efficiency. The percentage of state-detectable defects vs. the actual average
number of defects detected. Typical filter efficiencies range from 10% (not often of much
practical use) to 90% (nothing is perfect)>

252

Flow control. When a terminal emulation program establishes communications with a


mainframe application, it establishes flow control to prevent characters being lost. In
some cases the mainframe application (or cluster controller) locks out the keyboard. This
prevents the user from typing ahead; however, when CAPBAK is being used to record
terminal sessions, the user is expected to wait for a response from the mainframe. The
user, thus, imposes manual flow control to prevent data from being lost in cases where
the keyboard is not locked. When CAPBAK is being run in terminal emulation mode, a
record of the manual flow control is stored in the keysave and response files. When
CAPBAK is transmitting keys in playback, flow control is maintained by using the

information saved in these files. See also Automatic flow control.


Flow graph. The oriented diagram, composed with nodes and edges with arrows, the

shows the flow of control in a program. Also called a flow chart or a directed graph.
Formal parameter. For an invocable element of program text, the set of variable names

which are assigned value or meaning outside of the program text.


Full report. A METRIC report which indicates a set of metrics for each of the modules in

a given source file. See also Complexity report.


Function call. A reference by one program to another through the use of an independent
procedure-call or functional-call method. Each function call is the ``tail'' of a caller-callee

call-pair.
Function Keys. During a recording session with CAPBAK/X or CAPBAK/MSW, you can
issue commands via function keys (i.e. your F1 to F10 keyboard function keys). During a
recording session, you can use the function keys to bring up the Hotkey window (see
Hotkeywindow), add comments to the keysave file, select an image or window for or the
entire screen, pause, resume or terminate the session. CAPBAK/X also has additional
function keys that allow you to synchronize on a character string or extract characters
froman image or the entire screen. During playback, function keys can be used to slow or
to quicken the speed of playback, to insert or to append new keysave records into a

keysave file, to pause, to resume or to terminate a playback session.


Functional specifications. A set of behavioral and performance requirements which, in

aggregate, determine the functional properties of a software system.


Functional test cases. A set of test case data sets for software which are derived from
structural test cases.

GUI (Graphical User Interface). A interface system, e.g. X11 or Windows '95 that
communicates between a user and an application.

Halstead metric. A measure of the complexity of computer software that is computed as

History report. A SMARTS summary report which indicates all test outcomes maintained

in the log file, providing an overview of test regression throughout the testing process.
Hit report. This report is used by TCAT and S-TCAT to identifies all of the logical
branches, call-pairs or paths which were exercised in the present and past tests. It
analyzes both the trace file and archive file.

253

Hotkey window. When recording a test session with CAPBAK/X or CAPBAK/MSW, this
window pops up when the hotkey function key is pressed (defaulted to F1). It allows you
to issue commands, including inserting comments into the keysave file, to save an image
or window for synchronization, to capture an image, a window, or the entire screen, to
resume, and to end a recording session.

Image synchronization. The process by which a playback (e.g. from CAPBAK/X and

CAPBAK/MSW) holds back execution until the image or window is redrawn or found.
In-degree. In a directed graph, the number of in-ways for a node.

Incompatible logical branch. Two segments in one program are said to be incompatible
if there is no logically feasible execution of the program which will permit both of them to

be executed in the same test. See also Essential logical branch.


Independent logical branch pair. A pair of logical branches is (sequentially)
independent when there are no assignment actions along the first branch. This changes

any of the variables used in the predicate of the second statement.


Infeasible path. A logical branch sequence is logically impossible if there is no collection
of setting of the input space relative to the first branch in the sequence, which permits the

sequence to execute.
Inspection/review. A process of systematically studying and inspecting programs in
order to identify certain types of errors, usually accomplished by human rather than

mechanical means.
Instrumentation. The first step in analyzing test coverage, is to instrument the source
code. Instrumentation modifies the source code so that special markers are positioned at
every logical branch or call-pair or path. Later, during program execution of the
instrumented source code, these markers will be tracked and counted to provide data for

coverage reports.
Integration Testing. Exposes faults during the process of integration of software
components or software units and it is specifically aimed at exposing faults in their
interactions. The integration approach could be either bottom-up (using drivers), topdown (using stubs) or a mixture of the two. The bottom up is the recommended

approach.
Interface. The informational boundary between two software systems, software system

components, elements, or modules.


Invocation point. The invocation point of a module is normally the first statement in the

module.
Invocation structure. The tree-like hierarchy that contains a link for invocation of one

module by another within a software system.


Iteration level. The level of iteration relative to the invocation of a module. A zero-level
iteration characterizes flows with no iteration. A one-level iteration characterizes program
flow which involves repetition of a zero-level flow.

254

Java. A programming language, not unlike C++, that is used to program applets that are
interpretively executed by Java applet viewers associated with several InterNet browsers.

Some say that Java := ((C++)--)++.


Junction node. A junction node within a program directed graph is a node, which has an
in-degree of two or greater, and an out-degree of exactly one.

Keysave file. A test script file automatically generated during the CAPBAK's recording
session. A keysave file contains a sequence of event statements (including keystrokes,
mouse movements and screen captures), which represent user input directed to the AU.
When a test is played back, the event statements in the keysave file are regenerated and

the AUT executes the previously recorded statements exactly as before.


Kiviat chart. A graphical depiction of the metric results from the METRIC Summary
report, where each metric is represented by an axis and results are plotted with reference
to user-definable upper and lower bounds. The Kiviat chart quickly identifies the metrics
to focus on for a particular program.

Length. Maurice Halstead defined the length of a program to be

Line mask. An EXDIFF statement that permits masking a line or group of lines.

Linear histogram. A dynamically updated linear-style histogram showing accumulating

C1 or S1 coverage for a selected module.


Log file. An established or default SMARTS file where all test information is

automatically accumulated.
Logical branch. The set of statements in a module which are executed as the result of
the evaluation of some predicate (conditional) within the module. The logical branch
should be thought of as including the outcome of a conditional operation and the
subsequent statement execution up to and including the computation of the value of the

next predicate, but not including its evaluation in determining program flow.
Logical units. A logical unit is a concept used for synchronization when differencing two
files with the EXDIFF system. A logical unit may be a line of text, a page of text, a
CAPBAK screen dump, or the keys (or responses) between marker records in a keysave

file.
Loop. A sequence of logical branches in a program that repeats at least one node. See

Cycle.
(M,N)-cycle. An M-entry, N-exit cycle in a flow graph. A program is perfectly structured
("pure-structured") if it is composed of loops that involve only (1,1)-cycles. Most realworld programs contain many multi-exit cycles, however. Some studies show that over
99% of programs are non-pure-structured.

Make file. Most often, TCAT and S-TCAT will be used to develop test suites for systems
that are created with make files. make files cut the time of constructing systems, by
automating the various steps necessary to build systems, including preprocessing,
instrumenting, compiling and linking. All these steps can be written in a make file.

255

makeats. A SMARTS utility which, based on minimal information, generates the initial
hierarchical test structure for an ATS file, as well as basic source, activation, and

evaluation clauses.
Manual analysis. The process of analyzing a program for conformance to in-house rules
of style, format, and content as well as for correctly producing the anticipated output and
results. This process is sometimes called code inspection, structured review, o formal

inspection.
METRIC. The software metrics processor/generator component of STW/Advisor.
METRIC computes several software measures to help you determine the complexity

properties of your software.


Module. A module is a separately invocable element of a software system. Similar terms

are procedure, function, or program.


Multi-unit test. A multi-unit test consists of a unit test of a single module in the presence
of other modules. It includes: (1) a collection of settings for the input space of the module
and all the other modules invoked by it and (2) precisely one invocation of the module
under test.

Node. (1) A position in a program assigned to represent a particular state in the

execution space of that program. (2) Group or test case in a test tree.
Node number. A unique node number assigned at various critical places within each

module. The node number is used to describe potential and/or actual program flow.
Non-executable statement. A declaration or directive within a module which does not

produce (during compilation) object code instructions directly.


Not hit report. A TCAT or S-TCAT report giving the names of logical branches or callpairs "not hit" yet by any test.

OCR. Optical Character Recognition by Xerox Imaging Systems (XIS) provides general

character recognition capabilities for CAPBAK/X.


Out-degree. In a directed graph, the number of out-ways of a node.

Output synchronization. The process by which a playback (e.g. from CAPBAK/X or

CAPBAK/MSW) is forced to wait until an expected window opening is completed.


Outway. In a directed graph, an arc (edge) leaving a node.
Out-degree. In a directed graph, the number of out-ways of a node.

Path, path class. An ordered sequence of logical branches representing one or more

categories of program flow.


Path predicate. The predicate that describes the legal condition under which a particular

sequence of logical branches will be executed.


Past test report. This report lists information from the stored archive file for TCAT and STCAT. It summarizes the percentage of logical branches/call-pairs hit in each module

listed, giving the C1/S1 value for each module and the program as a whole.
Playback counter. The time interval between two keystrokes recorded or played back by
CAPBAK.

256

Playback delay. Minimum interval between keystrokes at playback time with CAPBAK.

Playback mode. The CAPBAK/X or CAPBAK/MSW playback mode that validates

execution and generates or updates a test's expected results.


Playback programming. A technique in which playback behavior is controlled by the
use of various system calls placed in the keysave file. Playback programming provides
an easy way for a user to playback a keysave file as a script that modifies the behavior

conditionally on the basis of system and environmental factors.


Predecessor logical branches. One of many logical branches that precede a specified

logical branch in normal (structurally implied) program flow.


Predicate. A logical formula involving variables/constants known to a module.

Predicted length. Maurice Halstead theorizes that a well-written program with n1 unique

operators and n2 unique operands should have a length of


Preview. A CAPBAK/X utility which simulates keysave file activity for you. The simulation
shows the recording session's mouse movements, button and keyboard activities, and

captured images.
Process. The sequence of steps that are performed in developing a software product,
system, upgrade, etc. Software processes involve multiple stages, multiple types of

activities, many of which may be concurrent.


Program. See Module.

Program directed graph. See Directed graph.

Program predicate. See Predicate.

Pseudo code. A form of software design in which programming actions are described in
a program-like structure; not necessarily executable but generally held to be humanly

readable.
Purity ratio. Maurice Halstead suggested that programs which are not the same length
as predicted by N^ (see Predicted length) are victims of impurities. The purity ratio is the
ratio of N^ to N (predicted length/length). This measurement is used by METRIC o
determine error-prone parts of code.

Qualification. The process that assures that a given software component at the end of
its development is compliant with the requirements. The qualification shall be performed
at appropriate and defined software components and sub software systems, before
integrating the software to the next higher level. The techniques for qualification is

testing, inspection and reviewing.


Quick Check mode. The CAPBAK/X and CAPBAK/MSW playback mode that replays a
test in order to generate a new set of AUT responses. The new responses, the actual
results, are compared with earlier results, that is the expected results of the test. This
mode verifies an application's behavior by automatically comparing any currently
captured actual images, windows or ASCII characters with the image, window or

characters that were captured and stored as the expected results.


record. This CAPBAK/UNIX command is a program that records keystrokes being
entered at a terminal and saves them in a keysave file format. It records and displays the

257

responses from the remote machine, and saves them in a baseline file which can be
used to synchronize playback.

Reference listing report. A report produced by TCAT and S-TCAT which shows the

coverage level achieved for all modules that are named in the specified reference listing.
Regression report. A SMARTS report which lists only the most recently executed test
cases whose outcomes have changed from the previous executions. The Regression
report helps to identify bugs which have been fixed or introduced since the last time the

test were executed.


Regression Testing. Testing which is performed after making a functional improvement
or repair of the software. Its purpose is to determine if the change has regressed other
aspects of the software. As a general principle, software unit tests are fully repeated if a
module is modified, and additional tests which expose the fault removed, are added to

the test set. The software unit will then be re-integrated and integration testing repeated.
Resource file. For X Windows applications only, a file that contains a set of pre-

determined values for parameters.


Response file. A text or image file that can be compared against the baseline file.

Return variable. A return variable is an actual or formal parameter for a module, which is
modified within the module.

S0 coverage. The percentage of modules that are invoked at least once during a test or

during a set of tests.


S1 coverage. The percentage of call-pairs exercised in a test as compared with the total
number of call-pairs known in a program. This metric is calculated by S-TCAT. By
definition the S1 value for a module which has no call pairs is 100% if the module has

een called at least once, and 0% otherwise.


S-TCAT. The System Test Coverage Analysis Tool of the STW/Coverage tool group. STCAT measures the structural completeness of a test suite by reporting on the

percentage of function call-pairs exercised.


scover. An S-TCAT utility used to assess the value of S1 coverage.

Segment. A [logical branch] segment or decision-to-decision path is the set of


statements in a module which are executed as the result of the evaluation of some
predicate (conditional) within the module. The segment should be thought of as including
the outcome of a conditional operation and the subsequent statement execution up to
and including the computation of the value of the next predicate, but not including its

evaluation in determining program flow.


Segment instrumentation. The process of producing an altered version of a module
which is logically equivalent to the unmodified module but which contains calls to a
special data collection subroutine which accepts information as to the specific logical

branch sequence incurred in an invocation of the module.


Software sub-system. A part of a software system, but one which includes many
modules. Intermediate between module and system.

258

Software system. A collection of modules, possibly organized into components and

subsystems, which solves some problem or performs some task.


Source clause. A clause in the ATS file that contains comments which may give some
explanation to the origin of the test(s) invoked in each particular case. Most commonly
the source clause is used to specify the purpose of a test. The comments in a source
cause are displayed by SMARTS when a test case activation is evaluated as a test

failure: This allows you to note which files need to be inspected.


Spaghetti code. A program whose control structure is so entangled by a surfeit of

GOTO's that is flow graph resembles a bowl of spaghetti.


Statement complexity. A complexity value assigned to each statement which is based
on (1) the statement type, and (2) the total length of postfix representations of
expressions within the statement (if any). The statement complexity values are intended

to represent an approximation to potential execution time.


Static analysis. The process of analyzing a program without executing it. This may

involve wide range of analyses. The STW/Advisor suite of tools performs static analyses.
Static frequency. Forced constant CAPBAK playback rate.

Status report. This SMARTS' report presents the most recent information about
executed tests. It contains: test case name, outcome (pass/fail), activation date,

execution time (seconds), and error number.


Sub-test. A part of a test that occurs between passing control to the test object and the

return of control to the test environment.


Successor logical branch. One or more logical branches that (structurally) follow a

given logical branch.


Summary report. A METRIC report indicates the accumulated complexity measures for

the entire AUT.


Synchronization. During playback of a test script, e.g. with CAPBAK/X, there are
several ways that the playback process can behave to avoid loss of synchronization,

among them "output synchronization" and "image synchronization".


System Testing. Verifies that the total software system satisfies all of its functional,
quality attribute and operational requirements in simulated or real hardware environment.
It primarily demonstrates that the software system does fulfill requirements specified in
the requirements specification during exposure to the anticipated environmental
conditions. All testing objectives relevant to specific requirements should be included
during the software system testing. Software system testing is mainly based on black-box
methods. The STW/Coverage suite of tools supports this type of testing.

TCAT. The Test Coverage Analysis Tool of the STW/Coverage tool group. TCAT
measures the thoroughness of your test case coverage by reporting on the percentage of

logical branches exercised.


TDGEN. The Test Data Generator System which is a component of the TestWorks
product line. TDGEN produces test data files in a user-designed format by replacing
variable fields in a template file with random or sequential data values from a values file.

259

Template file. A user-designed TDGEN file which indicates where selected values are to
placed within an existing test file. A template file provides a format for the generation of

additional test.
Termination clause. A SMARTS clause that is executed when a special termination

command fails to complete normally.


Test. A [unit] test of a single module consists of (1) a collection of settings for the inputs
of the module, and (2) exactly one invocation of the module. A unit test may or may not

include the effect of other modules which are invoked by the undergoing teting.
Test Bed. See Test Harness.

Test coverage measure. A measure of the testing coverage achieved as the result of
one unit test usually expressed as a percentage of the number logical branches within a

module traversed in the test.


Test data set. A specific set of values for variables in the communication space of a

module which are used in a test.


Test harness. A tool that supports automated testing of a module or small group of

modules.
Test object, object under test. The central object on which testing attention is focused.

Test path. A test path is a specific (sequence) set of logical branches which is traversed
as the result of a unit test operation on a set of test case data. A module can have many

test paths.
Test purpose. The free-text description indicating the objective of a test, which is usually

specified in the source clause of a SMARTS ATS file.


Test stub. A testing stub is a module which simulates the operations of a module which
is invoked within a test. The testing stub can replace the real module for testing

purposes.
Test target. The current module (system testing) or the current logical branch (unit

testing) upon which testing effort is focused.


Test target selector. A function which identifies a recommended next testing target.

Testability. A design characteristic which allows the status (operable, inoperable, or


degrade) of a system of any of its sub-system to be confidently determined in a timely
fashion. Testability attempts to qualify those attributes of system designs which facilitate
detection and isolation of faults that affect system performance. Testability can be
defined as the characteristic of a design which allows the status of a system of any of its

subsystems to be confidently determined in a timely fashion.


Testing. Testing is the execution of a system in a real or simulated environment with the

intent of finding faults.


Testing Techniques. Can be used in order to obtain a structured and efficient testing

which covers the testing objectives during the different phases in the software life cycle.
Top-Down Testing. The testing starts with the main program. The main program
becomes the test harness and the subordinated units are added as they are completed
and testing continues. Stubs must be created for units not yet completed. This type of
testing results in retesting of higher level units when more lower level units are added.
The adding of new units one by one should not be taken too literary. Sometimes a

260

collection of units will be included simultaneously, and the whole set of units will serve as
test harness for each unit test. Each unit is tested according to a unit test plan, with a top

down strategy.
Trace file. A file containing the most recent test run of trace coverage information for

STW/Coverage's TCAT tool.


True time recording. The capability of CAPBAK to record complete timing information
about the CAPBAK session in such a way that it can be played back at identically the
same rate it was recorded. feasible path" A sequence of logical branches is logically
possible if there is a setting for the input space relative to the first logical branch in the
sequence, which permits the sequence to execute.

Unconstrained paths. The set of edges that will imply execution of other edges in the

program.
Unit test. See Test.

Unit Testing. Unit testing is meant to expose faults on each software unit as soon as this
is available regardless of its interaction with other units. The unit is exercised against its
detailed design and by ensuring that a defined logic coverage is performed. Informal tests
on module level which will be done by the software development team and are informal
tests which are necessary to check that the coded software modules reflect the
requirements and design for that module. White-box oriented testing in combination with

at least one black box method are used.


Unreachability. A statement (or logical branch) is unreachable if there is no logically
obtainable set of input-space settings which can cause the statement (or logical branch)
to be traversed.

Validation. The process of evaluation software at the end of the software development
process to ensure compliance with software requirements. The techniques for validation

is testing, inspection and reviewing.


Values file. A user-designed TDGEN file which indicates the actual test values, test

value ranges or test value generation rules for the creation of additional test files.
Verification. The process of determining whether of not the products of a given phase of
the software development cycle meet the implementation steps and can be traced to the
incoming objectives established during the previous phase. The techniques for

verification are testing, inspection and reviewing.


Vertex. See Node.

White-box testing. A test method where the tester views the internal behavior and
structure of the program. The testing strategy permits one to examine the internal
structure of the program. In using this strategy, the tester derives test data from an
examination of the program's logic without neglecting the requirements in the
specification. The goal of this test method is to achieve a high test coverage, that is
examination of as much of the statements, branches, paths as possible.

261

X11 Virtual Display. Simulates multiple-user sessions from the same machine for the
purposes of lad generation, performance assessment, and multiple-test execution.

262