45,000 Jobs - Get an Interview Call,  Post Your Resume Here
SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




interview Q&A asked in winrunner

        

Reply
 
LinkBack Thread Tools Display Modes
Old 25-03-06, 06:51 AM   #61 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


97) What is a compile module?[/b]


a. A compiled module is a script containing a
library of user-defined functions that you want to call frequently from other
tests. When you load a compiled module, its functions are automatically
compiled and remain in memory. You can call them directly from within any test.


b. Compiled modules can improve the
organization and performance of your tests. Since you debug compiled modules
before using them, your tests will require less error-checking. In addition,
calling a function that is already compiled is significantly faster than
interpreting a function in a test script.


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 25-03-06, 06:52 AM   #62 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


98) What is the difference between script and compile module?[/b]


a. Test script contains the executable file
in WinRunner while Compiled Module is used to store reusable functions.
Complied modules are not executable.


b. WinRunner performs a pre-compilation
automatically when it saves a module assigned a property value of “Compiled
Module”.


c. By default, modules containing TSL code have
a property value of "main". Main modules are called for execution
from within other modules. Main modules are dynamically compiled into machine
code only when WinRunner recognizes a "call" statement. Example of a
call for the "app_init" script:





call cso_init();


call(
"C:\\MyAppFolder\\" & "app_init" );


d. Compiled
modules are loaded into memory to be referenced from TSL code in any module.
Example of a load statement:





reload
(“C:\\MyAppFolder\\" & "flt_lib");


or


load ("C:\\MyAppFolder\\" &
"flt_lib");





Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 25-03-06, 06:53 AM   #63 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


99) Write and explain various loop command?[/b]


a. A for loop instructs WinRunner to execute one
or more statements a specified number of times.





It has the following syntax:[/b]


[/i]


for ( [ expression1 ]; [ expression2 ]; [ expression3 ] )[/i]


statement[/i]





i. First, expression1 is executed. Next,
expression2 is evaluated. If expression2 is true, statement is executed and
expression3 is executed. The cycle is repeated as long as expression2 remains
true. If expression2 is false, the for statement terminates and execution
passes to the first statement immediately following.


ii. For example, the for loop below selects the
file UI_TEST from the File Name list


iii. in the Open window. It selects this file five
times and then stops.


set_window
("Open")


for (i=0;
i<5; i++)


list_select_item("File_Name:_1","UI_TEST");
#Item Number2


b. A while loop executes a block of statements
for as long as a specified condition is true.





It has the
following syntax:





while ( expression )[/i]


statement ;[/i]


[/i]


i. While expression is true, the
statement is executed. The loop ends when the expression is false. For example,
the while statement below performs the same function as the for loop above.


set_window
("Open");


i=0;


while (i<5)


{


i++;


list_select_item ("File
Name:_1", "UI_TEST"); # Item Number 2


}





c. A do/while loop executes a block of
statements for as long as a specified condition is true. Unlike the for loop
and while loop, a do/while loop tests the conditions at the end of the loop,
not at the beginning.





A do/while loop
has the following syntax:


do[/i]


statement[/i]


while (expression);[/i]


[/i]


i. The statement is executed and then the
expression is evaluated. If the expression is true, then the cycle is repeated.
If the expression is false, the cycle is not repeated.


ii. For example, the do/while statement
below opens and closes the Order dialog box of Flight Reservation five times.





set_window
("Flight Reservation");


i=0;


do


{


menu_select_item
("File;Open Order...");


set_window
("Open Order");


button_press
("Cancel");


i++;


}


while (i<5);


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 25-03-06, 06:54 AM   #64 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


100) Write and explain decision making command?[/b]


a. You can incorporate
decision-making into your test scripts using if/else or switch statements.


i. An if/else statement executes
a statement if a condition is true; otherwise, it executes another statement.


It has the following
syntax:


if ( expression )


statement1;


[ else


statement2; ]





expression is evaluated. If
expression is true, statement1 is executed. If expression1 is false, statement2
is executed.





b. A switch statement enables
WinRunner to make a decision based on an expression that can have more than two
values.





It has the following syntax:


switch (expression )


{


case case_1: statements


case case_2: statements


case case_n: statements


default: statement(s)


}





The switch statement consecutively evaluates each case expression
until one is found that equals the initial expression. If no case is equal to
the expression, then the default statements are executed. The default
statements are optional.


[/b]


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 26-03-06, 12:02 AM   #65 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


101) Write and explain switch command?[/b]


a. A switch statement enables WinRunner to make a decision based
on an expression that can have more than two values.





It has the following syntax:


switch (expression )


{


case case_1: statements


case case_2: statements


case case_n: statements


default: statement(s)


}





b. The switch statement
consecutively evaluates each case expression until one is found that equals the
initial expression. If no case is equal to the expression, then the default
statements are executed. The default statements are optional.


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 26-03-06, 12:03 AM   #66 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


102) How do you write messages to the report?[/b]


a. To write message to a report
we use the report_msg statement


Syntax[/b]:
report_msg (message);[/i]


[/b]


103) What is a command to invoke application?[/b]


a. Invoke_application is the function
used to invoke an application.


Syntax: [/b]invoke_application(file, command_option, working_dir, SHOW);[/i]


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 26-03-06, 12:04 AM   #67 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


104) What is the purpose of tl_step command?[/b]


a. Used to determine whether
sections of a test pass or fail.


Syntax:[/b] tl_step(step_name, status,
description);[/i]





105) Which TSL function you will use to compare two files?[/b]


a. We can compare 2 files in
WinRunner using the file_compare function.


Syntax[/b]:
file_compare (file1, file2 [, save
file]);[/i]


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 26-03-06, 12:05 AM   #68 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


106) What is the use of function generator?[/b]


a. The Function Generator
provides a quick, error-free way to program scripts. You can:


i. Add Context Sensitive functions
that perform operations on a GUI object or get information from the application
being tested.


ii. Add Standard and Analog
functions that perform non-Context Sensitive tasks such as synchronizing test
execution or sending user-defined messages to a report.


iii. Add Customization functions
that enable you to modify WinRunner to suit your testing environment.


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 26-03-06, 12:06 AM   #69 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


107) What is the use of putting call and call_close statements in the
test script?[/b]


a. You can use two types of
call statements to invoke one test from another:


i. A call statement invokes a test
from within another test.


ii. A call_close statement invokes
a test from within a script and closes the test when the test is completed.





iii. The call statement has the
following syntax:


1. call test_name ( [ parameter1,
parameter2, ...parametern ] );


iv. The call_close statement has
the following syntax:


1. call_close test_name ( [
parameter1, parameter2, ... parametern ] );


v. The test_name is the name of
the test to invoke. The parameters are the parameters defined for the called
test.


vi. The parameters are optional.
However, when one test calls another, the call statement should 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.


[/b]


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 26-03-06, 12:17 AM   #70 (permalink)
Senior Member
 
ajithcharles's Avatar
 
Join Date: Mar 2006
Age: 25
Posts: 343
Thanks: 3
Thanked 15 Times in 14 Posts
Rep Power: 9 ajithcharles has a spectacular aura about ajithcharles has a spectacular aura about ajithcharles has a spectacular aura about
Good Work Spoorthi ..[img]smileys/smiley32.gif[/img] Gr8 collection .. keep it going...[img]smileys/smiley32.gif[/img]
ajithcharles is offline Offline   Reply With Quote
Old 26-03-06, 12:25 AM   #71 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


108) What is the use of treturn and texit statements in the test
script?[/b]


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[/b]


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[/b]


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 )];


[/b]


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 26-03-06, 12:27 AM   #72 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


109) Where do you set up the search path for a called test.[/b]


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.


[/b]


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 26-03-06, 12:28 AM   #73 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


110) How you create user-defined functions and explain the syntax?[/b]


a. 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. 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:





in : A
parameter that is assigned a value from outside the function.


out : A
parameter that is assigned a value from inside the function.


inout
: A parameter that can be assigned a
value from outside or inside the function.


[/b]


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 27-03-06, 12:27 AM   #74 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


111) What does static and public class of a function means?[/b]


a. The class of a function can
be either static or public.


b. A static function is
available only to the test or module
within which the function was defined.


c. Once you execute a public
function, it is available to all tests, for as long as the test containing the
function remains open. This is convenient when you want the function to be
accessible from called tests. However, if you want to create a function that
will be available to many tests, you should place it in a compiled module. The
functions in a compiled module are available for the duration of the testing
session.


d. If no class is explicitly
declared, the function is assigned the default class, public.


Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Old 27-03-06, 12:29 AM   #75 (permalink)
Senior Member
 
Spoorthi's Avatar
 
Join Date: Mar 2006
Posts: 4,793
Blog Entries: 2
Thanks: 9
Thanked 699 Times in 534 Posts
Rep Power: 108 Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute Spoorthi has a reputation beyond repute


112) What does in, out and input parameters means?[/b]


a. in: A parameter that is
assigned a value from outside the function.


b. out: A parameter that is
assigned a value from inside the function.


c. inout: A parameter that
can be assigned a value from outside or inside the function.


[/b]


113) What is the purpose of return statement?[/b]


a. This statement passes
control back to the calling function or test. It also returns the value of the
evaluated expression to the calling function or test. If no expression is
assigned to the return statement, an empty string is returned.


Syntax: [/b]return [( expression )];[/i]






Spoorthi is offline Offline   Reply With Quote
The Following User Says Thank You to Spoorthi For This Useful Post:
AjayKumar.Kataram (22-11-08)
Reply

Tags
asked , interview , qanda , winrunner


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +6.5. The time now is 01:39 PM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.0