winrunner faq

52
1) How you used WinRunner in your project? a) Yes, I have been using WinRunner for creating automated scripts for GUI, functional and regression testing of the AUT. 2) Explain WinRunner testing process? a) WinRunner testing process involves six main stages i. Create GUI Map File so that WinRunner can recognize the GUI objects in the application being tested ii. Create test scripts by recording, programming, or a combination of both. While recording tests, insert checkpoints where you want to check the response of the application being tested. iii. Debug Test: run tests in Debug mode to make sure they run smoothly iv. Run Tests: run tests in Verify mode to test your application. v. View Results: determines the success or failure of the tests. vi. Report Defects: If a test run fails due to a defect in the application being tested, you can report information about the defect directly from the Test Results window. 3) What is contained in the GUI map? a) WinRunner stores information it learns about a window or object in a GUI Map. When WinRunner runs a test, it uses the GUI map to locate objects. It reads an object’s description in the GUI map and then looks for an object with the same properties in the application being tested. Each of these objects in the GUI Map file will be having a logical name and a physical description. b) There are 2 types of GUI Map files. i. Global GUI Map file: a single GUI Map file for the entire application ii. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created. 4) How does WinRunner recognize objects on the application? a) WinRunner uses the GUI Map file to recognize objects on the application. When WinRunner runs a test, it uses the GUI map to locate objects. It reads an object’s description in the GUI map and then looks for WinRunner FAQ Page 1 of 52

Upload: innovatorinnovator

Post on 16-Aug-2015

295 views

Category:

Documents


1 download

DESCRIPTION

win

TRANSCRIPT

1) How you used WinRunner in your project?a) Yes, I have been using WinRunner for creating automated scripts for GUI,functional and regression testing of the AUT.2) Explain WinRunner testing process?a) WinRunner testing process involves six main stagesi. Create GU !ap ile so that WinRunner can recogni!e the GUIob"ects in the application being testedii. Create testscripts b# recording, programming, or a combinationof both. While recording tests, insert chec$points %here #ou %antto chec$ the response of the application being tested.iii. "e#ug$est%runtestsin&ebugmodetoma$esurethe#runsmoothl#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 theapplicationbeingtested, #oucanreport informationabout thedefect directl# from the Test Results %indo%.)) W*at is 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 readsanob"ect)sdescriptionintheGUI mapandthenloo$sfor anob"ect %ith the same properties in the application being tested. *ach oftheseob"ectsintheGUI (apfile%ill behavingalogical nameandaph#sical description. b) There are + t#pes of GUI (ap files.i. Glo#al GU !ap (ile, a single GUI (ap file for the entireapplicationii. 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.When WinRunner runs a test, it uses the GUI map to locate ob"ects. Itreads an ob"ect)s description in the GUI map and then loo$s for an ob"ect%ith the same properties in the application being tested./) Ha&e you created test scripts and w*at is contained in t*e test scripts?a) YesI havecreatedtest scripts. It containsthestatement in(ercur#Interactive)s Test -cript .anguage /T-.0. These statements appear as atest script inatest %indo%. Youcanthenenhance#our recordedtestscript, either b# t#ping inadditional T-.functions andprogrammingelements or b# using WinRunner)s visual programming tool, the unctionGenerator.0) How does WinRunner e&aluates test results?a) ollo%ing each test run, WinRunner displa#s the results in a report. Thereport details all the ma"or events that occurred during the run, such aschec$points, error messages, s#stemmessages, or user messages. Ifmismatches are detected at chec$points during the test run, #ou can vie%the expected results and the actual results from the Test Results %indo%.WinRunner FAQ 1age 2 of 341) 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 usingthe -tep, -tep Into, -tep out functionalities provided b# the WinRunner.2) How do you run your test scripts?a) We run tests in 'erif# mode to test #our application. *ach timeWinRunner encountersachec$point inthetest script, it comparesthecurrent data of the application being tested to the expected data capturedearlier. If an# mismatches are found, WinRunner captures them as actualresults.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. Thereport details all the ma"or events that occurred during the run, such aschec$points, error messages, s#stemmessages, or user messages. Ifmismatches are detected at chec$points during the test run, #ou can vie%the expected results and the actual results from the Test Results %indo%.If a test run fails due to a defect in the application being tested, #ou canreport information about the defect directl# from the Test Results %indo%.This information is sent via e5mail to the 6ualit# assurance manager, %hotrac$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)ssoft%aretest management tool. Ithelps 6ualit# assurance personnel plan and organi!e the testing process.With Test&irector #ou can create a database of manualand automatedtests, build test c#cles, run tests, and report and trac$ defects. You canalso create reports and graphs to help revie% theprogress of planningtests, running tests, and trac$ing defects before a soft%are release.11) How you integrated your auto+ated scripts (ro+ $est"irector?a) When#ou%or$%ithWinRunner, #oucanchoosetosave#our testsdirectl# to #our Test&irector database or %hile creating a test case in theTest&irector %e can specif# %hether the script in automated or manual.And if it is automated script then Test&irector %ill build a s$eleton for thescript that can be later modified into one %hich could be used to test theAUT.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 performon #our application b# identif#ing GraphicalUser Interface /GUI0ob"ects.ii. 6nalog recording records $e#board input, mouse clic$s, and theprecise x5 and #5coordinates traveled b# the mouse pointer acrossthe screen.1)) W*at is t*e purpose o( loading WinRunner 6dd7ns?a) Add5Ins are used in WinRunner to load functions specific to the particularadd5in to the memor#. While creating a script onl# those functions in theWinRunner FAQ 1age + of 34add5in selected %ill be listed in the function generator and %hile executingthe script onl# those functions in the loaded add5in %ill be executed elseWinRunner %illgive an error message sa#ing it does not recogni!e thefunction.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 beable tolearn an# of the ob"ectsdispla#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 logicalname is determined b# itsclass. In most cases, thelogical 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 logicalname could be theattached text.11) 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 aret%o modes for organi!ing GUI map files.i. Glo#al GU !ap (ile, a single GUI (ap file for the entireapplicationii. GU !ap ,ile per $est%WinRunner automaticall# creates a GUI(ap file for each test created.b) GUI (ap file is a file %hich contains the %indo%s and the ob"ects learnedb# the WinRunner %ith its logical name and their ph#sical description.12) 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 fromtheTools(enuinWinRunner. TheGUI (ap*ditordispla#s the various GUI (ap files created and the %indo%s and ob"ectslearned 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 theob"ects in the %indo% else %e %ill %e identif#ing those ob"ect, %hich aretobelearnedina%indo%, since%e%ill be%or$ing%ithonl#thoseob"ects %hile creating scripts.24) W*at is t*e purpose o( set8window co++and?a) -et7Windo% command sets the focus to the specified %indo%. We usethis command to set the focus to the re6uired %indo% before executingtests on a particular %indo%.5yntax, set_window(, time);The logical name is thelogical name of the windowandtime is thetime theexecution has to wait till it gets the given window into focus.WinRunner FAQ 1age 3 of 3421) How do you load GU +ap?a) We can load a GUI (ap b# using the GUI7load command.5yntax% GUI_load();22) W*at is t*e disad&antage o( loading t*e GU +aps t*roug* start up scripts?a) If %e are using a single GUI (ap file for the entire AUT then the memor#used b# the GUI (ap ma# be much high.b) If there is an# change in the ob"ect being learned then WinRunner %ill notbe able to recogni!e the ob"ect, as it is not in the GUI (ap file loaded inthe memor#. -o %e %ill have to learn the ob"ect again and update the GUIile and reload it.2)) How do you unload t*e GU +ap?a) We can use GUI7close to unload a specific GUI (ap file or else %e calluse GUI7close7all command to unload all the GUI (ap files loaded in thememor#.5yntax%GUI_close(); or GUI_close_all;2-) W*at actually *appens w*en you load GU +ap?a) When %e load a GUI (ap file, the information about the %indo%s and theob"ects %ith their logical names and ph#sical description are loaded intomemor#. -o %hen the WinRunner executes a script on a particular%indo%, it canidentif#theob"ectsusingthisinformationloadedinthememor#.2/) W*at is t*e purpose o( t*e te+p GU +ap (ile?a) While recording a script, WinRunner learns ob"ects and %indo%s b# itself.This is actuall# stored into the temporar# GUI (ap file. We can specif#%hether %e have to load this temporar# GUI (ap file should be loadedeach time in the General 8ptions.20) W*at is t*e extension o( gui +ap (ile?a) The extension for a GUI (ap file is 9.gui:.21) How do you (ind an o#ject in an GU +ap.a) The GUI (ap *ditor is been provided %ith a ,ind and 5*ow ;uttons. i. To find a particular ob"ect in the GUI (ap file in the application,select theob"ect andclic$ the5*ow%indo%. Thisblin$s theselected ob"ect.ii. To find a particular ob"ect in a GUI (ap file clic$ the ,ind button,%hichgivestheoptiontoselect theob"ect. Whentheob"ect isselected, if the ob"ect has been learned to the GUI (ap file it %illbe focused in the GUI (ap file.22) 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 theob"ect and clic$ the 5*ow %indo%. This blin$s the selected ob"ect.b) To find a particular ob"ect in a GUI (ap file clic$ the ,indbutton, %hichgives the option to select the ob"ect. When the ob"ect is selected, if theob"ect has been learned to the GUI (ap file it %ill be focused in the GUI(ap file.WinRunner FAQ 1age < of 3423) 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 9GU ,ile: displa#ing allthe GUI(ap files loaded into the memor#.)4) Howdoyou+odi(yt*elogical na+eort*ep*ysical descriptiono( t*eo#jects in GU +ap?a) You can modif# the logical name or the ph#sical description of an ob"ect ina GUI map file using the GUI (ap *ditor.)1) W*en do you (eel you need to +odi(y t*e logical na+e?a) =hangingthelogical nameof anob"ect isuseful %hentheassignedlogical name is not sufficientl# descriptive or is too long.)2) W*en it is appropriate to c*ange p*ysical description?a) =hanging the ph#sicaldescription is necessar# %hen the propert# valueof an ob"ect changes.))) How WinRunner *andles &arying window la#els?a) We can handle var#ing %indo%labels usingregular expressions.WinRunner uses t%o 9hidden: properties in order to use regularexpression in an ob"ect)s ph#sical description. These properties areregexp8la#el and regexp8!5W8class.i. The regexp8la#elpropert# is used for %indo%s onl#. It operates9behind the scenes: to insert a regular expression into a %indo%)slabel description. ii. Theregexp8!5W8classpropert#insertsaregular expressioninto an ob"ect)s!5W8class. It is obligator# for all t#pes of%indo%s and for the ob"ect class ob"ect.>)-) W*at is t*e purpose o( regexp8la#el propertyandregexp8!5W8classproperty?a) The regexp8la#el propert# is used for %indo%s onl#. It operates 9behindthe scenes: to insert a regular expression into a %indo%)s labeldescription.b) Theregexp8!5W8classpropert#insertsaregular expressionintoanob"ect)s !5W8class. It is obligator# for all t#pes of %indo%s and for theob"ect class ob"ect.)/) How do you suppress a regular expression?a) Wecansuppresstheregularexpressionof a%indo%b#replacingtheregexp8la#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 theGUI (ap *ditor. The steps to be follo%ed are,i. =hoose $ools 9 GU !ap Editor to open the GUI (ap *ditor.ii. =hoose 'iew 9 GU ,iles.iii. =lic$ Expandin the GU !ap Editor. The dialog box expands todispla# t%o GUI map files simultaneousl#.i&. 'ie% a different GUI map file on each side of the dialog box b#clic$ing the file names in the GUI ile lists.&. In one file, select the ob"ects #ou %ant to cop# or move. Use the5*i(t :eyand;or Control :eytoselect +ultipleo#jects. Toselect all ob"ects in a GUI map file, choose Edit 9 5elect 6ll.&i. =lic$ Copy or !o&e.&ii. To restore the GUI (ap *ditor to its original si!e, clic$ Collapse.WinRunner FAQ 1age ? of 34)1) How do you select +ultiple o#jects during +erging t*e (iles?a) Usethe5*i(t:eyand;orControl :eytoselect+ultipleo#jects.Toselect all ob"ects in a GUI map file, choose Edit 9 5elect 6ll.)2) How do you clear a GU +ap (iles?a) We can clear a GUI (ap file using the 9Clear 6ll: option in the GUI (ap*ditor.)3) How do you (ilter t*e o#jects in t*e GU +ap?a) GUI (ap*ditor hasailter option. Thisprovidesfor filtering%ith3different t#pes of options.i. .ogical name displa#s onl# ob"ects %ith the specified logicalname.ii. 1h#sicaldescription displa#s onl# ob"ects matching the specifiedph#sicaldescription. Use an# substring belonging to the ph#sicaldescription. iii. =lass displa#s onl# ob"ects of the specified class, such as all thepush buttons.-4) How do you con(igure GU +ap?a) When WinRunner learns the description of a GUI ob"ect, it does not learnall its properties. Instead, it learns the minimum number of properties toprovide a uni6ue identification of the ob"ect. b) (an# applications also contain custom GUI ob"ects. A custom ob"ect isan# ob"ect not belonging to one of the standard classes used b#WinRunner. These ob"ects are therefore assigned to the generic 9ob"ect:class. WhenWinRunner recordsanoperationonacustomob"ect, itgenerates o#j8+ouse8 statements in the test script.c) If a custom ob"ect is similar to a standard ob"ect, #ou can map it to one ofthe standard classes. You can also configure the properties WinRunnerusestoidentif#acustomob"ect during=ontext -ensitivetesting. Themappingandtheconfiguration#ouset arevalidonl#for thecurrentWinRunner session. To ma$e the mapping and the configurationpermanent, #oumust addconfigurationstatementsto#our startuptestscript.-1) W*at is t*e purpose o( GU +ap con(iguration?a) GUI (apconfigurationisusedtomapacustomob"ect toastandardob"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 currentWinRunner session. To ma$e the mapping and the configurationpermanent, #oumust addconfigurationstatementsto#our startuptestscript.-)) 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 #ourdes$top. You use the -p# pointer to point to an ob"ect, and the GUI -p#displa#s the properties and their values in the GUI -p# dialog box. Youcan choose to vie% all the properties of an ob"ect, or onl# the selected setof properties that WinRunner learns.WinRunner FAQ 1age 4 of 34--) W*at is t*e purpose o( o#ligatory and optional properties o( t*e o#jects?a) or eachclass, WinRunner learns aset of default properties. *achdefault propert# is classified 9o#ligatory: or 9optional:. i. An o#ligatory propert# is al%a#s learned /if it exists0.ii. An optionalpropert# is used onl# if the obligator# properties donot provide uni6ue identification of an ob"ect. These optionalpropertiesarestoredinalist. WinRunner selectstheminimumnumber of properties from this listthatare necessar# to identif#the ob"ect. It begins %ith the first propert# in the list, andcontinues, if necessar#, to add properties to the description until itobtains uni6ue identification for the ob"ect.-/) W*en t*e optional properties are learned?a) Anoptional propert#is usedonl# if theobligator# properties donotprovide uni6ue identification of an ob"ect.-0) W*at is t*e purpose o( location indicator and index indicator in GU +apcon(iguration?a) Incases%heretheobligator#andoptional propertiesdonot uni6uel#identif#anob"ect, WinRunner usesaselector todifferentiatebet%eenthem. T%o t#pes of selectors are available,i. A location selector uses the spatial position of ob"ects.2. Thelocation selector uses thespatial order of ob"ects%ithinthe%indo%, fromthetopleft tothebottomrightcorners, to differentiate among ob"ects %ith the samedescription.ii. An index selector uses a uni6ue number to identif# the ob"ect ina %indo%.2. The index selector uses numbers assigned at the time ofcreation of ob"ects to identif# the ob"ect in a %indo%. Usethis selector if the location of ob"ects %ith the samedescription ma# change %ithin a %indo%.-1) How do you *andle custo+ o#jects?a) A custom ob"ect is an# GUI ob"ect not belonging to one of the standardclassesusedb# WinRunner.WinRunner learns such ob"ects under thegeneric 9ob"ect: class. WinRunner records operations on custom ob"ectsusing o#j8+ouse8 statements.b) If a custom ob"ect is similar to a standard ob"ect, #ou can map it to one ofthe standard classes. You can also configure the properties WinRunneruses to identif# a custom ob"ect during =ontext -ensitive testing.-2) W*at ist*ena+eo( custo+classinWinRunner andw*at +et*odsitapplies on t*e custo+ o#jects?a) WinRunner learns custom class ob"ects under the generic 9ob"ect: class.WinRunner records operations on custom ob"ects using o#j8 statements.-3) nasituationw*eno#ligatoryandoptional #ot*t*epropertiescannotuni#ject wi.ard%i. =hoose Tools A 'irtual 8b"ect Wi!ard. The 'irtual8b"ect %i!ardopens. =lic$ Bext.ii. In the =lass list, select a class for the ne% virtual ob"ect. If ro%sthat aredispla#edinthe%indo%. or atableclass, select thenumber of visible ro%s and columns. =lic$ Bext.iii. =lic$ (ar$ 8b"ect. Use the crosshairs pointer to select the area ofthevirtual ob"ect. Youcanusethearro%$e#stoma$eprecisead"ustmentstothearea#oudefine%iththecrosshairs. 1ress*nter or clic$ the right mouse button to displa# the virtual ob"ect)scoordinatesinthe%i!ard. If theob"ect mar$edisvisibleonthescreen, #ou can clic$ the Cighlight button to vie% it. =lic$ Bext.i&. Assign a logical name to the virtual ob"ect. This is the name thatappears in the test script %hen #ou record on the virtual ob"ect. Iftheob"ect contains text that WinRunner canread, the%i!ardsuggests using this text for the logical name. 8ther%ise,WinRunner suggests&irtual8o#ject,&irtual8pus*8#utton,&irtual8list, etc.&. Youcanaccept the%i!ard)ssuggestionor t#peinadifferentname. WinRunner chec$s thatthereare no otherob"ectsintheGUI map %ith the same name before confirming #our choice. =lic$Bext.WinRunner FAQ 1age D of 34/)) How you created you test scripts 1) #y recording or 2) progra++ing?a) 1rogramming. I havedonecompleteprogrammingonl#, absolutel#norecording. /-) W*at are t*e two +odes o( recording?a) There are + modes of recording in WinRunneri. Context 5ensiti&e recording records the operations #ou performon #our application b# identif#ing GraphicalUser Interface /GUI0ob"ects.ii. 6nalog recording records $e#board input, mouse clic$s, and theprecise x5 and #5coordinates traveled b# the mouse pointer acrossthe screen.//) W*at is a c*ec:point and w*at are di((erent types o( c*ec:points?a) =hec$points allo% #ou to compare the current behavior of the applicationbeing 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:pointsverif# information about GUI ob"ects. orexample, #oucanchec$that abuttonisenabledor see%hichitem is selected in a list. ii. ?it+apc*ec:pointsta$ea9snapshot:of a%indo%orareaof#our applicationandcomparethistoanimagecapturedinanearlier version.iii. $ext c*ec:pointsreadtext inGUI ob"ectsandinbitmapsandenable #ou to verif# their contents. i&. "ata#asec*ec:pointschec$thecontentsandthenumber ofro%s and columns of a result set, %hich is based on a 6uer# #oucreate on #our database./0) W*at are data dri&en tests?a) When #ou test #our application, #ou ma# %ant to chec$ ho% it performsthe sameoperations %ith multiple sets of data. You cancreate a data5driven test %ith a loop that runs ten times, each time the loop runs, it isdriven b# a different set of data. In order for WinRunner to use data todrive the test, #ou must lin$ the data to the test script %hich it drives. Thisis called parameteri!ing #our test. The data is stored in a data table. Youcan performtheseoperationsmanuall#, or#oucanuse the&ata&riverWi!ard to parameteri!e #our test and store the data in a data table./1) W*at are t*e sync*roni.ation points?a) -#nchroni!ation pointsenable #ou tosolveanticipated timingproblemsbet%een the test and #our application. or example, if #ou create a testthat opens a database application, #ou can add a s#nchroni!ation pointthat causes the test to %ait until the database records are loaded on thescreen.b) or Analog testing, #ou can also usea s#nchroni!ation pointtoensurethat WinRunner repositions a %indo% at a specific location. When #ou runa test, the mouse cursor travels along exactcoordinates. Repositioningthe %indo% enables the mouse pointer to ma$e contact %ith the correctelements in the %indo%.WinRunner FAQ 1age E of 34/2) W*at is para+eteri.ing?a) In order forWinRunner touse data to drive the test, #ou must lin$thedata to the test script %hich it drives. This is called parameteri!ing #ourtest. The data is stored in a data table./3) How do you +aintain t*e docu+ent in(or+ation o( t*e test scripts?a) ;efore creating a test, #ou can document information about the test in theGeneral and &escription tabs of the Test 1roperties dialog box. You canenter thenameof thetest author, thet#peof functionalit#tested, adetailed description of the test, and a reference to the relevant functionalspecifications document.04) W*at do you &eri(y wit* t*e GU c*ec:point (or single property and w*atco++and it generates@ explain syntax?a) You can chec$ a single propert# of a GUI ob"ect. or example, #ou canchec$ %hether a button is enabled or disabled or %hether an item in a listisselected. TocreateaGUI chec$point for apropert#value, usethe=hec$ 1ropert# dialog box to add one of the follo%ing functions to the testscript,i.button7chec$7info ii.scroll7chec$7infoiii.edit7chec$7infoi&.static7chec$7info&.list7chec$7info &i.%in7chec$7info&ii.ob"7chec$7info5yntax% button_check_info (button, propert, propert_!alue );edit_check_info ( edit, propert, propert_!alue );01) W*at doyou&eri(ywit*t*eGU c*ec:point (oro#ject;windowandw*atco++and it generates@ explain syntax?a) You can create a GUI chec$point to chec$ a single ob"ect in theapplication being tested. You can either chec$ the ob"ect %ith its defaultproperties or #ou can specif# %hich properties to chec$.b)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$ onthepropert#recommendedb#WinRunner. or example, if #oucreateaGUI chec$point that chec$sapushbutton, thedefaultchec$ verifies that the push button is enabled.ii. To create a GUI chec$point using default chec$s,2. =hoose =reate A GUI =hec$point A or 8b"ectFWindo%, orclic$ the GUI =hec$point for 8b"ectFWindo% button on theUsertoolbar. If#ou are recordingin Analogmode,pressthe =C*=G GUI 8R 8;H*=TFWIB&8W soft$e# in orderto avoid extraneous mouse movements. Bote that #ou canpress the =C*=G GUI 8R 8;H*=TFWIB&8W soft$e# in=ontext -ensitive mode as %ell. The WinRunner %indo% isminimi!ed, themousepointer becomesapointinghand,and a help %indo% opens on the screen. +. =lic$ an ob"ect. WinRunner FAQ 1age 2I of 343. WinRunnercapturesthecurrent valueof thepropert#oftheGUI ob"ect beingchec$edandstoresit inthetest)sexpected results folder. The WinRunner %indo% is restoredand a GUI chec$pointis inserted in the test scriptas anob"7chec$7gui statement5yntax, 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 createa chec$pointthat chec$s a pushbutton, #ou can choose toverif# that it is in focus, instead of enabled.e) $o create a GU c*ec:point #y speci(ying w*ic* properties to c*ec:%i. =hoose =reate A GUI =hec$point A or 8b"ectFWindo%, or clic$the GUI =hec$point for 8b"ectFWindo% button on the User toolbar.If #ou are recording in Analog mode, press the =C*=G GUI 8R8;H*=TFWIB&8Wsoft$e#inorder toavoidextraneousmousemovements. Bote that #ou can press the =C*=GGUI 8R8;H*=TFWIB&8Wsoft$e#in=ontext -ensitivemodeas%ell.The WinRunner %indo% is minimi!ed, the mouse pointer becomesa pointing hand, and a help %indo% opens on the screen. ii. &ouble5clic$theob"ect or %indo%. The=hec$GUI dialogboxopens. iii. =lic$anob"ect nameinthe8b"ectspane.The1ropertiespanelists all the properties for the selected ob"ect.i&. -elect the properties #ou %ant to chec$. 2. Toedit theexpectedvalueof apropert#, first select it.Bext, either clic$ the *dit *xpected 'alue button, ordouble5clic$ the value in the *xpected 'alue column to editit. +. To add a chec$ in %hich #ou specif# arguments, first selectthepropert#for %hich#ou %ant tospecif# arguments.Bext, either clic$ the -pecif# Arguments button, or double5clic$ in the Arguments column. Bote that if an ellipsis /threedots0 appearsintheArgumentscolumn, then#oumustspecif# arguments for a chec$ on this propert#. /You do notneed to specif# arguments if a default argument isspecified.0 When chec$ing standard ob"ects, #ou onl#specif# arguments for certain properties of edit and statictext ob"ects. Youalsospecif#argumentsfor chec$soncertain properties of nonstandard ob"ects. 3. Tochangethevie%ingoptionsfor thepropertiesof anob"ect, use the -ho% 1roperties buttons. "?C elsestatement+J \expression is evaluated. If expression is true, statement2 isexecuted. If expression2 is false, statement+ is executed.b) A s%itch statement enables WinRunner to ma$e a decision based on anexpression that can have more than t%o values. It has the follo%ing s#ntax,s%itch /expression 0Tcase case72, statementscase case7+, statementsWinRunner FAQ 1age 3I of 34case case7n, statementsdefault, statement/s0UThe s%itch statement consecutivel# evaluates each case expression untiloneisfoundthat e6ualstheinitial expression. If nocaseise6ual totheexpression, then the default statements are executed. The default statementsare optional.141) Write and explain switc* co++and?a) A s%itch statement enables WinRunner to ma$e a decision based on anexpression that can have more than t%o values. It has the follo%ing s#ntax,s%itch /expression 0Tcase case72,statementscase case7+, statementscase case7n, statementsdefault, statement/s0Ub) The s%itch statement consecutivel# evaluates each case expression untilone is found that e6uals the initial expression. If no case is e6ual to theexpression, then the default statements are executed. The defaultstatements are optional.142) How do you write +essages to t*e report?a) To %rite message to a report %e use the report7msg statement5yntax, report_msg (message);14)) W*at is a co++and to in&o:e application?a) Invo$e7application 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* $5E (unction you will use to co+pare two (iles?a) We can compare + files in WinRunner using the file7compare function.5yntax, file_compare (file9, file< %, sa!e file&);140) W*at is t*e use o( (unction generator?a) TheunctionGenerator provides a6uic$, error5free%a# toprogramscripts. You can,i. Add =ontext -ensitive functions that perform operations on a GUIob"ect or get information from the application being tested.ii. Add -tandard and Analog functions that performnon5=ontext-ensitivetas$s suchass#nchroni!ingtestexecutionorsendinguser5defined messages to a report.iii. Add =ustomi!ation functions that enable #ou to modif# WinRunnerto suit #our testing environment.141) W*at ist*euseo( puttingcall andcall8closestate+entsint*etestscript?WinRunner FAQ 1age 32 of 34a) 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. Acall7closestatement invo$esatest from%ithinascript andcloses the test %hen the test is completed.iii. The call statement has the follo%ing s#ntax,2. call test7name / > parameter2, parameter+,...parametern \ 0Ji&. The call7close statement has the follo%ing s#ntax,2. call7close test7name / > parameter2, parameter+, ...parametern \ 0J&. The test7name is the name of the test to invo$e. The parametersare the parameters defined for the called test.&i. The parameters are optional. Co%ever, %hen one test callsanother, thecall statement shoulddesignateavaluefor eachparameter defined for the called test. If no parameters are definedfor the called test, the call statement must contain an empt# set ofparentheses.142) W*at is t*e use o( treturn and texit state+ents in t*e test script?a) Thetreturnandtexit statementsareusedtostopexecutionof calledtests.i. The treturn statement stops the current test and returns control tothe calling test.ii. The texit statement stops test execution entirel#, unless tests arebeing called from a batch test. In this case, control is returned tothe main batch test.b) ;oth functions provide a return value for the called test. If treturn or texitis not used, or if no value is specified, then the return value of the callstatement is I.treturnc) The treturn statement terminates execution of the called test and returnscontrol to the calling test. The s#ntax is,treturn >/ expression 0\Jd) The optional expression is the value returned to the call statement usedto invo$e the test.texite) Whentestsareruninteractivel#, thetexit statement discontinuestestexecution. Co%ever, %hen tests are called from a batch test, texit endsexecution of the current test onl#J control is then returned to the callingbatch test. The s#ntax is,texit >/ expression 0\J143) 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 fora called test.b) To set the search path, choose -ettings A General 8ptions. The General8ptionsdialogboxopens. =lic$theolderstabandchooseasearchpath in the -earch 1ath for=alled Tests box.WinRunner searchestheWinRunner FAQ 1age 3+ of 34directories in the order in %hich the# are listed in the box. Bote that thesearch paths #ou define remain active in future testing sessions.114) How you create user7de(ined (unctions and explain t*e syntax?a) A user5defined function has the follo%ing structure,>class\ function name />mode\ parameter...0TdeclarationsJstatementsJUb) The class of a function can be either static or public. A static function isavailable onl# to the test or module %ithin %hich the function %as defined.c) 1arameters need not be explicitl# declared. The# can be of mode in, out,or inout. or allnon5arra# parameters, the default mode is in. or arra#parameters, the default is inout. The significance of each of theseparameter 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 orinside the function.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. b) A static function is available onl# to the test or module %ithin %hich thefunction %as defined.c) 8nce #ou execute a public function, it is available to all tests, for as longas the test containing the function remains open. This is convenient %hen#ou %ant the function to be accessible from called tests. Co%ever, if #ou%ant to create a function that %ill be available to man# tests, #ou shouldplace it in a compiled module. The functions in a compiledmoduleareavailable for the duration of the testing 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.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 thefunction.11)) W*at is t*e purpose o( return state+ent?a) This statement passes control bac$ to the calling function or test. It alsoreturnsthevalueof theevaluatedexpressiontothecallingfunctionortest. If no expression is assigned to the return statement, an empt# stringis 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 localto that function. It exists onl# for as long as the function is running. A ne%cop# of the variable is created each time the function is called.WinRunner FAQ 1age 33 of 34b) static, A static variable is local to the function, test, or compiled module in%hich it is declared. The variable retains its value until the test isterminated b# an Abort command. This variable is initiali!ed each time thedefinition of the function is executed.c) pu#lic, A publicvariablecan bedeclaredonl# %ithinatestor module,and is available for all functions, tests, and compiled modules.d) extern, An externdeclaration indicates areference to a publicvariabledeclared 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.Theclassof aconstant ma#beeither publicor static. If noclassisexplicitl# declared, the constant is assigned the default class public. 8ncea constant is defined, it remains in existence until #ou exit WinRunner.b) 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 expressionof an arra#. 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.111) How do you load and unload a co+pile +odule?a) In order to access the functions in a compiled module #ou need to loadthemodule. Youcanloadit from%ithinan#test script usingtheloadcommandJ all tests %ill then be able to access the function until #ou 6uitWinRunner or unload the compiled module.b) You can load a module either as a s#stem module or as a user module. As#stemmoduleisgenerall#aclosedmodulethat is9invisible: tothetester. It is not displa#ed %hen it is loaded, cannot be stepped into, and isnot stoppedb#apausecommand. As#stemmoduleisnot unloaded%hen #ou execute an unload statement %ith no parameters /globalunload0.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 firstparameter indicates %hether the function module is a s#stem module or auser module, 2 indicates a s#stem moduleJ I indicates a user module./&efault W I0Thesecondoptional parameter indicates%hether auser module%illremain open in the WinRunner %indo% or %ill close automaticall# after itis loaded, 2 indicates that the module %ill close automaticall#J I indicatesthat the module %ill remain open./&efault W I0c) The unload function removes a loaded module or selected functions frommemor#. d)It has the follo%ing s#ntax,unload ( % module_name > test_name % , 8function_name8 & & );WinRunner FAQ 1age 3< of 34112) W*y you use reload (unction?a) If #ouma$echanges inamodule, #oushouldreloadit. Thereloadfunction removes a loaded module from memor# and reloads it/combining the functions of unload and load0.The s#ntax of the reload function is,reload ( module_name % ,9>? & % ,9>? & );The module7name is the name of an existing compiled module.T%o additional optional parameters indicate the t#pe of module. The firstparameter indicates %hetherthe moduleisas#stemmodule orausermodule, 2 indicates a s#stem moduleJ I indicates a user module./&efault W I0 Thesecondoptional parameter indicates%hether auser module%illremain open in the WinRunner %indo% or %ill close automaticall# after itis loaded. 2 indicates that the module %ill close automaticall#. I indicatesthat the module %ill remain open.!efault " 0#113) W*y does t*e +inus sign not appear w*en using o#j8typeF)@ win8typeF)@typeF)?If using an# of the t#pe/0 functions, minus signs actuall# means hold do%nthe button for the previous character. The solution is to put a bac$slashcharacter KXXK before the minus sign. This also applies to [ Z A.2+I0 Write and explain compile moduleQ2+20 Co% do #ou call a function from external libraries /dll0.2++0 What is the purpose of load7dllQ2+30 Co% do #ou load and unload external librariesQ2+