Win Runner Questions 123

Embed Size (px)

Citation preview

  • 8/12/2019 Win Runner Questions 123

    1/40

    1) How you used WinRunner in your project?a. Yes, I have been WinRunner for creating automates scripts for GUI, functional

    and regression testing of the AUT.

    2) Explain WinRunner testing process?

    a. WinRunner testing process involves six main stagesi. Create GU !ap ile so that WinRunner can recogni!e the GUI ob"ectsin the application being tested

    ii. Create test scripts b# recording, programming, or a combination of both.While recording tests, insert chec$points %here #ou %ant to chec$ theresponse of the application being tested.

    iii. "e#ug $est% run tests in &ebug mode to ma$e sure the# run smoothl#i&. Run $ests% run tests in 'erif# mode to test #our application.&. 'iew Results% determines the success or failure of the tests.

    &i. Report "e(ects% If a test run fails due to a defect in the application beingtested, #ou can report information about the defect directl# from the Test

    Results %indo%.

    ) W*at in contained in t*e GU +ap?a. WinRunner stores information it learns about a %indo% or ob"ect in a GUI (ap.

    When WinRunner runs a test, it uses the GUI map to locate ob"ects. It reads anob"ect)s description in the GUI map and then loo$s for an ob"ect %ith the same

    properties in the application being tested. *ach of these ob"ects in the GUI (apfile %ill be having a logical name and a ph#sical description.

    #. There are + t#pes of GUI (ap files.i. Glo#al GU !ap (ile a single GUI (ap file for the entire application

    ii. GU !ap ,ile per $est% WinRunner automaticall# creates a GUI (ap file

    for each test created.-) How does WinRunner recogni e o#jects on t*e application?

    a. WinRunner uses the GUI (ap file to recogni!e ob"ects on the application. WhenWinRunner runs a test, it uses the GUI map to locate ob"ects. It reads an ob"ect)sdescription in the GUI map and then loo$s for an ob"ect %ith the same propertiesin the application being tested.

    /) Ha&e you created test scripts and w*at is contained in t*e test scripts?a. Yes I have created test scripts. It contains the statement in (ercur# Interactive)s

    Test -cript anguage /T- 0. These statements appear as a test script in a test%indo%. You can then enhance #our recorded test script, either b# t#ping inadditional T- functions and programming elements or b# using WinRunner)svisual programming tool, the unction Generator.

    0) How does WinRunner e&aluates test results?a. ollo%ing each test run, WinRunner displa#s the results in a report. The report

    details all the ma"or events that occurred during the run, such as chec$points,error messages, s#stem messages, or user messages. If mismatches are detected at

  • 8/12/2019 Win Runner Questions 123

    2/40

    chec$points during the test run, #ou can vie% the expected results and the actualresults from the Test Results %indo%.

    ) Ha&e you per(or+ed de#ugging o( t*e scripts?a. Yes, I have performed debugging of scripts. We can debug the script b# executing

    the script in the debug mode. We can also debug script using the -tep, -tep Into,-tep out functionalities provided b# the WinRunner.

    ) How do you run your test scripts?a. We run tests in 'erif# mode to test #our application. *ach time WinRunner

    encounters a chec$point in the test script, it compares the current data of theapplication being tested to the expected data captured earlier. If an# mismatches

    #. are found, WinRunner captures them as actual results.

    3) How do you analy e results and report t*e de(ects?a. ollo%ing each test run, WinRunner displa#s the results in a report. The report

    details all the ma"or events that occurred during the run, such as chec$points,error messages, s#stem messages, or user messages. If mismatches are detected atchec$points during the test run, #ou can vie% the expected results and the actualresults from the Test Results %indo%. If a test run fails due to a defect in theapplication being tested, #ou can report information about the defect directl# fromthe Test Results %indo%. This information is sent via e1mail to the 2ualit#assurance manager, %ho trac$s the defect until it is fixed.

    14) W*at is t*e use o( $est "irector so(tware?a. Test&irector is (ercur# Interactive)s soft%are test management tool. It helps

    2ualit# assurance personnel plan and organi!e the testing process. WithTest&irector #ou can create a database of manual and automated tests, build testc#cles, run tests, and report and trac$ defects. You can also create reports andgraphs to help revie% the progress of planning tests, running tests, and trac$ingdefects before a soft%are release.

    11) How you integrated your auto+ated scripts (ro+ $est"irector?a. When #ou %or$ %ith WinRunner, #ou can choose to save #our tests directl# to

    #our Test&irector database or %hile creating a test case in the Test&irector %e canspecif# %hether the script in automated or manual. And if it is automated scriptthen Test&irector %ill build a s$eleton for the script that can be later modified intoone %hich could be used to test the AUT.

    12) W*at are t*e di((erent +odes o( recording?a. There are t%o t#pe of recording in WinRunner.

    i. Context 5ensiti&e recording records the operations #ou perform on #our application b# identif#ing Graphical User Interface /GUI0 ob"ects.

    ii. 6nalog recording records $e#board input, mouse clic$s, and the precisex1 and #1coordinates traveled b# the mouse pointer across the screen.

  • 8/12/2019 Win Runner Questions 123

    3/40

    1 ) W*at is t*e purpose o( loading WinRunner 6dd7 ns?a. Add1Ins are used in WinRunner to load functions specific to the particular add1in

    to the memor#. While creating a script onl# those functions in the add1in selected%ill be listed in the function generator and %hile executing the script onl# thosefunctions in the loaded add1in %ill be executed else WinRunner %ill give an error

    message sa#ing it does not recogni!e the function.

    1-) W*at are t*e reasons t*at WinRunner (ails to identi(y an o#ject on t*e GU ?a. WinRunner fails to identif# an ob"ect in a GUI due to various reasons.

    i. The ob"ect is not a standard %indo%s ob"ect.ii. If the bro%ser used is not compatible %ith the WinRunner version, GUI

    (ap *ditor %ill not be able to learn an# of the ob"ects displa#ed in the bro%ser %indo%.

    1/) W*at do you +ean #y t*e logical na+e o( t*e o#ject.a. An ob"ect)s logical name is determined b# its class. In most cases, the logical

    name is the label that appears on an ob"ect.

    10) ( t*e o#ject does not *a&e a na+e t*en w*at will #e t*e logical na+e?a. If the ob"ect does not have a name then the logical name could be the attached

    text.

    1 ) W*at is t*e di((erent #etween GU +ap and GU +ap (iles?a. The GUI map is actuall# the sum of one or more GUI map files. There are t%o

    modes for organi!ing GUI map files.i. Glo#al GU !ap (ile a single GUI (ap file for the entire application

    ii. GU !ap ,ile per $est% WinRunner automaticall# creates a GUI (ap filefor each test created.

    #. GUI (ap file is a file %hich contains the %indo%s and the ob"ects learned b# theWinRunner %ith its logical name and their ph#sical description.

    1 ) How do you &iew t*e contents o( t*e GU +ap?a. GUI (ap editor displa#s the content of a GUI (ap. We can invo$e GUI (ap

    *ditor from the Tools (enu in WinRunner. The GUI (ap *ditor displa#s thevarious GUI (ap files created and the %indo%s and ob"ects learned in to them%ith their logical name and ph#sical description.

    13) W*en you create GU +ap do you record all t*e o#jects o( speci(ic o#jects?a. If %e are learning a %indo% then WinRunner automaticall# learns all the ob"ects

    in the %indo% else %e %ill %e identif#ing those ob"ect, %hich are to be learned ina %indo%, since %e %ill be %or$ing %ith onl# those ob"ects %hile creating scripts.

    24) W*at is t*e purpose o( set8window co++and?a. -et3Windo% command sets the focus to the specified %indo%. We use this

    command to set the focus to the re2uired %indo% before executing tests on a particular %indo%.

  • 8/12/2019 Win Runner Questions 123

    4/40

  • 8/12/2019 Win Runner Questions 123

    5/40

    ob"ect has been learned to the GUI (ap file it %ill be focused in the GUI(ap file.

    2 ) W*at di((erent actions are per(or+ed #y (ind and s*ow #utton?a. To find a particular ob"ect in the GUI (ap file in the application, select the ob"ect

    and clic$ the 5*ow %indo%. This blin$s the selected ob"ect.#. To find a particular ob"ect in a GUI (ap file clic$ the ,ind button, %hich givesthe option to select the ob"ect. When the ob"ect is selected, if the ob"ect has beenlearned to the GUI (ap file it %ill be focused in the GUI (ap file.

    23) How do you identi(y w*ic* (iles are loaded in t*e GU +ap?a. The GUI (ap *ditor has a drop do%n 5 GU ,ile 6 displa#ing all the GUI (ap

    files loaded into the memor#.

    4) How do you +odi(y t*e logical na+e or t*e p*ysical description o( t*e o#jects inGU +ap?

    a. You can modif# the logical name or the ph#sical description of an ob"ect in a GUImap file using the GUI (ap *ditor.

    1) W*en do you (eel you need to +odi(y t*e logical na+e?a. 8hanging the logical name of an ob"ect is useful %hen the assigned logical name

    is not sufficientl# descriptive or is too long.

    2) W*en it is appropriate to c*ange p*ysical description?a. 8hanging the ph#sical description is necessar# %hen the propert# value of an

    ob"ect changes.

    ) How WinRunner *andles &arying window la#els?a. We can handle var#ing %indo% labels using regular expressions. WinRunner

    uses t%o 5hidden6 properties in order to use regular expression in an ob"ect)s ph#sical description. These properties are regexp8la#el and regexp8!5W8class .

    i. The regexp8la#el propert# is used for %indo%s onl#. It operates 5behindthe scenes6 to insert a regular expression into a %indo%)s labeldescription.

    ii. The regexp8!5W8class propert# inserts a regular expression into anob"ect)s !5W8class . It is obligator# for all t#pes of %indo%s and for theob"ect class ob"ect.

    -) W*at is t*e purpose o( regexp8la#el property and regexp8!5W8class property?a. The regexp8la#el propert# is used for %indo%s onl#. It operates 5behind the

    scenes6 to insert a regular expression into a %indo%)s label description.#. The regexp8!5W8class propert# inserts a regular expression into an ob"ect)s

    !5W8class . It is obligator# for all t#pes of %indo%s and for the ob"ect classob"ect.

    /) How do you suppress a regular expression?

  • 8/12/2019 Win Runner Questions 123

    6/40

    a. We can suppress the regular expression of a %indo% b# replacing theregexp8la#el propert# %ith la#el propert#.

    0) How do you copy and +o&e o#jects #etween di((erent GU +ap (iles?a. We can cop# and move ob"ects bet%een different GUI (ap files using the GUI

    (ap *ditor. The steps to be follo%ed arei. 8hoose $ools 9 GU !ap Editor to open the GUI (ap *ditor.ii. 8hoose 'iew 9 GU ,iles .

    iii. 8lic$ Expand in the GU !ap Editor . The dialog box expands to displa#t%o GUI map files simultaneousl#.

    i&. 'ie% a different GUI map file on each side of the dialog box b# clic$ingthe file names in the GUI ile lists.

    &. In one file, select the ob"ects #ou %ant to cop# or move. Use the 5*i(t :eyand;or Control :ey to select +ultiple o#jects . To select all ob"ects in aGUI map file, choose Edit 9 5elect 6ll .

    &i. 8lic$ Copy or !o&e .

    &ii. To restore the GUI (ap *ditor to its original si!e, clic$ Collapse .

    ) How do you select +ultiple o#jects during +erging t*e (iles?a. Use the 5*i(t :ey and;or Control :ey to select +ultiple o#jects . To select all

    ob"ects in a GUI map file, choose Edit 9 5elect 6ll .

    ) How do you clear a GU +ap (iles?a. We can clear a GUI (ap file using the 5 Clear 6ll 6 option in the GUI (ap *ditor.

    3) How do you (ilter t*e o#jects in t*e GU +ap?a. GUI (ap *ditor has a ilter option. This provides for filtering %ith 9 different

    t#pes of options.i. ogical name displa#s onl# ob"ects %ith the specified logical name.

    ii. :h#sical description displa#s onl# ob"ects matching the specified ph#sicaldescription. Use an# substring belonging to the ph#sical description.

    iii. 8lass displa#s onl# ob"ects of the specified class, such as all the push buttons.

    -4) How do you con(igure GU +ap?a. When WinRunner learns the description of a GUI ob"ect, it does not learn all its

    properties. Instead, it learns the minimum number of properties to provide auni2ue identification of the ob"ect.

    #. (an# applications also contain custom GUI ob"ects. A custom ob"ect is an#ob"ect not belonging to one of the standard classes used b# WinRunner. Theseob"ects are therefore assigned to the generic 5ob"ect6 class. When WinRunner records an operation on a custom ob"ect, it generates o#j8+ouse8 statements inthe test script.

    c. If a custom ob"ect is similar to a standard ob"ect, #ou can map it to one of thestandard classes. You can also configure the properties WinRunner uses toidentif# a custom ob"ect during 8ontext -ensitive testing. The mapping and theconfiguration #ou set are valid onl# for the current WinRunner session. To ma$e

  • 8/12/2019 Win Runner Questions 123

    7/40

    the mapping and the configuration permanent, #ou must add configurationstatements to #our startup test script.

    -1) W*at is t*e purpose o( GU +ap con(iguration?a. GUI (ap configuration is used to map a custom ob"ect to a standard ob"ect.

    -2) How do you +a:e t*e con(iguration and +appings per+anent?a. The mapping and the configuration #ou set are valid onl# for the current

    WinRunner session. To ma$e the mapping and the configuration permanent, #oumust add configuration statements to #our startup test script.

    - ) W*at is t*e purpose o( GU spy?a. Using the GUI -p#, #ou can vie% the properties of an# GUI ob"ect on #our

    des$top. You use the -p# pointer to point to an ob"ect, and the GUI -p# displa#sthe properties and their values in the GUI -p# dialog box. You can choose to vie%all the properties of an ob"ect, or onl# the selected set of properties that

    WinRunner learns.

    --) W*at is t*e purpose o( o#ligatory and optional properties o( t*e o#jects?a. or each class, WinRunner learns a set of default properties. *ach default propert#

    is classified 5 o#ligatory 6 or 5optional 6.i. An o#ligatory propert# is al%a#s learned /if it exists0.

    ii. An optional propert# is used onl# if the obligator# properties do not provide uni2ue identification of an ob"ect. These optional properties arestored in a list. WinRunner selects the minimum number of propertiesfrom this list that are necessar# to identif# the ob"ect. It begins %ith thefirst propert# in the list, and continues, if necessar#, to add properties tothe description until it obtains uni2ue identification for the ob"ect.

    -/) W*en t*e optional properties are learned?a. An optional propert# is used onl# if the obligator# properties do not provide

    uni2ue identification of an ob"ect.

    -0) W*at is t*e purpose o( location indicator and index indicator in GU +apcon(iguration?

    a. In cases %here the obligator# and optional properties do not uni2uel# identif# anob"ect, WinRunner uses a selector to differentiate bet%een them. T%o t#pes of selectors are available

    i. A location selector uses the spatial position of ob"ects.;. The location selector uses the spatial order of ob"ects %ithin the

    %indo%, from the top left to the bottom right corners, todifferentiate among ob"ects %ith the same description.

    ii. An index selector uses a uni2ue number to identif# the ob"ect in a%indo%.

  • 8/12/2019 Win Runner Questions 123

    8/40

    ;. The index selector uses numbers assigned at the time of creation of ob"ects to identif# the ob"ect in a %indo%. Use this selector if thelocation of ob"ects %ith the same description ma# change %ithin a%indo%.

    - ) How do you *andle custo+ o#jects?a. A custom ob"ect is an# GUI ob"ect not belonging to one of the standard classesused b# WinRunner. WinRunner learns such ob"ects under the generic 5ob"ect6class. WinRunner records operations on custom ob"ects using o#j8+ouse8 statements.

    #. If a custom ob"ect is similar to a standard ob"ect, #ou can map it to one of thestandard classes. You can also configure the properties WinRunner uses toidentif# a custom ob"ect during 8ontext -ensitive testing.

    - ) W*at is t*e na+e o( custo+ class in WinRunner and w*at +et*ods it applies on t*ecusto+ o#jects?

    a. WinRunner learns custom class ob"ects under the generic 5ob"ect6 class.WinRunner records operations on custom ob"ects using o#j8 statements.-3) n a situation w*en o#ligatory and optional #ot* t*e properties cannot uni

  • 8/12/2019 Win Runner Questions 123

    9/40

    statements. 7# defining a bitmap as a virtual ob"ect, #ou can instruct WinRunner to treat it li$e a GUI ob"ect such as a push button, %hen #ou record and run tests.

    #. Using the 'irtual 4b"ect %i!ard, #ou can assign a bitmap to a standard ob"ectclass, define the coordinates of that ob"ect, and assign it a logical name.

    $o de(ine a &irtual o#ject using t*e 'irtual >#ject wi ard%

    i. 8hoose Tools < 'irtual 4b"ect Wi!ard. The 'irtual 4b"ect %i!ard opens.8lic$ =ext.ii. In the 8lass list, select a class for the ne% virtual ob"ect. If ro%s that are

    displa#ed in the %indo%. or a table class, select the number of visiblero%s and columns. 8lic$ =ext.

    iii. 8lic$ (ar$ 4b"ect. Use the crosshairs pointer to select the area of thevirtual ob"ect. You can use the arro% $e#s to ma$e precise ad"ustments tothe area #ou define %ith the crosshairs. :ress *nter or clic$ the rightmouse button to displa# the virtual ob"ect)s coordinates in the %i!ard. If the ob"ect mar$ed is visible on the screen, #ou can clic$ the >ighlight

    button to vie% it. 8lic$ =ext.

    i&. Assign a logical name to the virtual ob"ect. This is the name that appearsin the test script %hen #ou record on the virtual ob"ect. If the ob"ectcontains text that WinRunner can read, the %i!ard suggests using this textfor the logical name. 4ther%ise, WinRunner suggests &irtual8o#ject ,&irtual8pus*8#utton , &irtual8list , etc.

    &. You can accept the %i!ard)s suggestion or t#pe in a different name.WinRunner chec$s that there are no other ob"ects in the GUI map %ith thesame name before confirming #our choice. 8lic$ =ext.

    / ) How you created you test scripts 1) #y recording or 2) progra++ing?a. :rogramming. I have done complete programming onl#, absolutel# no recording.

    /-) W*at are t*e two +odes o( recording?a. There are + modes of recording in WinRunner

    i. Context 5ensiti&e recording records the operations #ou perform on #our application b# identif#ing Graphical User Interface /GUI0 ob"ects.

    ii. 6nalog recording records $e#board input, mouse clic$s, and the precisex1 and #1coordinates traveled b# the mouse pointer across the screen.

    //) W*at is a c*ec:point and w*at are di((erent types o( c*ec:points?a. 8hec$points allo% #ou to compare the current behavior of the application being

    tested to its behavior in an earlier version.

    You can add four t#pes of chec$points to #our test scripts

    i. GU c*ec:points verif# information about GUI ob"ects. or example, #oucan chec$ that a button is enabled or see %hich item is selected in a list.

    ii. it+ap c*ec:points ta$e a 5snapshot6 of a %indo% or area of #our application and compare this to an image captured in an earlier version.

    iii. $ext c*ec:points read text in GUI ob"ects and in bitmaps and enable #outo verif# their contents.

  • 8/12/2019 Win Runner Questions 123

    10/40

    i&. "ata#ase c*ec:points chec$ the contents and the number of ro%s andcolumns of a result set, %hich is based on a 2uer# #ou create on #our database.

    /0) W*at are data dri&en tests?

    a. When #ou test #our application, #ou ma# %ant to chec$ ho% it performs the sameoperations %ith multiple sets of data. You can create a data1driven test %ith a loopthat runs ten times each time the loop runs, it is driven b# a different set of data.In order for WinRunner to use data to drive the test, #ou must lin$ the data to thetest script %hich it drives. This is called parameteri!ing #our test. The data isstored in a data table. You can perform these operations manuall#, or #ou can usethe &ata&river Wi!ard to parameteri!e #our test and store the data in a data table.

    / ) W*at are t*e sync*roni ation points?a. -#nchroni!ation points enable #ou to solve anticipated timing problems bet%een

    the test and #our application. or example, if #ou create a test that opens a

    database application, #ou can add a s#nchroni!ation point that causes the test to%ait until the database records are loaded on the screen.#. or Analog testing, #ou can also use a s#nchroni!ation point to ensure that

    WinRunner repositions a %indo% at a specific location. When #ou run a test, themouse cursor travels along exact coordinates. Repositioning the %indo% enablesthe mouse pointer to ma$e contact %ith the correct elements in the %indo%.

    / ) W*at is para+eteri ing?a. In order for WinRunner to use data to drive the test, #ou must lin$ the data to the

    test script %hich it drives. This is called parameteri!ing #our test. The data isstored in a data table.

    /3) How do you +aintain t*e docu+ent in(or+ation o( t*e test scripts?a. 7efore creating a test, #ou can document information about the test in the General

    and &escription tabs of the Test :roperties dialog box. You can enter the name of the test author, the t#pe of functionalit# tested, a detailed description of the test,and a reference to the relevant functional specifications document.

    04) W*at do you &eri(y wit* t*e GU c*ec:point (or single property and w*at co++andit generates@ explain syntax?

    a. You can chec$ a single propert# of a GUI ob"ect. or example, #ou can chec$ %hether a button is enabled or disabled or %hether an item in a list is selected. Tocreate a GUI chec$point for a propert# value, use the 8hec$ :ropert# dialog boxto add one of the follo%ing functions to the test script

    i. button3chec$3infoii. scroll3chec$3info

    iii. edit3chec$3infoi&. static3chec$3info&. list3chec$3info

    &i. %in3chec$3info&ii. ob"3chec$3info

  • 8/12/2019 Win Runner Questions 123

    11/40

    5yntax% button_check_info (button, propert , propert _!alue );edit_check_info ( edit, propert , propert _!alue );

    01) W*at do you &eri(y wit* t*e GU c*ec:point (or o#ject;window and w*at co++andit generates@ explain syntax?a. You can create a GUI chec$point to chec$ a single ob"ect in the application being

    tested. You can either chec$ the ob"ect %ith its default properties or #ou canspecif# %hich properties to chec$.

    #. Creating a GU C*ec:point using t*e "e(ault C*ec:si. You can create a GUI chec$point that performs a default chec$ on the

    propert# recommended b# WinRunner. or example, if #ou create a GUIchec$point that chec$s a push button, the default chec$ verifies that the

    push button is enabled.ii. To create a GUI chec$point using default chec$s

    ;. 8hoose 8reate < GUI 8hec$point < or 4b"ect?Windo%, or clic$ the GUI 8hec$point for 4b"ect?Windo% button on the User toolbar. If #ou are recording in Analog mode, press the 8>*8@ GUI 4R 47 *8T?WI=&4W soft$e# in order to avoidextraneous mouse movements. =ote that #ou can press the8>*8@ GUI 4R 47 *8T?WI=&4W soft$e# in 8ontext-ensitive mode as %ell. The WinRunner %indo% is minimi!ed, themouse pointer becomes a pointing hand, and a help %indo% openson the screen.

    +. 8lic$ an ob"ect.9. WinRunner captures the current value of the propert# of the GUI

    ob"ect being chec$ed and stores it in the test)s expected resultsfolder. The WinRunner %indo% is restored and a GUI chec$pointis inserted in the test script as an ob"3chec$3gui statement

    5yntax win_check_gui ( window, checklist, e"pected_results_file, time );

    c. Creating a GU C*ec:point #y 5peci(ying w*ic* =roperties to C*ec: d. You can specif# %hich properties to chec$ for an ob"ect. or example, if #ou

    create a chec$point that chec$s a push button, #ou can choose to verif# that it is infocus, instead of enabled.

    e. $o create a GU c*ec:point #y speci(ying w*ic* properties to c*ec:%

    i. 8hoose 8reate < GUI 8hec$point < or 4b"ect?Windo%, or clic$ the GUI8hec$point for 4b"ect?Windo% button on the User toolbar. If #ou arerecording in Analog mode, press the 8>*8@ GUI 4R 47 *8T?WI=&4W soft$e# in order to avoid extraneous mousemovements. =ote that #ou can press the 8>*8@ GUI 4R 47 *8T?WI=&4W soft$e# in 8ontext -ensitive mode as %ell. The

  • 8/12/2019 Win Runner Questions 123

    12/40

    WinRunner %indo% is minimi!ed, the mouse pointer becomes a pointinghand, and a help %indo% opens on the screen.

    ii. &ouble1clic$ the ob"ect or %indo%. The 8hec$ GUI dialog box opens.iii. 8lic$ an ob"ect name in the 4b"ects pane. The :roperties pane lists all the

    properties for the selected ob"ect.

    i&. -elect the properties #ou %ant to chec$.;. To edit the expected value of a propert#, first select it. =ext, either clic$ the *dit *xpected 'alue button, or double1clic$ the value inthe *xpected 'alue column to edit it.

    +. To add a chec$ in %hich #ou specif# arguments, first select the propert# for %hich #ou %ant to specif# arguments. =ext, either clic$ the -pecif# Arguments button, or double1clic$ in theArguments column. =ote that if an ellipsis /three dots0 appears inthe Arguments column, then #ou must specif# arguments for achec$ on this propert#. /You do not need to specif# arguments if adefault argument is specified.0 When chec$ing standard ob"ects,

    #ou onl# specif# arguments for certain properties of edit and statictext ob"ects. You also specif# arguments for chec$s on certain properties of nonstandard ob"ects.

    9. To change the vie%ing options for the properties of an ob"ect, usethe -ho% :roperties buttons.

    B. 8lic$ 4@ to close the 8hec$ GUI dialog box. WinRunner capturesthe GUI information and stores it in the test)s expected resultsfolder. The WinRunner %indo% is restored and a GUI chec$pointis inserted in the test script as an ob"3chec$3gui or a%in3chec$3gui statement.

    5yntax win_check_gui ( window, checklist, e"pected_results_file, time ); ob#_check_gui ( ob#ect, checklist, e"pected results file, time );

    02) W*at do you &eri(y wit* t*e GU c*ec:point (or +ultiple o#jects and w*atco++and it generates@ explain syntax?

    a. $o create a GU c*ec:point (or two or +ore o#jects%i. 8hoose 8reate < GUI 8hec$point < or (ultiple 4b"ects or clic$ the GUI

    8hec$point for (ultiple 4b"ects button on the User toolbar. If #ou arerecording in Analog mode, press the 8>*8@ GUI 4R (U TI: *47 *8T- soft$e# in order to avoid extraneous mouse movements. The8reate GUI 8hec$point dialog box opens.

    ii. 8lic$ the Add button. The mouse pointer becomes a pointing hand and ahelp %indo% opens.

    iii. To add an ob"ect, clic$ it once. If #ou clic$ a %indo% title bar or menu bar,a help %indo% prompts #ou to chec$ all the ob"ects in the %indo%.

    i&. The pointing hand remains active. You can continue to choose ob"ects b#repeating step 9 above for each ob"ect #ou %ant to chec$.

  • 8/12/2019 Win Runner Questions 123

    13/40

    &. 8lic$ the right mouse button to stop the selection process and to restorethe mouse pointer to its original shape. The 8reate GUI 8hec$point dialog

    box reopens.&i. The 4b"ects pane contains the name of the %indo% and ob"ects included in

    the GUI chec$point. To specif# %hich ob"ects to chec$, clic$ an ob"ect

    name in the 4b"ects pane. The :roperties pane lists all the properties of theob"ect. The default properties are selected.;. To edit the expected value of a propert#, first select it. =ext, either

    clic$ the *dit *xpected 'alue button, or double1clic$ the value inthe *xpected 'alue column to edit it.

    +. To add a chec$ in %hich #ou specif# arguments, first select the propert# for %hich #ou %ant to specif# arguments. =ext, either clic$ the -pecif# Arguments button, or double1clic$ in theArguments column. =ote that if an ellipsis appears in theArguments column, then #ou must specif# arguments for a chec$ on this propert#. /You do not need to specif# arguments if a default

    argument is specified.0 When chec$ing standard ob"ects, #ou onl#specif# arguments for certain properties of edit and static textob"ects. You also specif# arguments for chec$s on certain

    properties of nonstandard ob"ects.9. To change the vie%ing options for the properties of an ob"ect, use

    the -ho% :roperties buttons.&ii. To save the chec$list and close the 8reate GUI 8hec$point dialog box,

    clic$ 4@. WinRunner captures the current propert# values of the selectedGUI ob"ects and stores it in the expected results folder. A %in3chec$3guistatement is inserted in the test script.

    5yntax win_check_gui ( window, checklist, e"pected_results_file, time );ob#_check_gui ( ob#ect, checklist, e"pected results file, time );

    0 ) W*at in(or+ation is contained in t*e c*ec:list (ile and in w*ic* (ile expected resultsare stored?

    a. The chec$list file contains information about the ob"ects and the properties of theob"ect %e are verif#ing.

    #. The guiA.c*: file contains the expected results %hich is stored in the exp folder 0-) W*at do you &eri(y wit* t*e #it+ap c*ec: point (or o#ject;window and w*at

    co++and it generates@ explain syntax?a. You can chec$ an ob"ect, a %indo%, or an area of a screen in #our application as a

    bitmap. While creating a test, #ou indicate %hat #ou %ant to chec$. WinRunner captures the specified bitmap, stores it in the expected results folder /exp0 of thetest, and inserts a chec$point in the test script. When #ou run the test, WinRunner compares the bitmap currentl# displa#ed in the application being tested %ith theexpected bitmap stored earlier. In the event of a mismatch, WinRunner capturesthe current actual bitmap and generates a difference bitmap. 7# comparing thethree bitmaps /expected, actual, and difference0, #ou can identif# the nature of thediscrepanc#.

  • 8/12/2019 Win Runner Questions 123

    14/40

    #. When %or$ing in 8ontext -ensitive mode, #ou can capture a bitmap of a %indo%,ob"ect, or of a specified area of a screen. WinRunner inserts a chec$point in thetest script in the form of either a %in3chec$3bitmap or ob"3chec$3bitmapstatement.

    c. =ote that %hen #ou record a test in Analog mode, #ou should press the 8>*8@

    7IT(A: 4 WI=&4W soft$e# or the 8>*8@ 7IT(A: 4 -8R**= AR*Asoft$e# to create a bitmap chec$point. This prevents WinRunner from recordingextraneous mouse movements. If #ou are programming a test, #ou can also usethe Analog function chec$3%indo% to chec$ a bitmap.

    d. $o capture a window or o#ject as a #it+ap%

    i. 8hoose 8reate < 7itmap 8hec$point < or 4b"ect?Windo% or clic$ the7itmap 8hec$point for 4b"ect?Windo% button on the User toolbar.Alternativel#, if #ou are recording in Analog mode, press the 8>*8@ 7IT(A: 4 47 *8T?WI=&4W soft$e#. The WinRunner %indo% is

    minimi!ed, the mouse pointer becomes a pointing hand, and a help%indo% opens.ii. :oint to the ob"ect or %indo% and clic$ it. WinRunner captures the bitmap

    and generates a %in3chec$3bitmap or ob"3chec$3bitmap statement in thescript. The T- statement generated for a %indo% bitmap has thefollo%ing s#ntax

    %in3chec$3bitmap / ob"ect, bitmap, time 0Ciii. or an ob"ect bitmap, the s#ntax is

    ob"3chec$3bitmap / ob"ect, bitmap, time 0C

    i&. or example, %hen #ou clic$ the title bar of the main %indo% of the lightReservation application, the resulting statement might be

    %in3chec$3bitmap /D light ReservationD, DImg+D, ;0C&. >o%ever, if #ou clic$ the &ate of light box in the same %indo%, the

    statement might beob"3chec$3bitmap /D&ate of light D, DImg;D, ;0C

    5yntax $ ob#_check_bitmap ( ob#ect, bitmap, time %, ", , width, height& );

    0/) W*at do you &eri(y wit* t*e #it+ap c*ec:point (or screen area and w*at co++andit generates@ explain syntax?

    a. You can define an# rectangular area of the screen and capture it as a bitmap for comparison. The area can be an# si!e it can be part of a single %indo%, or it canintersect several %indo%s. The rectangle is identified b# the coordinates of itsupper left and lo%er right corners, relative to the upper left corner of the %indo%in %hich the area is located. If the area intersects several %indo%s or is part of a%indo% %ith no title /for example, a popup %indo%0, its coordinates are relativeto the entire screen /the root %indo%0.

    #. $o capture an area o( t*e screen as a #it+ap%

  • 8/12/2019 Win Runner Questions 123

    15/40

    i. 8hoose 8reate < 7itmap 8hec$point < or -creen Area or clic$ the7itmap 8hec$point for -creen Area button. Alternativel#, if #ou arerecording in Analog mode, press the 8>*8@ 7IT(A: 4 -8R**=AR*A soft$e#. The WinRunner %indo% is minimi!ed, the mouse pointer

    becomes a crosshairs pointer, and a help %indo% opens.ii. (ar$ the area to be captured press the left mouse button and drag themouse pointer until a rectangle encloses the areaC then release the mouse

    button.iii. :ress the right mouse button to complete the operation. WinRunner

    captures the area and generates a %in3chec$3bitmap statement in #our script.

    i&. The %in3chec$3bitmap statement for an area of the screen has thefollo%ing s#ntax

    win_check_bitmap ( window, bitmap, time, ", , width, height );

    00) W*at do you &eri(y wit* t*e data#ase c*ec:point de(ault and w*at co++and itgenerates@ explain syntax?

    a. 7# adding runtime database record chec$points #ou can compare the informationin #our application during a test run %ith the corresponding record in #our database. 7# adding standard database chec$points to #our test scripts, #ou canchec$ the contents of databases in different versions of #our application.

    #. When #ou create database chec$points, #ou define a 2uer# on #our database, and#our database chec$point chec$s the values contained in the result set. The resultset is set of values retrieved from the results of the 2uer#.

    c. You can create runtime database record chec$points in order to compare thevalues displa#ed in #our application during the test run %ith the correspondingvalues in the database. If the comparison does not meet the success criteria #ou

    d. specif# for the chec$point, the chec$point fails. You can define a successfulruntime database record chec$point as one %here one or more matching records%ere found, exactl# one matching record %as found, or %here no matchingrecords are found.

    e. You can create standard database chec$points to compare the current values of the properties of the result set during the test run to the expected values capturedduring recording or other%ise set before the test run. If the expected results andthe current results do not match, the database chec$point fails. -tandard databasechec$points are useful %hen the expected results can be established before the testrun.

    5yntax db_check(,

  • 8/12/2019 Win Runner Questions 123

    16/40

    When #ou are finished, the %i!ard inserts the appropriate d#8record8c*ec: statement into #our script.

    5yntax% db_record_check('hecklist ile ame,*uccess'onditions,+ecord umber );

    C*ec:list,ileBa+e A file created b# WinRunner and saved in the testEschec$list folder. The file contains information about the data to be captured duringthe test run and its corresponding field in the database. The file is created basedon the information entered in the Runtime Record 'erification %i!ard.5uccessConditions 8ontains one of the follo%ing values

    ;. &'R34=*34R3(4R*3(AT8> 1 The chec$point passes if one or more matching database records are found.

    +. &'R34=*3(AT8> 1 The chec$point passes if exactl# one matchingdatabase record is found.

    9. &'R3=43(AT8> 1 The chec$point passes if no matching database

    records are found.RecordBu+#er An out parameter returning the number of records in thedatabase.

    0 ) How do you *andle dyna+ically c*anging area o( t*e window in t*e #it+apc*ec:points?

    a. The difference bet%een bitmaps option in the Run Tab of the general optionsdefines the minimum number of pixels that constitute a bitmap mismatch

    0 ) W*at do you &eri(y wit* t*e data#ase c*ec: point custo+ and w*at co++and itgenerates@ explain syntax?

    a. When #ou create a custom chec$ on a database, #ou create a standard databasechec$point in %hich #ou can specif# %hich properties to chec$ on a result set.

    #. You can create a custom chec$ on a database in order toi. chec$ the contents of part or the entire result set

    ii. edit the expected results of the contents of the result setiii. count the ro%s in the result seti&. count the columns in the result set

    c. You can create a custom chec$ on a database using 4&78, (icrosoft Fuer# or &ata unction.

    03) W*at do you &eri(y wit* t*e sync point (or o#ject;window property and w*atco++and it generates@ explain syntax?

    a. -#nchroni!ation compensates for inconsistencies in the performance of #our application during a test run. 7# inserting a s#nchroni!ation point in #our testscript, #ou can instruct WinRunner to suspend the test run and %ait for a cue

    before continuing the test.#. You can a s#nchroni!ation point that instructs WinRunner to %ait for a specified

    ob"ect or %indo% to appear. or example, #ou can tell WinRunner to %ait for a%indo% to open before performing an operation %ithin that %indo%, or #ou ma#

  • 8/12/2019 Win Runner Questions 123

    17/40

    %ant WinRunner to %ait for an ob"ect to appear in order to perform an operationon that ob"ect.

    c. You use the ob"3exists function to create an ob"ect s#nchroni!ation point, and #ouuse the %in3exists function to create a %indo% s#nchroni!ation point. Thesefunctions have the follo%ing s#ntax

    5yntax%ob#_e"ists ( ob#ect %, time & );win_e"ists ( window %, time & );

    4) W*at do you &eri(y wit* t*e sync point (or o#ject;window #it+ap and w*atco++and it generates@ explain syntax?

    a. You can create a bitmap s#nchroni!ation point that %aits for the bitmap of anob"ect or a %indo% to appear in the application being tested.

    #. &uring a test run, WinRunner suspends test execution until the specified bitmap isredra%n, and then compares the current bitmap %ith the expected one capturedearlier. If the bitmaps match, then WinRunner continues the test.

    5yntax%ob#_wait_bitmap ( ob#ect, image, time );win_wait_bitmap ( window, image, time 0C

    1) W*at do you &eri(y wit* t*e sync point (or screen area and w*at co++and itgenerates@ explain syntax?

    a. or screen area verification %e actuall# capture the screen area into a bitmap andverif# the application screen area %ith the bitmap file during execution

    5yntax% ob#_wait_bitmap(ob#ect, image, time, ", , width, height);

    2) How do you edit c*ec:list (ile and w*en do you need to edit t*e c*ec:list (ile?a. WinRunner has an edit chec$list file option under the create menu. -elect the

    5*dit GUI 8hec$list6 to modif# GUI chec$list file and 5*dit &atabase 8hec$list6to edit database chec$list file. This brings up a dialog box that gives #ou option toselect the chec$list file to modif#. There is also an option to select the scope of thechec$list file, %hether it is Test specific or a shared one. -elect the chec$list file,clic$ 4@ %hich opens up the %indo% to edit the properties of the ob"ects.

    ) How do you edit t*e expected &alue o( an o#ject?a. We can modif# the expected value of the ob"ect b# executing the script in the

    Update mode. We can also manuall# edit the gui .ch$ file %hich contains theexpected values %hich come under the exp folder to change the values.

    -) How do you +odi(y t*e expected results o( a GU c*ec:point?a. We can modif# the expected results of a GUI chec$point be running the script

    containing the chec$point in the update mode.

    /) How do you *andle 6cti&e and 'isual #asic o#jects?

  • 8/12/2019 Win Runner Questions 123

    18/40

    a. WinRunner provides %ith add1ins for ActiveH and 'isual basic ob"ects. Whenloading WinRunner, select those add1ins and these add1ins provide %ith a set of functions to %or$ on ActiveH and '7 ob"ects.

    0) How do you create >" C *R* clause is parameteri!ed, i.e., the value of the field is specified b# a2uestion mar$ s#mbol / J 0. or example, the follo%ing -F statement is basedon a 2uer# on the database in the sample light Reservation application

    i. * - '. lights/0eparture, lights/ light_ umber, lights/0a _1f_2eek +13 lights lights 24 + ( lights/0eparture56) 7 0( lights/0a _1f_2eek56)

    -* *8T defines the columns to include in the 2uer#. R4( specifies the path of the database.

    W>*R* /optional0 specifies the conditions, or filters to use in the 2uer#. &eparture is the parameter that represents the departure point of a flight.

  • 8/12/2019 Win Runner Questions 123

    19/40

    &a#34f3Wee$ is the parameter that represents the da# of the %ee$ of a flight.

    #. When creating a database chec$point, #ou insert a db3chec$ statement into #our test script. When #ou parameteri!e the -F statement in #our chec$point, thed#8c*ec: function has a fourth, optional, argument the para+eter8array

    argument. A statement similar to the follo%ing is inserted into #our test script

    db_check(8list9/cdl8, 8db!f98, 1_-I3I., db!f9_params);

    The para+eter8array argument %ill contain the values to substitute for the parameters in the parameteri!ed chec$point.

    1) Explain t*e (ollowing co++ands%a. db3connect

    i. to connect to a database

    db_connect(, );

    #. db3execute32uer#i. to execute a 2uer#

    db_e"ecute_:uer ( session_name, * -, record_number );

    record_number is the out value.

    c. db3get3field3valuei. returns the value of a single field in the specified ro%3index and column

    in the session3name database session.

    db_get_field_!alue ( session_name, row_inde", column );

    d. db3get3headersi. returns the number of column headers in a 2uer# and the content of the

    column headers, concatenated and delimited b# tabs.

    db_get_headers ( session_name, header_count, header_content );

    e. db3get3ro%i. returns the content of the ro%, concatenated and delimited b# tabs.

    db_get_row ( session_name, row_inde", row_content );(. db3%rite3records

    i. %rites the record set into a text file delimited b# tabs.

    db_write_records ( session_name, output_file % , headers % , record_limit & & );

    g. db3get3last3error

  • 8/12/2019 Win Runner Questions 123

    20/40

    i. returns the last error message of the last 4&78 or &ata unction operationin the session3name database session.

    db_get_last_error ( session_name, error );

    *. db3disconnecti. disconnects from the database and ends the database session.

    db_disconnect ( session_name );

    i. db3d"3converti. runs the d"s3file &ata unction export file. When #ou run this file, the &ata

    unction *ngine converts data from one spo$e /source0 to another /target0.The optional parameters enable #ou to override the settings in the &ata

    unction export file.

    db_d#_con!ert ( d#s_file % , output_file % , headers % , record_limit & & & );2) W*at c*ec: points you will use to read and c*ec: text on t*e GU and explain itssyntax?

    a. You can use text chec$points in #our test scripts to read and chec$ text in GUIob"ects and in areas of the screen. While creating a test #ou point to an ob"ect or a%indo% containing text. WinRunner reads the text and %rites a T- statement tothe test script. You ma# then add simple programming elements to #our testscripts to verif# the contents of the text.

    #. You can use a text chec$point toi. Read text from a GUI ob"ect or %indo% in #our application, using

    o#j8get8text and win8get8textii. -earch for text in an ob"ect or %indo%, using win8(ind8text and

    o#j8(ind8textiii. (ove the mouse pointer to text in an ob"ect or %indo%, using

    o#j8+o&e8locator8text and win8+o&e8locator8texti&. 8lic$ on text in an ob"ect or %indo%, using o#j8clic:8on8text and

    win8clic:8on8text

    ) Explain Get $ext c*ec:point (ro+ o#ject;window wit* syntax?a. We use ob#_get_te"t (,

  • 8/12/2019 Win Runner Questions 123

    21/40

    a. Returns a text string from an ob"ect.

    web_ob#_get_te"t (ob#ect, table_row, table_column, out_te"t %, te"t_before,te"t_after, inde"&);

    i. ob#ect The logical name of the ob"ect.ii. table_row If the ob"ect is a table, it specifies the location of the ro%%ithin a table. The string is preceded b# the K character.

    iii. table_column If the ob"ect is a table, it specifies the location of thecolumn %ithin a table. The string is preceded b# the K character.

    i&. out_te"t The output variable that stores the text string.&. te"t_before &efines the start of the search area for a particular text

    string.&i. te"t_after &efines the end of the search area for a particular text

    string.&ii. inde" The occurrence number to locate. /The default parameter number

    is numbered ;0.

    0) Explain Get $ext c*ec:point we# text c*ec:point wit* syntax?a. We use web_ob#_te"t_e"ists function for %eb text chec$points.

    web_ob#_te"t_e"ists ( ob#ect, table_row, table_column, te"t_to_find %, te"t_before,te"t_after& );

    a. ob#ect The logical name of the ob"ect to search. b. table_row If the ob"ect is a table, it specifies the location of the ro% %ithin a

    table. The string is preceded b# the character K.c. table_column If the ob"ect is a table, it specifies the location of the column %ithin

    a table. The string is preceded b# the character K.d. te"t_to_find The string that is searched for.e. te"t_before &efines the start of the search area for a particular text string.f. te"t_after &efines the end of the search area for a particular text string.

    ) W*ic* $5 (unctions you will use (ora. -earching text on the %indo%

    i. find_te"t ( string, out_coord_arra , 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 follo%ed b# a space outsidethe 2uotation mar$s. To specif# a literal, case1sensitive string, enclose thestring in 2uotation mar$s. Alternativel#, #ou can specif# the name of a stringvariable. In this case, the string variable can include a regular expression.

    out_coord_arra The name of the arra# that stores the screencoordinates of the text /see explanation belo%0.

  • 8/12/2019 Win Runner Questions 123

    22/40

    search_area The area to search, specified as coordinates x;,#;,x+,#+.These define an# t%o diagonal corners of a rectangle. The interpreter searches for the text in the area defined b# the rectangle.

    string_def &efines the t#pe of search to perform. If no value is

    specified, /L or A -*, the default0, the search is for a single complete %ordonl#. When ;, or TRU*, is specified, the search is not restricted to a single,complete %ord.

    #. getting the location of the text stringi. win_find_te"t ( window, string, result_arra %, search_area %,

    string_def & & );

    window The logical name of the %indo% to search.

    string The text to locate. To specif# a literal, case sensitive string, enclosethe string in 2uotation mar$s. Alternativel#, #ou can specif# the name of astring variable. The value of the string variable can include a regular expression. The regular expression should not include an exclamation mar$ /M0, ho%ever, %hich is treated as a literal character. or more informationregarding Regular *xpressions, refer to the DUsing Regular *xpressionsDchapter in #our UserEs Guide.

    result_arra The name of the output variable that stores the location of the string as a four1element arra#.

    search_area The region of the ob"ect to search, relative to the %indo%.This area is defined as a pair of coordinates, %ith x;,#;,x+,#+ specif#ingan# t%o diagonall# opposite corners of the rectangular search region. If this

    parameter is not defined, then the entire %indo% is considered the searcharea.

    string_def &efines ho% the text search is performed. If no string3def is specified, /L or A -*, the default parameter0, the interpreter searches for a complete %ord onl#. If ;, or TRU*, is specified, the search is not restrictedto a single, complete %ord.

    c. (oving the pointer to that text stringi. win_mo!e_locator_te"t (window, string % ,search_area % ,string_def & & );

    window The logical name of the %indo%.

    string The text to locate. To specif# a literal, case sensitive string, enclosethe string in 2uotation mar$s. Alternativel#, #ou can specif# the name of astring variable. The value of the string variable can include a regular

  • 8/12/2019 Win Runner Questions 123

    23/40

    expression /the regular expression need not begin %ith an exclamationmar$0.

    search_area The region of the ob"ect to search, relative to the %indo%.This area is defined as a pair of coordinates, %ith x;, #;, x+, #+ specif#ing

    an# t%o diagonall# opposite corners of the rectangular search region. If this parameter is not defined, then the entire %indo% specified is considered thesearch area.

    string_def &efines ho% the text search is performed. If no string3def is specified, /L or A -*, the default parameter0, the interpreter searches for a complete %ord onl#. If ;, or TRU*, is specified, the search is not restrictedto a single, complete %ord.

    d. 8omparing the texti. compare_te"t (str9, str %, chars9, chars &);

    str9, str The t%o strings to be compared.chars9 4ne or more characters in the first string.

    chars 4ne or more characters in the second string. These characters aresubstituted for those in chars;.

    ) W*at are t*e steps o( creating a data dri&en test?a. The steps involved in data driven testing are

    i. 8reating a testii. 8onverting to a data1driven test and preparing a database

    iii. Running the testi&. Anal#!ing the test results.

    3) Record a data dri&en test script using data dri&er wi ard?a. You can use the &ata&river Wi!ard to convert #our entire script or a part of #our

    script into a data1driven test. or example, #our test script ma# include recordedoperations, chec$points, and other statements that do not need to be repeated for multiple sets of data. You need to parameteri!e onl# the portion of #our test scriptthat #ou %ant to run in a loop %ith multiple sets of data.

    $o create a data7dri&en test%i. If #ou %ant to turn onl# part of #our test script into a data1driven test, first

    select those lines in the test script.ii. 8hoose Tools < &ata&river Wi!ard.

    iii. If #ou %ant to turn onl# part of the test into a data1driven test, clic$ 8ancel. -elect those lines in the test script and reopen the &ata&river Wi!ard. If #ou %ant to turn the entire test into a data1driven test, clic$

    =ext.

  • 8/12/2019 Win Runner Questions 123

    24/40

    i&. The Use a new or existing Excel ta#le box displa#s the name of the *xcelfile that WinRunner creates, %hich stores the data for the data1driven test.Accept the default data table for this test, enter a different name for thedata table, or use

    &. The bro%se button to locate the path of an existing data table. 7# default,

    the data table is stored in the test folder.&i. In the Assign a name to the variable box, enter a variable name %ith %hichto refer to the data table, or accept the default name, 5table.6

    &ii. At the beginning of a data1driven test, the *xcel data table #ou selected isassigned as the value of the table variable. Throughout the script, onl# thetable variable name is used. This ma$es it eas# for #ou to assign adifferent data table

    &iii. To the script at a later time %ithout ma$ing changes throughout the script.ix. 8hoose from among the follo%ing options

    ;. Add statements to create a data1driven test Automaticall# addsstatements to run #our test in a loop sets a variable name b# %hich

    to refer to the data tableC adds braces /NandO0, a for statement, anda ddt8get8row8count statement to #our test script selection to runit in a loop %hile it reads from the data tableC adds ddt8open andddt8close statements

    +. To #our test script to open and close the data table, %hich arenecessar# in order to iterate ro%s in the table. =ote that #ou canalso add these statements to #our test script manuall#.

    9. If #ou do not choose this option, #ou %ill receive a %arning that#our data1driven test must contain a loop and statements to openand close #our datatable.

    B. Import data from a database Imports data from a database. Thisoption adds ddt8update8(ro+8d# , and ddt8sa&e statements to#our test script after the ddt3open statement.

    P. =ote that in order to import data from a database, either (icrosoftFuer# or &ata unction must be installed on #our machine. Youcan install (icrosoft Fuer# from the custom installation of (icrosoft 4ffice. =ote that &ata unction is not automaticall#included in #our WinRunner pac$age. To purchase &ata unction,contact #our (ercur# Interactive representative. or detailedinformation on %or$ing %ith &ata unction, refer to thedocumentation in the &ata unction pac$age.

    Q. =ara+eteri e t*e test Replaces fixed values in selectedchec$points and in recorded statements %ith parameters, using theddt8&al function, and in the data table, adds columns %ith variablevalues for the parameters. ine b# line 4pens a %i!ard screen for each line of the selected test script, %hich enables #ou to decide%hether to parameteri!e a particular line, and if so, %hether to adda ne% column to the data table or use an existing column %hen

    parameteri!ing data.

  • 8/12/2019 Win Runner Questions 123

    25/40

    . 6uto+atically Replaces all data %ith ddt3val statements and addsne% columns to the data table. The first argument of the function isthe name of the column in the data table. The replaced data isinserted into the table.

    x. The Test script line to parameteri!e box displa#s the line of the test scriptto parameteri!e. The highlighted value can be replaced b# a parameter.The Argument to be replaced box displa#s the argument /value0 that #oucan replace %ith a parameter. You can use the arro%s to select a differentargument to replace.

    8hoose %hether and ho% to replace the selected data;. &o not replace this data &oes not parameteri!e this data.+. An existing column If parameters alread# exist in the data table

    for this test, select an existing parameter from the list.9. A ne% column 8reates a ne% column for this parameter in the data

    table for this test. Adds the selected data to this column of the datatable. The default name for the ne% parameter is the logical nameof the ob"ect in the selected. T- statement above. Accept thisname or assign a ne% name.

    xi. The final screen of the %i!ard opens.;. If #ou %ant the data table to open after #ou close the %i!ard, select

    -ho% data table no%.+. To perform the tas$s specified in previous screens and close the

    %i!ard, clic$ inish.9. To close the %i!ard %ithout ma$ing an# changes to the test script,

    clic$ 8ancel.

    34) W*at are t*e t*ree +odes o( running t*e scripts?a. WinRunner provides three modes in %hich to run testsS'erif#, &ebug, and

    Update. You use each mode during a different phase of the testing process.i. 'eri(y

    ;. Use the 'erif# mode to chec$ #our application.ii. "e#ug

    ;. Use the &ebug mode to help #ou identif# bugs in a test script.iii. Update

    ;. Use the Update mode to update the expected results of a test or tocreate a ne% expected results folder.

    ;0 *xplain the follo%ing T- functionsa. &dt3open

    i. 8reates or opens a datatable file so that WinRunner can access it.5yntax% ddt_open ( data_table_name, mode );

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full path

  • 8/12/2019 Win Runner Questions 123

    26/40

    and file name of the table. The first ro% in the file contains the names of the parameters. This ro% is labeled ro% L.

    mode The mode for opening the data table &&T3(4&*3R*A& /read1onl#0 or &&T3(4&*3R*A&WRIT* /read or %rite0.

    #. &dt3savei. -aves the information into a data file.

    5yntax% dt_sa!e (data_table_name);

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table.

    c. &dt3closei. 8loses a data table file

    5yntax% ddt_close ( data_table_name );data_table_name The name of the data table. The data table is a (icrosoft*xcel file or a tabbed text file. The first ro% in the file contains the names of the

    parameters.

    d. &dt3exporti. *xports the information of one data table file into a different data table

    file.5yntax% ddt_e"port (data_table_namename9, data_table_namename );

    data_table_namename9 The source data table filename.data_table_namename The destination data table filename.

    e. &dt3sho%i. -ho%s or hides the table editor of a specified data table.

    5yntax% ddt_show (data_table_name %, show_flag&);

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table.

    show_flag The value indicating %hether the editor should be sho%n/default ;0 or hidden /L0.

    (. &dt3get3ro%3counti. Retrieves the no. of ro%s in a data tables

    5yntax% ddt_get_row_count (data_table_name, out_rows_count);

  • 8/12/2019 Win Runner Questions 123

    27/40

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table. The first ro% in the file contains the names of the

    parameters.

    out_rows_count The output variable that stores the total number of ro%s inthe data table.

    g. ddt3next3ro%i. 8hanges the active ro% in a database to the next ro%

    5yntax% ddt_ne"t_row (data_table_name);

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table. The first ro% in the file contains the names of the

    parameters.

    *. ddt3set3ro%i. -ets the active ro% in a data table.

    5yntax% ddt_set_row (data_table_name, row);

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table. The first ro% in the file contains the names of the

    parameters. This ro% is labeled ro% L.

    row The ne% active ro% in the data table.

    i. ddt3set3vali. -ets a value in the current ro% of the data table

    5yntax% ddt_set_!al (data_table_name, parameter, !alue);

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table. The first ro% in the file contains the names of the

    parameters. This ro% is labeled ro% L. parameter The name of the column into %hich the value %ill be inserted.!alue The value to be %ritten into the table.

    j. ddt3set3val3b#3ro%i. -ets a value in a specified ro% of the data table.

    5yntax% ddt_set_!al_b _row (data_table_name, row, parameter, !alue);

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full path

  • 8/12/2019 Win Runner Questions 123

    28/40

    and file name of the table. The first ro% in the file contains the names of the parameters. This ro% is labeled ro% L.

    row The ro% number in the table. It can be an# existing ro% or the current ro%number plus ;, %hich %ill add a ne% ro% to the data table.

    parameter The name of the column into %hich the value %ill be inserted.

    !alue The value to be %ritten into the table.

    :. ddt3get3current3ro%i. Retrieves the active ro% of a data table.

    5yntax% ddt_get_current_row ( data_table_name, out_row );

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full path

    and file name of the table. The first ro% in the file contains the names of the parameters. This ro% is labeled ro% L.

    out_row The output variable that stores the active ro% in the data table.

    l. ddt3is3parameter i. Returns %hether a parameter in a datatable is valid

    5yntax% ddt_is_parameter (data_table_name, parameter);

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table. The first ro% in the file contains the names of the

    parameters.

    parameter The parameter name to chec$ in the data table.

    +. ddt3get3parametersi. Returns a list of all parameters in a data table.

    5yntax% ddt_get_parameters ( table, params_list, params_num );

    table The pathname of the data table. params_list This out parameter returns the list of all parameters in the datatable, separated b# tabs.

    params_num This out parameter returns the number of parameters in params3list.

    n. ddt3vali. Returns the value of a parameter in the active roe in a data table.

    5yntax% ddt_!al (data_table_name, parameter);

  • 8/12/2019 Win Runner Questions 123

    29/40

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table. The first ro% in the file contains the names of the

    parameters.

    parameter The name of the parameter in the data table.

    o. ddt3val3b#3ro%i. Returns the value of a parameter in the specified ro% in a data table.

    5yntax% ddt_!al_b _row ( data_table_name, row_number, parameter );

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table. The first ro% in the file contains the names of the

    parameters. This ro% is labeled ro% L.

    row_number The number of the ro% in the data table. parameter The name of the parameter in the data table.

    p. ddt3report3ro%i. Reports the active ro% in a data table to the test results

    5yntax% ddt_report_row (data_table_name);

    data_table_name The name of the data table. The name ma# be the tablevariable name, the (icrosoft *xcel file or a tabbed text file name, or the full pathand file name of the table. The first ro% in the file contains the names of the

    parameters. This ro% is labeled ro% L.

    andling

    &efine *xception

    &efine >andlerunction

    Activate *xception >andling

  • 8/12/2019 Win Runner Questions 123

    30/40

  • 8/12/2019 Win Runner Questions 123

    31/40

    #. You could use exception handling to detect a change in propert# of the GUI ob"ectduring the test run, and to recover test execution b# calling a handler function andcontinue %ith the test execution

    30) How do you co++ent your script?

    a. We comment a script or line of script b# inserting a K) at the beginning of theline.

    3 ) W*at is a co+pile +odule?a. A compiled module is a script containing a librar# of user1defined functions that

    #ou %ant to call fre2uentl# from other tests. When #ou load a compiled module,its functions are automaticall# compiled and remain in memor#. You can call themdirectl# from %ithin an# test.

    #. 8ompiled modules can improve the organi!ation and performance of #our tests.-ince #ou debug compiled modules before using them, #our tests %ill re2uire lesserror1chec$ing. In addition, calling a function that is alread# compiled is

    significantl# faster than interpreting a function in a test script.

    3 ) W*at is t*e di((erence #etween script and co+pile +odule?a. Test script contains the executable file in WinRunner %hile 8ompiled (odule is

    used to store reusable functions. 8omplied modules are not executable.#. WinRunner performs a pre1compilation automaticall# %hen it saves a module

    assigned a propert# value of 58ompiled (odule6.c. 7# default, modules containing T- code have a propert# value of DmainD. (ain

    modules are called for execution from %ithin other modules. (ain modules ared#namicall# compiled into machine code onl# %hen WinRunner recogni!es aDcallD statement. *xample of a call for the Dapp3initD script

    call cso3init/0Ccall/ D8 VV(#App olderVVD Dapp3initD 0C

    d. 8ompiled modules are loaded into memor# to be referenced from T- code inan# module. *xample of a load statement

    reload /58 VV(#App olderVVD Dflt3libD0Corload /D8 VV(#App olderVVD Dflt3libD0C

    33) Write and explain &arious loop co++and?a. A for loop instructs WinRunner to execute one or more statements a specified

    number of times.

    It has the follo%ing syntax%

    for ( % e"pression9 &; % e"pression &; % e"pression= & ) statement

  • 8/12/2019 Win Runner Questions 123

    32/40

    i. irst, expression; is executed. =ext, expression+ is evaluated. If expression+ is true, statement is executed and expression9 is executed.The c#cle is repeated as long as expression+ remains true. If expression+is false, the for statement terminates and execution passes to the firststatement immediatel# follo%ing.

    ii. or example, the for loop belo% selects the file UI3T*-T from the ile =ame listiii. in the 4pen %indo%. It selects this file five times and then stops.

    set3%indo% /D4penD0for /i LC iXPC i 0

    list3select3item/D ile3=ame 3;D,DUI3T*-TD0C KItem =umber+#. A %hile loop executes a bloc$ of statements for as long as a specified condition is

    true.

    It has the follo%ing s#ntax

    while ( e"pression ) statement ;

    i. While expression is true, the statement is executed. Theloop ends %hen the expression is false. or example, the%hile statement belo% performs the same function as thefor loop above.

    set3%indo% /D4penD0Ci LC%hile /iXP0N

    i Clist3select3item /D ile =ame 3;D, DUI3T*-TD0C K Item =umber +

    Oc. A do?%hile loop executes a bloc$ of statements for as long as a specified

    condition is true. Unli$e the for loop and %hile loop, a do?%hile loop tests theconditions at the end of the loop, not at the beginning.

    A do?%hile loop has the follo%ing s#ntaxdo

    statement while (e"pression);

    i. The statement is executed and then the expression isevaluated. If the expression is true, then the c#cle isrepeated. If the expression is false, the c#cle is notrepeated.

    ii. or example, the do?%hile statement belo% opens andcloses the 4rder dialog box of light Reservation fivetimes.

  • 8/12/2019 Win Runner Questions 123

    33/40

    set3%indo% /D light ReservationD0Ci LCdoN

    menu3select3item /D ileC4pen 4rder...D0C

    set3%indo% /D4pen 4rderD0C button3press /D8ancelD0Ci C

    O%hile /iXP0C

    144) Write and explain decision +a:ing co++and?a. You can incorporate decision1ma$ing into #our test scripts using if?else or s%itch

    statements.i. An if?else statement executes a statement if a condition is trueC other%ise,

    it executes another statement.

    It has the follo%ing s#ntaxif / expression 0statement;C

    Z elsestatement+C [

    expression is evaluated. If expression is true, statement; is executed. If expression; is false, statement+ is executed.

    #. A s%itch statement enables WinRunner to ma$e a decision based on an expressionthat can have more than t%o values.

    It has the follo%ing s#ntaxs%itch /expression 0N

    case case3; statementscase case3+ statementscase case3n statementsdefault statement/s0

    O

    The s%itch statement consecutivel# evaluates each case expression until one isfound that e2uals the initial expression. If no case is e2ual to the expression, then thedefault statements are executed. The default statements are optional.

    141) Write and explain switc* co++and?a. A s%itch statement enables WinRunner to ma$e a decision based on an expression

    that can have more than t%o values.It has the follo%ing s#ntaxs%itch /expression 0N

    case case3; statements

  • 8/12/2019 Win Runner Questions 123

    34/40

    case case3+ statementscase case3n statementsdefault statement/s0

    O

    #. The s%itch statement consecutivel# evaluates each case expression until one isfound that e2uals the initial expression. If no case is e2ual to the expression, thenthe default statements are executed. The default statements are optional.

    142) How do you write +essages to t*e report?a. To %rite message to a report %e use the report3msg statement

    5yntax report_msg (message);

    14 ) W*at is a co++and to in&o:e application?a. Invo$e3application is the function used to invo$e an application.

    5yntax% in!oke_application(file, command_option, working_dir, *412);

    14-) W*at is t*e purpose o( tl8step co++and?a. Used to determine %hether sections of a test pass or fail.

    5yntax% tl_step(step_name, status, description);

    14/) W*ic* $5 (unction you will use to co+pare two (iles?a. We can compare + files in WinRunner using the file3compare function.

    5yntax file_compare (file9, file %, sa!e file&);

    140) W*at is t*e use o( (unction generator?a. The unction Generator provides a 2uic$, error1free %a# to program scripts. You

    cani. Add 8ontext -ensitive functions that perform operations on a GUI ob"ect

    or get information from the application being tested.ii. Add -tandard and Analog functions that perform non18ontext -ensitive

    tas$s such as s#nchroni!ing test execution or sending user1definedmessages to a report.

    iii. Add 8ustomi!ation functions that enable #ou to modif# WinRunner to suit#our testing environment.

    14 ) W*at is t*e use o( putting call and call8close state+ents in t*e test script?a. You can use t%o t#pes of call statements to invo$e one test from another

    i. A call statement invo$es a test from %ithin another test.ii. A call3close statement invo$es a test from %ithin a script and closes the

    test %hen the test is completed.

    iii. The call statement has the follo%ing s#ntax;. call test3name / Z parameter;, parameter+, ...parametern [ 0C

    i&. The call3close statement has the follo%ing s#ntax;. call3close test3name / Z parameter;, parameter+, ... parametern [ 0C

  • 8/12/2019 Win Runner Questions 123

    35/40

    &. The test3name is the name of the test to invo$e. The parameters are the parameters defined for the called test.

    &i. The parameters are optional. >o%ever, %hen one test calls another, thecall statement should designate a value for each parameter defined for thecalled test. If no parameters are defined for the called test, the call

    statement must contain an empt# set of parentheses.

    14 ) W*at is t*e use o( treturn and texit state+ents in t*e 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 thecalling test.

    ii. The texit statement stops test execution entirel#, unless tests are beingcalled from a batch test. In this case, control is returned to the main batchtest.

    #. 7oth functions provide a return value for the called test. If treturn or texit is notused, or if no value is specified, then the return value of the call statement is L.

    treturnc. The treturn statement terminates execution of the called test and returns control to

    the calling test.The s#ntax is

    treturn Z/ expression 0[Cd. The optional expression is the value returned to the call statement used to invo$e

    the test.

    texite. When tests are run interactivel#, the texit statement discontinues test execution.

    >o%ever, %hen tests are called from a batch test, texit ends execution of thecurrent test onl#C control is then returned to the calling batch test.The s#ntax is

    texit Z/ expression 0[C

    143) W*ere do you set up t*e searc* pat* (or a called test.a. The search path determines the directories that WinRunner %ill search for a called

    test.#. To set the search path, choose -ettings < General 4ptions. The General 4ptions

    dialog box opens. 8lic$ the olders tab and choose a search path in the -earch:ath for 8alled Tests box. WinRunner searches the directories in the order in%hich the# are listed in the box. =ote that the search paths #ou define remainactive in future testing sessions.

    114) How you create user7de(ined (unctions and explain t*e syntax?a. A user1defined function has the follo%ing structure

    Zclass[ function name /Zmode[ parameter...0N

  • 8/12/2019 Win Runner Questions 123

    36/40

    declarationsCstatementsC

    O

    #. The class of a function can be either static or public. A static function is available

    onl# to the test or module %ithin %hich the function %as defined.c.d. :arameters need not be explicitl# declared. The# can be of mode in, out, or inout.

    or all non1arra# parameters, the default mode is in. or arra# parameters, thedefault is inout. The significance of each of these parameter t#pes is as follo%s

    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 thefunction.

    111) W*at does static and pu#lic class o( a (unction +eans?a. The class of a function can be either static or public.#. A static function is available onl# to the test or module %ithin %hich the function

    %as defined.c. 4nce #ou execute a public function, it is available to all tests, for as long as the

    test containing the function remains open. This is convenient %hen #ou %ant thefunction to be accessible from called tests. >o%ever, if #ou %ant to create afunction that %ill be available to man# tests, #ou should place it in a compiledmodule. The functions in a compiled module are available for the duration of thetesting session.

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

    112) W*at does in@ out and input para+eters +eans?a. in A parameter that is assigned a value from outside the function.#. 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.11 ) W*at is t*e purpose o( return state+ent?

    a. This statement passes control bac$ to the calling function or test. It also returnsthe value of the evaluated expression to the calling function or test. If noexpression is assigned to the return statement, an empt# string is returned.5yntax% return %( e"pression )&;

    11-) W*at does auto@ static@ pu#lic and extern &aria#les +eans?a. auto An auto variable can be declared onl# %ithin a function and is local to that

    function. It exists onl# for as long as the function is running. A ne% cop# of thevariable is created each time the function is called.

    #. static A static variable is local to the function, test, or compiled module in %hichit is declared. The variable retains its value until the test is terminated b# an Abort

  • 8/12/2019 Win Runner Questions 123

    37/40

    command. This variable is initiali!ed each time the definition of the function isexecuted.

    c. pu#lic A public variable can be declared onl# %ithin a test or module, and isavailable 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.

    11/) How do you declare constants?a. The const specifier indicates that the declared value cannot be modified. The class

    of a constant ma# be either public or static. If no class is explicitl# declared, theconstant is assigned the default class public. 4nce a constant is defined, it remainsin existence until #ou exit WinRunner.

    #. The s#ntax of this declaration is%class& const name %5 e"pression&;

    110) How do you declare arrays?

    a. The follo%ing s#ntax is used to define the class and the initial expression of anarra#. Arra# si!e need not be defined in T- .b. class arra _name % & %5init_e"pression&c. The arra# class ma# be an# of the classes used for variable declarations /auto,

    static, public, extern0.

    11 ) How do you load and unload a co+pile +odule?a. In order to access the functions in a compiled module #ou need to load the

    module. You can load it from %ithin an# test script using the load commandC alltests %ill then be able to access the function until #ou 2uit WinRunner or unloadthe compiled module.

    #. You can load a module either as a s#stem module or as a user module. A s#stemmodule is generall# a closed module that is 5invisible6 to the tester. It is notdispla#ed %hen it is loaded, cannot be stepped into, and is not stopped b# a pausecommand. A s#stem module is not unloaded %hen #ou execute an unloadstatement %ith no parameters /global unload0.

    load (module_name %,9 ?& %,9 ?& );

    The module_name is the name of an existing compiled module.

    T%o additional, optional parameters indicate the t#pe of module. The first parameter indicates %hether the function module is a s#stem module or a user module ; indicates a s#stem moduleC L indicates a user module.

    /&efault L0

    The second optional parameter indicates %hether a user module %ill remain openin the WinRunner %indo% or %ill close automaticall# after it is loaded ;

  • 8/12/2019 Win Runner Questions 123

    38/40

    indicates that the module %ill close automaticall#C L indicates that the module %illremain open./&efault L0

    c. The unload function removes a loaded module or selected functions frommemor#.

    d. It has the follo%ing s#ntaxunload ( % module_name test_name % , 8function_name8 & & );

    11 ) W*y you use reload (unction?a. If #ou ma$e changes in a module, #ou should reload it. The reload function

    removes a loaded module from memor# and reloads it /combining the functionsof unload and load0.The s#ntax of the reload function isreload ( module_name % ,9 ? & % ,9 ? & );

    The module3name is the name of an existing compiled module.

    T%o additional optional parameters indicate the t#pe of module. The first parameter indicates %hether the module is a s#stem module or a user module ;indicates a s#stem moduleC L indicates a user module./&efault L0The second optional parameter indicates %hether a user module %ill remain openin the WinRunner %indo% or %ill close automaticall# after it is loaded. ; indicatesthat the module %ill close automaticall#. L indicates that the module %ill remainopen./&efault L0

    113) Write and explain co+pile +odule?a.

    ;+L0 >o% do #ou call a function from external libraries /dll0.;+;0 What is the purpose of load3dllJ;++0 >o% do #ou load and unload external librariesJ;+90 >o% do #ou declare external functions in T- J;+B0 >o% do #ou call %indo%s A:Is, explain %ith an exampleJ;+P0 Write T- functions for the follo%ing interactive modes

    i. 8reating a dialog box %ith an# message #ou specif#, and an edit field.ii. 8reate dialog box %ith list of items and message.

    iii. 8reate dialog box %ith edit field, chec$ box, and execute button, and acancel button.

    i&. 8reating a bro%se dialog box from %hich user selects a file.&. 8reate a dialog box %ith t%o edit fields, one for login and another for

    pass%ord input.;+Q0 What is the purpose of step, step into, step out, step to cursor commands for debugging

    #our scriptJ;+ 0 >o% do #ou update #our expected resultsJ;+\0 >o% do #ou run #our script %ith multiple sets of expected resultsJ

  • 8/12/2019 Win Runner Questions 123

    39/40

    ;+ 0 >o% do #ou vie% and evaluate test results for various chec$ pointsJ;9L0 >o% do #ou vie% the results of file comparisonJ;9;0 What is the purpose of Wdiff utilit#J;9+0 What are batch tests and ho% do #ou create and run batch tests J;990 >o% do #ou store and vie% batch test resultsJ

    ;9B0 >o% do #ou execute #our tests from %indo%s run commandJ;9P0 *xplain different command line optionsJ;9Q0 What T- function #ou %ill use to pause #our scriptJ;9 0 What is the purpose of setting a brea$ pointJ;9\0 What is a %atch listJ;9 0 &uring debugging ho% do #ou monitor the value of the variablesJ

    If this is just phone screening, I would ask the following:1. Where did you learn WinRunner and TestDirector?If they say it was in a ercury class, ask if they can show you theircerti!cate of co pletion. If they say no, let the know you will "erify itwith #ercury.

    $. %a"e you e"er created a start&up script? If they answer 'yes', ask thewhat was in it and how they got WR to e(ecute the start&up script when WR isin"oked.

    They should answer so ething like this, 'In the start&up script, we loaded allthe gui aps for the application, any li)rary !les we needed, and any custogui o)ject apping we ha"e to do. We also loaded glo)al "aria)les and syste"aria)les here. The startup script location is added to the WR .ini !le,wrun.ini located under the windows or winnt directory as wrun.ini'

    *. What is the di+erence )etween writing a function and writing a script? They should ention so e of these things:1. function goes into a 'co piled odule', a script does not.$. function follows strict 'c' synta(. -or instance, you ha"e to declareall "aria)les created and used in the function. In a script you do not.

    . What is the di+erence )etween 'set/window' and 'win/acti"ate'. When wouldyou use 'set/window' and when would you use 'win/acti"ate'?win/acti"ate has the for at win/acti"ate0window 2. The win/acti"ate function

    akes the speci!ed window the acti"e window )y )ringing it into focus andraising it to the top of the display. 0It is the e3ui"alent to clicking on thewindow )anner

    4et/window has the following for at: set/window0window,5ti e6 2 The set/window function directs input to the corret application window. Thisdirects the 78I ap to this window. It also sets the scope for o)jectidenti!cation in the 78I ap.

    The ost i portant di+erence is that set/window has a ti ing option.WinRunner will wait a a(i u of the nu )er used in the function, 9 84 thesyste set ti eout, to wait for the window to appear. Win/acti"ate assu es thewindow is already on the desktop and has no ti ing option.

  • 8/12/2019 Win Runner Questions 123

    40/40