Documente Academic
Documente Profesional
Documente Cultură
JAGAN MOHAN J
INDEX
1. CORE JAVA 3
2. JSP 20
3. SERVLETS 30
4. EJB 33
5. JMS 39
6. SQL 45
7. COMMON TESTING 48
9. WINRUNNER 75
16. UNANSWERED QUESTIONS (TESTING, TOOLS, JAVA, C++, ABAP etc) 218
2
CORE JAVA INTERVIEW QUESTIONS
3
Q: Difference between Vector and ArrayList?
A: Vector is synchronized whereas arraylist is not.
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.
4
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 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 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 do not provide the String array as the argument to the method?
A: Program compiles but throws a runtime error "NoSuchMethodError".
5
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: 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.
6
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.
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?
7
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.
8
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 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.
9
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.
10
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: 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.
11
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: 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: 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
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 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.
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: 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.
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)
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.
17
A: The java.util.EventObject class is the highest-level class in the event-delegation class
hierarchy.
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 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.
19
JSP INTERVIEW QUESTIONS
Example 1
<!-- This is a commnet sent to client on
<%= (new java.util.Date()).toLocaleString() %>
-->
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.
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.
21
• pageContext
• session
• application
• out
• config
• page
• exception
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 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 thread-
safe the old fashioned way: by making them thread-safe .
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)% >" >
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 a session ID with a 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 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 thread-
safe the old fashioned way: by making them thread-safe .
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)% >" >
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 a session ID with a 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
The servlet is removed from service, destroyed with the destroy() methid, then garbaged
collected and finalized.
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.
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
33
A: The transaction attribute specifies how the Container must manage transactions for a
method when a client invokes the method via the enterprise bean’s home or...........
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: 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 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-by-
value 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 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.
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: 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.
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 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.
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.
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: 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 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: 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
45
SELECT COUNT(*) FROM emp WHERE age>40
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), Doesn’t perform automatic commit
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.
47
TESTING COMMON INTERVIEW QUESTIONS
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,
9. How do you know when you have enough test cases to adequately test a software
system or module?
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
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.
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
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
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
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.
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 provide.
51
Integration testing is the testing of integration of different modules of the system. Usually, the
integration
42. When does testing begin - requirements, plan, design, code / testing phase?
Obviously Testing will begins in requirement phase.
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.
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
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 down-top
allows to discover malfunctioning at earlier phases of development and cheaper to fix than in the
case of top-down.
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
57. What was the most difficult problem you ever found while testing?
This is homework. Think about one and give it as an example.
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!
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.
OR
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 that’s 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, it’s beneficial for yourself. Your client will be happy if your system works without any
problem and will generate more revenues for you.
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.
It’s 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.)
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.
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.
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
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.
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.
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.
• 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
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.
• 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.
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 problem-
tracking/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
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.
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.
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:
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?
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.
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.
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.
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.
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.
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
68
Reject, Reject, Deferred, and Closed.
(Please note that there are various ways to communicate the bug to the developer and track the
bug status)
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.
69
Reopen:
If after retesting the software for the bug opened, if the system behaves in the same way or same
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 doesn’t have too many defects. How will you
make sure that this is correct?
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?
What are the various status reports you will generate to Developers and Senior Management?
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?
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?
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
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?
Equivalence testing
Error Guessing
Test Plan
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. It’s 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?
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 don’t 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
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
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
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
17. without using the datadriven test, how can we test the application with different set of
inputs?
no
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"
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
77
checkpoint and if there is a pixel difference between the images it shows the image where the
difference in images
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
36. What are the test case that we go for automate?What is the process that we go while
we are going before
78
recording or programming) that checks the window WinRunner, Mercury Interactive and the
Mercury Interactive
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.
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)
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
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
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
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
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.
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
86. Have you created test scripts and what is contained in the test scripts?
It contains the statement in Mercury Interactive’s 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
84
expected data captured earlier. If any mismatches are found, WinRunner captures them as actual
results.
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
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.
85
96. What do you mean by the logical name of the object.
An object’s 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
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.
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
may be much high. If there is any change in the object being learned then WinRunner will not be
86
able to recognize the object, as it is not in the GUI Map file loaded in the memory. So we will have
to learn
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.
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.
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
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
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.
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
90
objects.ii. Analog recording records keyboard input, mouse clicks, and the precise x- and y-
coordinates traveled by the mouse
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
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
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
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, case-
sensitive
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
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
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]);
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
98
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
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
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
99
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
the reload function is: reload ( module_name [ ,1|0 ] [ ,1|0 ] ); The module_name is the name of
an existing compiled
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
198. During debugging how do you monitor the value of the variables?
100
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
information about the defect directly from the Test Results window.
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 Interactive’s 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 WinRunner’s visual programming tool, the Function Generator.
101
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
results.
102
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.
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.
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.
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.
103
the focus to the required window before executing tests on a particular window.
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.
104
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.
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.
105
ii. The regexp_MSW_class property inserts a regular expression into an object’s MSW_class. It is
obligatory for all types of windows and for the object class object.
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.
106
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.
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
107
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.
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.
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,
108
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.
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 object’s 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
109
suggests using this text for the logical name. Otherwise, WinRunner suggests virtual_object,
virtual_push_button, virtual_list, etc.
v. You can accept the wizard’s 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.
Click Next.
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.
110
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.
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
111
Syntax: button_check_info (button, property, property_value );
edit_check_info ( edit, property, property_value );
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 test’s expected results folder. The WinRunner window is restored and a GUI
checkpoint is inserted in the test script as an obj_check_gui statement
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.
112
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.
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 test’s 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.
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
113
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
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.
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,
114
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.
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.
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);
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
115
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).
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:
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
116
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
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
117
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
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?
118
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.
119
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.
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:
The parameter_array argument will contain the values to substitute for the parameters in the
parameterized checkpoint.
120
b) db_execute_query
i. to execute a query
db_execute_query ( session_name, SQL, record_number );
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.
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.
e) db_get_row
i. returns the content of the row, concatenated and delimited by tabs.
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.
h) db_disconnect
i. disconnects from the database and ends the database session.
db_disconnect ( session_name );
121
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.
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.
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.
122
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.
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.
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, case-
sensitive 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.
123
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.
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 four-
element 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.
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).
124
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
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.
chars2 One or more characters in the second string. These characters are substituted for those in
chars1.
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.
125
the test script and reopen the DataDriver Wizard. If you want to turn the entire test into a data-
driven test, click Next.
iv. The Use a new or existing Excel table box displays the name of the Excel file that WinRunner
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
126
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.
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.
127
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.
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);
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).
128
f) Ddt_get_row_count
i. Retrieves the no. of rows in a data tables
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.
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.
129
value The value to be written into the table.
j) ddt_set_val_by_row
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.
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.
130
m) ddt_get_parameters
i. Returns a list of all parameters in a data table.
Syntax: ddt_get_parameters ( table, params_list, params_num );
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.
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.
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
131
row in the file contains the names of the parameters. This row is labeled row 0.
q) ddt_update_from_db
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.
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.
132
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.
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.
133
'app_init' script:
call cso_init();
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:
while ( expression )
statement ;
i. While expression is true, the statement is executed. The loop ends when the expression is
134
false. For example, the while statement below performs the same function as the for loop above.
set_window ('Open');
i=0;
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.
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.
135
if ( expression )
statement1;
[ else
statement2; ]
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.
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
136
executed. The default statements are optional.
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]);
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.
137
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
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:
138
[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) Parameters need not be explicitly declared. They can be of mode in, out, or inout. For all non-
array parameters, the default mode is in. For array parameters, the default is inout. The
significance of each of these parameter types is as follows:
139
Syntax: return [( expression )];
114) What does auto, static, public and extern variables means?
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.
140
load (module_name [,1|0] [,1|0] );
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' ] ] );
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()?
141
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 + < >.
142
LOAD RUNNER
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
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?
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
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?
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.
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
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.
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. 4-
running the scenario. 5-analysis the test result.
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.
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.
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.
148
57. what is action section .
Record the client activity .
62. what is the load runner end transaction and its syntax.
It will end the transaction. Syntax. Lr-end-transaction("transaction name", LR-AUTO).
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).
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).
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).
75. when the load runner controller open the win runner file then what is the location of
the winner configuration
Wrun.ini.
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.
84. why we insert the rendezvous point while running the scenario.
If a multiple vuser to perform a tasks at exactly the same time.
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) .
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).
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.
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.
- 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.
- 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.
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 goal-oriented
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.
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.
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.
- 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.
- The components of LoadRunner are The Virtual User Generator, Controller, and the Agent
process, LoadRunner Analysis and Monitoring, LoadRunner Books Online.
- 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.
- 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.
- 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.
- 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.
- 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
156
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.
13. What is a function to capture dynamic values in the web Vuser script?
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.
- 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
157
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?
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.
- 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.
- 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.
- This option is used to gradually increase the amount of Vusers/load on the server. An initial
value is set and a value to wait between intervals can be
specified. To set Ramp Up, go to ‘Scenario Scheduling Options’
- 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
158
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?
- 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 Run-
Time Settings.
- 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.
- 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.
159
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.
- 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.
- 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
- 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.
160
- Vuser_init action contains procedures to login to a server.
- 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.
- 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.
161
38. Types of Goals in Goal-Oriented Scenario
- Load Runner provides you with five different types of goals in a goal oriented scenario:
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.
- 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.
162
47. What is a function to capture dynamic values in the web vuser script?
163
BUG TRACKING INTERVIEW QUESTIONS
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.....
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)
164
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
165
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?
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.
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 insert-
Copy of Action...
166
9. what is meant by SOURCE CONTROL ?
It is used to hold all the bulids of diff versions
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./../
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
167
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.
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
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.
168
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
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
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
169
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"
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.
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
170
46. How to handle dynamic objects in QTP?
Using GETRO Property we will handle the runtime objects.
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?
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 Table—a
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.
171
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
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.
172
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.
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
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.
173
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
174
DATABASE TESTING
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?
175
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?
176
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
177
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
178
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
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 ())
179
// 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.
180
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.
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:
181
· 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
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.
182
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 file’s 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.
183
To measure your QA department’s 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 .
Each testcase that you record should have the following stages:
184
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.
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.
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.
185
fails or crashes, either during a testcase’s execution or between testcases.
DefaultBaseState
To restore the application to the base state, the recovery system contains a routine called
If these conditions are not sufficient for your application, you can customize the recovery
system.
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.
186
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.
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.
187
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.
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.
188
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.
189
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 application’s 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
190
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.
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.
191
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.
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.
192
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.
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.
193
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.
194
as the script. (You do not have to delete your results files.) Restart SilkTest and run your script
again.
195
Application lists all open applications that are not minimized, including any Web applications,
which are identified by the currently loaded page’s 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.
196
· 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).
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.
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.
197
There are several areas where DOM and VO work differently:
• DOM uses the name attribute for input elements as the object’s 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>
You might expect this to be recorded as one object, but SilkTest records this as two.
198
• for images, the DOM extension records both an HtmlImage and an HtmlLink
• 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.
• 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.
Explain the Difference between Basic and Data Driven work flow bars
Workflows menu
199
(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.
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.
func-name An identifier that specifies the name of the function.
dll-fname Optional. A string that specifies the name of the
200
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:
201
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.
A few special rules apply for declaring arguments that can be passed by reference by the
DLL function:
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
202
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.
Example
dll "toolhelp.dll"
BOOL MemManInfo (out MEMMANINFO MemManInfo)
dll "mydll.dll"
my_exit () alias "exit"
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.
Example
203
winclass MyWin : AnyWin
WhatAmI ()
Print ("I am a MyWin")
GetInfo ()
WhatAmI ()
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:
GetInfo ()
WhatAmI ()
204
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.
205
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 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 identifiers
• record class
Before you can use SilkTest to test Infragistics Windows Forms controls, you must:
For specific versions of these applications and other installation requirements, see the
release notes.
206
• 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.
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
207
Class
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.
208
sDesc Optional. A message describing the comparision string
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
• 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.
209
How to set the options for XML recognition
Setting options for XML recognition
2 Select the DOM extension for either Internet Explorer 5.x or Netscape 6.
3 In the Options area, click Extension (the button is disabled until you have
selected a DOM extension).
4 On the DOM Extension dialog, check the XML checkbox and click OK.
To turn off XML recognition simply uncheck the checkbox you checked in step 4 above.
210
6 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 you’ve just recorded.
7 Click OK to close the Record Method dialog and place the new BaseState
method in the declaration for your main window.
Note Segue cannot provide support for modifying defaults.inc or the results.
We don’t recommend that you modify defaults.inc, but if you decide you need to modify it,
be sure that you:
• Tell Segue Technical Support when reporting problems that you have modified
the default recovery system.
211
HR Questions (Most commonly asked Interview Questions)
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.
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.
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.
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.
212
8. Please give me your definition of a.... (the position for which you are being interviewed).
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.
Warm-Up Questions
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?
213
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
214
SELF-ASSESSMENT
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
RANGE OF INTERESTS
215
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
WORK STANDARDS
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?
216
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?
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?
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. Describe your most significant success & failure in the last two years.
2. What do you like to do best?
217
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?
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?
218
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?
219
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?
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
TEST DIRECTOR
220
6. How will you integrated your automated scripts from TestDirector?
7. What is the use of Test Director software?
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
221
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?
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
222
QA TESTING
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.
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
223
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?
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
QTP
224
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
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
225
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
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
226
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?
5. What we normally check for in the Database Testing?
6. How to Test database Manually? Explain with an example
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?
227
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?
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
228
1. Can you display the index?
2. At what stage db2 must be up?
3. When do you use subroutines?
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?
229
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.
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..?
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?
230
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?
231
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?
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 web-
servers (using round-robin load balancing) what would be the best approach to maintain
login-in state for the users?
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.
(*)
232
5)What are the implicit objects in JSP & differences between them. (*)
Servlets:
1)What are Servlets.
2)What are the advantages of Servlet.
3)What is the Life cycle of Servlet. (*)
4)What is the difference between Servlet and JSP. (*)
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.
233
DATABASE QUESTIONS
234
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?
235
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?
236
C C PLUS PLUS INTERVIEW QUESTIONS
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?
237
10.What is a cursor? Within a cursor, how would you update fields on the row just
fetched?
238
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?
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?
239
Web tester interview questions
Test Automation:
240
21. What skills needed to be a good test automator?
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.
15. Describe to me the Software Development Life Cycle as you would define it.
241
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?
44. How do you go about testing a web application?
242
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.
78. How do you feel about cyclomatic complexity?
243
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?
Software Quality Assurance
244
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?
245
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 youÂ’ve handled.
Here are some questions you might be asked on a job interview for a testing opening:
246
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
247
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.
248
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.
249
• 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
of execution is Data Mode. Command mode is supported by CAPBAK/X, and
CAPBAK/UNIX.
250
• 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
• 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.
251
• 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.
252
• 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)>
• 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
253
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.
254
• 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), top-
down (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.
• 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.
255
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.
• 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.
• 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.
256
• 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 call-
pairs "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 S-
TCAT. 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.
• 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.
257
• 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
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
258
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. S-
TCAT 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.
• 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
259
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.
• 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.
260
• 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
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.
261
• 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.
• X11 Virtual Display. Simulates multiple-user sessions from the same machine for the
purposes of lad generation, performance assessment, and multiple-test execution.
262