Informatika | Tesztelés, Minőségbiztosítás » Winrunner automation framework for webtesting

Alapadatok

Év, oldalszám:2007, 42 oldal

Nyelv:angol

Letöltések száma:8

Feltöltve:2014. május 20.

Méret:124 KB

Intézmény:
-

Megjegyzés:

Csatolmány:-

Letöltés PDF-ben:Kérlek jelentkezz be!



Értékelések

Nincs még értékelés. Legyél Te az első!


Tartalmi kivonat

Automation Framework WINRUNNER AUTOMATION FRAMEWORK FOR WEBTESTING Oneclick Testing Solutions (P) Ltd 1 Automation Framework Framework Introduction: This automation framework based on the action/keyword driven approach. The framework is application independent, stable & represents a reliable automation environment. This framework is designed with Mercury Interactive Win Runner tool. Framework Benefits: • Keyword Driven Technology, which is the most, recognized technique in automation world. It makes test cases structure by using Window, Object, Action and Data. One word effectively makes the test case • Easy to operate: The Framework can be applied to any application in any mode (DB or Web Comparison) by modifying configuration file. • Reporting: It creates audit data (such as error logs and detail reports), and generate summary report. This is very useful for the results analysis and bug tracking • Others: Framework has useful utilities, such as an email

engine, a snapshot engine, perl scripts, VB scripts and etc • Portable: Framework acts as a platform, showing its ability to incorporate multiple technologies to effect particular task. • Maintenance: Once the test case put into Framework, the maintenance effort will be very little (close to Zero hour) • Framework handles backend process, such as DB comparison multiple environments, front vs backend validation. • Manual Testers are enough to test the application Keyword driven testing / Action word testing: Keyword driven testing (or) Action word testing , a specific set of actions happen for a given word. Advantage of Keyword driven testing: • Reusability • Common components handled by standard libraries Oneclick Testing Solutions (P) Ltd 2 Automation Framework • The details of the scripts are hidden from the user • Users don’t have to learn the script language to write scripts Architecture: Framework that is developed for the layers of data

abstraction are implied simply is a set of tables, structured to communicate with each other in a parent/child Para diagram. Prime Services uses the Keyword Driven Architecture. Keyword driven means the Framework has implemented a object model which uses a set of keywords to overload with objects and associated actions. Design Keyword Driven Framework is designed on a layered object model implemented on Winrunner. There are various tables, which talks with each other inside the Framework. The following diagram helps to explain the design of the Framework. Directory Structure: This Framework is defined by the following components: • The Core Data Driven Engine. • The Components Functions. • The Support Libraries. While the Support Libraries provide generic routines useful even outside the context of a keyword driven Framework. The Framework is highly dependent on the existence of all three elements All these elements are located in the following Directory Structure:

--[WinRunner Framework Directory] --------- DEV Mod3autorun.bat --------- [WebEngine3] (main batch file) (web engine directory) ------------- StartTest (main program) ------------- VirtualMachine (core web engine) ------------- SubPrograms (external sub-routines) ------------- Library ------------- Global1.ini Oneclick Testing Solutions (P) Ltd (WinRunner Library) (initialization file #1) 3 Automation Framework ------------- Global2.ni (initialization file #2) ---------[AppHelpers] (Application Reserved Keywords directory) ------------- [Application #1] (Application under test directory) ------------- [Reserved keywords] (Reserved keywords directory) --------- [Utilities] (Utilities directory) --------- [Docn] (External Documentation) --------- [AppFolders] (Application Folders directory) ------------- [PROD] (Application Name) ------------- [Application # 1] ------------- App.ini (Application.ini file) ------------- TestTheseCases.xls (list of test

cases to run) ------------- [TestScripts] (actual test cases directory) ------------- [Data] (data directory) ------------- F0 (data -test case F0) ------------- F1 (data -test case F1) ------------- F3 (data -test case F3) ------------- F0 (test case F0) ------------- F1 (test case F1) ------------- F2 (test case F2) ------------- F3 (test case F3) ------------- [UserKeyWords] (user defined keywords) ------------- [Maps] (App. GUI map) -------------[LogFiles] (App. Log files) DEV Mod3autorun.bat File: This batch can run the application remotely. Oneclick Testing Solutions (P) Ltd 4 Automation Framework WebEngine 3 Web Engine3 has all the Winrunner scripts which drives the whole Framework. This represents the core of the Framework. The following are the subfolders in the Web Engine3 a. Start Test b Virtual Machine c. Library d. SubPrograms e. Global1.ini f. Global2.ini g. User config.ini a. Start Test: Start Test calls the global (See Sections e

& f) and the Virtual Machine (see section b) to kick off the scripts. Start Test is the key to start the Engine Virtual Machine b. Virtual Machine Virtual Machine is the backbone of the Framework. The core engine, which drives the whole Framework Virtual Machine has most of the functions that are used in the ACTION section of the test script. The possible actions for the web-based application have been created in the Virtual Machine. The following is the list of actions that are in the Virtual Machine. VirtualMachine folder consist of Keyword action functions, exception handlings. VirtualMachine folder contains the following functions on the Window level: Window verification routines functions: W310WindowVerifyText( ) Purpose : Verifies the existence of text on current window Inputs : 1. currWin - window displayed 2. ExpectedValue - expected text to verify Outputs Oneclick Testing Solutions (P) Ltd : Status: 5 Automation Framework - 0 - found -1 - not found

W311WindowOutpotText( ) Purpose : verifies the output text with the expected text Inputs : expected value Outputs : returns o success , 1 failed W320WindowVerify Link( ) Purpose : Verifies the existence of text on current window Inputs : 1. currWin - window displayed 2. ExpectedValue - expected text to verify Outputs : Status 0 - success 1 - failed W330WindowVeriyObject( ) Purpose : Verifies the existence of text on current window Inputs : 1. currWin - window displayed 2. ExpectedValue - expected text to verify Outputs : Status 0 - success 1 - failed W340WindowVerifyImage( ) Purpose : Verifies the existence of text on current window Inputs : 1. currWin - window displayed 2. ExpectedValue - expected text to verify Outputs : Status 0 - success Oneclick Testing Solutions (P) Ltd 6 Automation Framework 1 - failed W350WindowVerifyCaption( ) Purpose : Verifies the existence of text on current window Inputs : 1. currWin - window displayed 2. ExpectedValue -

expected text to verify Outputs : Status 0 – success 1 - failed W360WindowVerifyHTML( ) Purpose : Verifies the value of a HTML variable Inputs : The Object (variable) and Data to verify Outputs : N/A W366CloseFrame( ) Purpose : Closes a frame Inputs : Window to close Outputs : N/A W367Maximize( ) Purpose : maximize the widown Inputs : Window to maximize Outputs : N/A W370LaunchBrowser( ) Purpose : Calls a library function to open the browser with the optional URL address Inputs : Browser to open and optional URL address Outputs : A window Oneclick Testing Solutions (P) Ltd 7 Automation Framework W380MetricStep( ) Purpose : Increment metric Inputs : N/A Outputs : Return the value W351 ProcessWindowAction( ) Purpose : Processes ALL WindowAction functions Inputs : The action to perform on the WindowAction Outputs : Returns 0 - success o.w 24 – unsuccessful Sub-functions : 1.VERIFYCAPTION - Verify caption appearing in window header.

2.VERIFYTEXT - Verify text in a page. 3.VERIFYLINK - Verify link in a page 4.VERIFYOBJECT - Verify object on a page 5.VERIFYIMAGE - Verify images on a page 6.VERIFYSTATUSBAR - Verify status bar message 7.VERIFYHTMLCODE - Verify HTML variable 8.WAIT - Wait x seconds 9.LAUNCHBROWSER - Open browser window 10.CLOSEBROWSER - Close all open browser windows 11.MAXIMIZEWINDOW - Maximize window 12.CLOSEWINDOW" - Closes specified window 13.CLOSEFRAME - Close the specified frame 14.STEPMETRICS - Increment the step 15.COUNT CASE - Count the number cases to print the report. 16.OUTPUTTEXT - verifies the output text with the expected text. 17.BACK - returns to the previews page. Oneclick Testing Solutions (P) Ltd 8 Automation Framework 18.CATCHTEXT - catch the text for the bigger text content 19.WEB OBJECT CATCHTEXT- catch the text for the bigger text content 20.COMPAREFILE - compares the file. VirtualMachine folder contains the following functions on

the Object level: A500TextBoxComponent( ) Purpose : Processes ALL Textbox functions Inputs : The action to perform on the Textbox and the data to apply (if any) Outputs : Returns 0 - success o.w 24 – unsuccessful Sub-functions : 1.INPUTTEXT Purpose : To input the text. 2.VERIFYTEXT Purpose : validating the values in the text box. 3.VALIDATEVALUE Purpose : validating the values in the text box. 4.VERIFYPROPERTY Purpose : To verifies the text box property. A550ValidateTextValue( ) Purpose : validating the values in the textbox Outputs : Status 0 - passed 1 - failed Oneclick Testing Solutions (P) Ltd 9 Automation Framework A575VerifyTextBoxProperty( ) Purpose : verifies the text box property Inputs : E^D^F^N(or any of the above) Outputs : Status 0 - success 1 – failed Sub-functions : 1.E – verifies the enabled property 2.D – verifies the disabled property 3.F – verifies the focused property 4.N – verifies the fieldlength property

A600LinkComponent( ) Purpose : Processes ALL Link functions Inputs : The action to perform on a Link Outputs : Returns 0 - success o.w 24 - unsuccessful Sub- functions : 1.CLICK – click the link 2.VALIDATELINK - validates the link A650ValidateLink( ) Purpose : validates the link Outputs : Status 0 - passed 1 - failed A700ButtonComponent( ) Oneclick Testing Solutions (P) Ltd 10 Automation Framework Purpose : Processes ALL Button functions Inputs : The action to perform on the Button Outputs : Returns 0 - success o.w 24 – unsuccessful Sub- functions: 1.CLICK - Click the button. 2.VERIFYPROPERTY- Verify the property of the button A800PushBottonComponent( ) Purpose : Processes ALL Push Button functions Inputs : The action to perform on the Push Button Outputs : Returns 0 - success o.w 24 - unsuccessful Sub- functions: 1.CLICK - Click the button. 2.VERIFYPROPERTY- Verify the property of the button A900CheckButtonComponent( ) Purpose : Processes ALL

Check Button functions Inputs : The action to perform on the Check Button Outputs : Returns 0 - success o.w 24 – unsuccessful Sub- functions: 1.CLICK - Click the check button. 2.VERIFYPROPERTY- Verify the property of the check button 3.SELECT - Select the check button. A1000RadioButtonCmponenet( ) Purpose Oneclick Testing Solutions (P) Ltd 11 : Processes ALL Radio Button functions Automation Framework Inputs : The action to perform on the Radio Button Outputs : Returns 0 - success o.w 24 – unsuccessful Sub- functions: 1.CLICK - Click the radio button. 2.VERIFYPROPERTY- Verify the property of the radio button 3.SELECT - Select the radio button. A1100ComboBoxComponent( ) Purpose : Processes ALL ComboBox functions Inputs : The action to perform on the ComboBox Outputs : Returns 0 - success o.w 24 – unsuccessful Sub- functions: 1.CLICK - Click the combo button. 2.VERIFYPROPERTY- Verify the property of the combo button 3.SELECT - Select the combo

button. A1150ValidateCombBoxValue ( ) Purpose : Validates the Combobox values Inputs : Expected value Outputs : Returns 0 - success o.w 24 - unsuccessful Sub- functions: 1.CLICK - Click the rcombo button. 2.VERIFYPROPERTY - Verify the property of the radio button 3.SELECT A1200FileComponent( ) Oneclick Testing Solutions (P) Ltd 12 - Select the radio button. Automation Framework Purpose : sets the text value to an object Inputs : Action to be done Outputs : Returns 0 - success o.w 24 – unsuccessful Sub- functions: 1.FILESET - 2.VALIDATEVALUE - validates the file component A1250FileComponentValue( ) Purpose : validates the file component Inputs : expected value Outputs : Returns 0 - success o.w 24 – unsuccessful A1300TableComponent ( ) Purpose : Processes ALL Table functions Inputs : The action to perform on the Table Outputs : Returns 0 - success o.w 24 – unsuccessful Sub-functions : 1.SELECT - Select the item from the table. 2.PRINTEXT -

Print the inner text in to the file. 3.CLICKCELLLINK – Clicks the links in the table cell 4.VERIFYTEXT - verifies the webtables text 5.ISEXITS A1400LableComponent( ) Oneclick Testing Solutions (P) Ltd 13 - verfify the object exists or not. Automation Framework Purpose : verifies the text in the label, captures the text Inputs : expexted text Outputs : Returns 0 - success o.w 24 – unsuccessful Sub-functions : 1.VERIFYTEXT - verifies the label text Oneclick Testing Solutions (P) Ltd 14 Automation Framework The table related functions in VirtualMachine are following: A200ProcessTableRow ( ) Purpose : Processes ALL TableRow functions Inputs : The action to perform on the TableRow Outputs : Returns 0 - success o.w 24 - unsuccessful A100ProcessStepTable ( ) Purpose : Processes ALL StepTable functions Inputs : The action to perform on the StepTable Outputs : Returns 0 - success o.w 24 - unsuccessful A000RegressionDriver( ) Purpose : Process the Main

Regression Table Inputs : The action to perform on the Main Regression Table Outputs : Returns 0 - Passed 999999999 - Failed c. Library Library contains all the support routines. They are termed User Libray and application specific library For example: oneclick library will be called oneclick lib. User Library will have all the functions that are used in the Framework universally for all applications. Application specific library will have the functions that are specific to a particular application. Oneclick Testing Solutions (P) Ltd 15 Automation Framework User Library Functions: upperlevel dir( ) Purpose : This function is used to remove the last directory name from the specified pathname Inputs : pathname Outputs : new pathname with last part of directory name removed rand num gen( ) Purpose : This function generates a (pseudo-) random number between user-defined maximum and minimum values. It also ensures that if the function is called several times within one

second a different seed value is passed to the random number generator each time. This is done by storing the previously generated value in a static variable and adding this to the time. It produces a random number between min and max (inclusive) Inputs : rand num gen(min,max) Outputs : N/A securityScreen( ) Purpose : Responds to the security pop-up window and closes it Inputs : N/A Outputs : N/A selectDropDownItem( ) Purpose : This function is used to Randomly selects an item from the dropdown box Inputs : Listbox name Outputs : selected item Oneclick Testing Solutions (P) Ltd 16 Automation Framework GetEditLength( ) Purpose : This function is used to get the Editable Length of the Edit Field Inputs : Window Name,Edit Field name Outputs : Editable Length testEditField( ) Purpose : This function is used to test the Edit Field Inputs : Window Name,Edit Field name ,Default text value,Enabled State,Maximum Length Outputs : N/A TestListBox( ) Purpose :

This function is used to test the List/Combo Box Inputs : Window Name,List Box name ,Default value,Items count Outputs : N/A TestRadioButton( ) Purpose : This function is used to test the Radio Button Inputs : Window Name,Radio Button name ,Default State Outputs : N/A TestCheckBox( ) Purpose : This function is used to test the Check Box Inputs : Window Name,CheckBox name ,Default State Outputs : N/A TestPushButton( ) Purpose : This function is used to test the Push Button Oneclick Testing Solutions (P) Ltd 17 Automation Framework Inputs : Window Name,Push Button name ,Default State Outputs : N/A please select item( ) Purpose : This function is used to select from the listbox Inputs : Listbox Name,item Outputs : N/A get short Date( ) Purpose : Retrieves the Current date in the format of mm/dd/yyyy. Outputs : date isWrongWinDisplayed( ) Purpose : This function is used to detect the presence of abnormal pages i.e "page cannot be displayed"

Upon detection of this page, a flag is set and the previous page is displayed Outputs : returns 3 if back button needs to be pressed because of incorrect page being displayed returns 999999999 if system is down and test should be restarted get month no( ) Purpose : Gives the Number of the Given Month Name.Month Name must be first 3 characters Inputs : Month name Outputs : Month No get four digit year( ) Purpose : Gives the Four digit year(yyyy) for any given two digit year(yy). Outputs : Four digit year fileExists( ) Purpose :To find out whether a file exists or not. Oneclick Testing Solutions (P) Ltd 18 Automation Framework Inputs : filename Outputs : 0 if file exists else -1 MeasureTime( ) Purpose : Starts the transaction,and assign starting time to variable starttime. Ends the transaction,and writes the elapsed time to notepad. Inputs : Transaction type and object to detect on following screen Outputs : Time duration to notepad passedFlag - 0 if passed -

1 if failed configFile( ) Purpose : Processes the configuration file and assigne variables their respective values Inputs : Name of configuration file Outputs : N/A setWindow( ) Purpose: Set focus to window name Input: The name of the window to set in focus Output: Returns 0 - success o.w -1 – unsuccessfu WaitForWin( ) Purpose : Wait for a window to appear. If it returns in time, then return 0 If it does not, return 1 Inputs : Name of the window , time to wait in seconds checkStatusBar( ) Purpose : Checks the message in the status bar Oneclick Testing Solutions (P) Ltd 19 Automation Framework invokeApp ( ) Purpose : Invokes the application Input : URL address Output : N/A closePreBrowser( ) Purpose : Close all browsers opened before WR was invoked Input : N/A Output : Closes all browsers closePostBrowser( ) Purpose : Close all browsers opened after WR was invoked Input : N/A Output : Closes all browsers dateFormatTimeStamp( ) Purpose : Formats

the current time stamp Input : Format desired default - mmddyyyy-hhmmss Output : Formated string launchBrowser( ) Purpose : Opens the browser Input : Browser to open and optional URL address Output : Status code: 0 - successful 1 - Invalid browser 2 - Invalid URL address syntax isOneword( ) Oneclick Testing Solutions (P) Ltd 20 Automation Framework Purpose : Check if input is oneword, defined by number of spaces Input : string return: 0 - Oneword n - means n+1 word in the string 1 - empty string arr size( ) Purpose : get the size of array input : input array output : size of the array array size simple( ) Purpose : get the simple size of array (no dimention) Input : input array return : size - size of array array clear( ) Property : clear value assigned to array or create a new empty array Input : string Output : 0 - Oneword n - means n+1 word in the string 1 - empty string array find( ) Property : find the text from array input : return the

count of finding Output : output the array index array find unique( ) Oneclick Testing Solutions (P) Ltd 21 Automation Framework property : find the first match of the string from array input : string, array output : location of the matched string in array exception post action( ) Property : post action of exceptoin exception pre action( ) property :pre-action of exceptoin exception dialog click no( ) Input : win - exception window window MSW class has to be "dialog" exception dialog click yes( ) Input : win - exception window window MSW class has to be "dialog" exception dialog click ok( ) Input : win - exception window window MSW class has to be "dialog" win press ok( ) Input : win - exception window window MSW class has to be "dialog" Oneclick Testing Solutions (P) Ltd 22 Automation Framework exception 32770 click ok( ) Input : win - exception window window MSW class has to be "dialog" std time( )

Input : input time return : yyyymmdd replace ( ) Purpose : use split method to replace desired string Input : str1 - original string will be replaced str2 - the string will replace stri Output : processed line replace str( ) Purpose : use index method to replace desired string Input : old string,new string,index of the string Output : processed line ddt update( ) Property : read the spreadsheet and output the result Input :file name,total row number, total column number. Output :return the updated row number ddt read( ) Property : This function will read the spreadsheet and output the result Input :spread sheet name,tital row number,total column number Oneclick Testing Solutions (P) Ltd 23 Automation Framework output : returns the values in the spreadsheet d. Sub Programs Sub Programs has functions like the global files, email engine, log files and reporting. These functions are universal to all the applications. SubPrograms folder contains the

following: Folders:Debugfile – for debug purpose, excel format –Excel Macro to format Excel report, ExceptionInit – to initialize the Exception Handling configuration, GlobalCleanUp – Bring all parameters back to the initial state after the script is executed. GlobalFinal – Creates Reports, sends emails. GlobalInit – initializes all parameters. MetricsReport – the tool to generate the metrics for the reporting purpose. PrtScr. – Generates the Screen Shot in Word Pad when the exception happened. Exception – any unknown error generated by the Application under test, the system or the browser. Unknown error – the error with non-expected result (not mentioned in our exeption handler?). Files: – excel.bas, vssverscc e. Global1ini Global1 .ini declares the application that is to be run and the drive specification Oneclick Testing Solutions (P) Ltd 24 Automation Framework The Global.ini file contains the parameters needed to initialize Start

Test If initialization fails, WinRunner will create a list box and ask the user to make an appropriate selection. NetDrive – list of the Drivers where the Framework scripts can be located. AppList – list of the applications under test. RegionList – list of the Environments (QA, Development, UAT, Ext). Quick Check List– list of the checkpoints. Ref url list – list of the URLS, which are used in order to access the appropriate environment of the Application under Test. Oneclick Testing Solutions (P) Ltd 25 Automation Framework Example of the Global1.ini below: BrowserList = Internet Explorer,Netscape netDrive = H:,A:,B:,C:,D:,E:,F:,G:,I:,J:,K:,l: AppList =oneclick regionList =Internal QA, Quick Check List =Yes,No ref url list =http://www.oneclicktestingcom f. Global2ini The path for all required files. The “AppFolderPath” variable is used as the reference point where all directories and their corresponding file(s) reside. (1) The text on any window

that will prompt the web engine to hit the back button key (2) The window caption(s) that will prompt the web engine to start the test case over (3) The text on any window that will prompt the web engine to start the test case over (4) The default maximum time a script command should wait before continuing (5) The maximum width and height of the browser window in which the application is being tested (6) The default URL address to use for starting each test case and ensuring the application is returned to the same state for each new test case The following is the example of the Global2.ini files: AppDir =%AppFolderPath%\%App% TestCaseDir =%AppDir%TestScripts TestCaseDataDir =%TestCaseDir%Data AppIni =%AppDir%App.ini UserKeywordDir =%AppDir%UserKeywords LogPathDir =%AppDir%LogFiles GUIFilePath =%AppDir%Maps Oneclick Testing Solutions (P) Ltd 26 Automation Framework Comp Dir =%EngineDrive%AutomationWinRunnerWorking Report Dir =%EngineDrive%AutomationWinRunnerReport

ReservedKeywordDir=%EngineDrive%AutomationWinRunnerAppHelpers\%App%ReservedKeywords DocnDir =%EngineDrive%AutomationWinRunnerDocn backButton =Cannot find server, Please accept our apology., Connection Lost,HTTP 405 - Resource not allowed – error handler startTestOver1 =Request Failed,HTTP 500 Internal server error, HTTP 405 - Resource not allowed startTestOver2 =Problem Report,Error 404--Not Found, 404 Not found Will restart the browser and return to the test cases. [Other] maxWait=60 – maximum time (in sec) the script will wait for the expected result. winWidth=900 winHeight=600 schedule=10292004-182429 – date - time defaultURL=http://www.oneclickttestingcom g. User config User Config file specifies which application to be run and the drive in which the Framework runs from. EngineDrive = (Specifies the drive) App =(Name of the application sub folder) selectedRegion =(Name of the application folder) Region =(region of the application) Quick Check =Yes (Yes –

to avoid too many screenshots. The creation of the screenshots is based on verification type of the error (text, content, location of the object, size of the object). Oneclick Testing Solutions (P) Ltd 27 Automation Framework Vssver.scc: Visual source Safe Format to store the Framework code. AppHelpers: AppHelpers is a form of the User Keywords file. The functionality as we use in the User Keywords except App Helpers is used globally by according applications.“Reserved Keyword” with the same content as “User keywords” folder in the Project folder – small reusable scripts. Utilities: Utilities are a warehouse to store scripts and other useful functions that are related to the application. Docn: Docn folder will have all the documents for the Framework. AppFolders: AppFolders for each application supported by the Framework holds the application specifics in a subfolder. The naming convention for the subfolder would be the name of the application (Eg, ABC) This subfolder

by default should have the following folders: • App.ini • TestTheseCases.xls • Test Scripts • User Keywords • Maps • Log Files Oneclick Testing Solutions (P) Ltd 28 Automation Framework App.ini App.ini application initialization folder will have the application URL, Domain List, Ref URL Email List can have a valid email address; after each execution, the results are sent to the email address that is specified. The following is the details of the items in the Appini file (1) A parameter (Domain) that specifies the URL address of the application to test i.e http://wwwoneclickcom (2) A parameter (Browser) that specifies the browser to test the application. i.e Internet Explorer (3) A parameter (realTimeMonitor) that specifies whether to set real time monitoring on or off. Real time monitoring is displayed via WinRunners PRINT command. (4) A parameter (verbose) to set verbose Yes or No Setting verbose to Yes displays all the steps executed for that test case

Setting verbose to No displays only the high level steps executed for that test case. (5) A parameter (stopOnCount) to determine after how many errors, the test case should be stopped Note: With the OnError feature incorporated into this release, the recommended setting for this parameter is any high number of errors not attainable for any test case. ie 300 (6) The type of report (ReportContent) to generate i.e Failures only, passes only or BOTH Only the BOTH feature has been implemented in this release “Failures only” can be implemented by sending a list of test case failures via email to concerned list of user(s). (7) Exceptions (testException) to test during the execution of the test case. The settings in the global1.ini file under the section startTestOver1 and startTestOver2 are tested and if met, the test case is repeated over. (8) A parameter (performMeasurement) to determine whether certain transactions that cause screens to change should be measured ( for performance

measurements) (9) A parameter (wordPadPath) that specifies the path of the wordpad file on the users workstation. Used to capture screen shots. Oneclick Testing Solutions (P) Ltd 29 Automation Framework The following is the example of the App.ini files: [URL] Domain=URL XDomain=URL Commenting the specific URL can support Mulitiple URLs for several environments at different times. This could be achieved by placing “X” in front of the URL. Browser =Internet Explorer (Browser is used for the script.) RealTimeMonitor =Yes - Print Log verbose =Yes stopOnCount =300 – after 300 errors the script will stop running. ReportContent =Both: (Pass/Fail test result in the Log File). TestException =Yes (Activates exception handling). PerformMeasurement =No (“Yes” option will input the time was run into Print Log). Email List = email of the automation specialist at csfb eg.:(pravininiyabothan@csfbcom) WordPadPath=C:Program FilesWindows NT AccessoriesWordpad.exe – path of

the WordPad location Could be on a different OS as well. WordPad is used to print screen on error and store the screenshot in the Log Files folder. TestTheseCases.xls TestTheseCases has four Columns: • Test case will have the file name of the test case that exists in test script folder. • Test Desc will have the description of the test case. • To run a particular test case, flag the row, which has the filename of that test case in the Test case column by placing an “X” at the start of the row. • Test ID is the unique number given to the test case for tracking defects while using testdirector. Oneclick Testing Solutions (P) Ltd 30 Automation Framework Table : High level test table Created by : Business user/Manual tester/Automation Specialist Purpose : Determines the test case(s) to be executed. Record format: TestFlag TEST CASE Test ID Test Desc An example follows: TestFlag TEST CASE Test Desc X F0 Userid and password test F1 Main Page test

F2 Portfolio Summary Test X TestScripts Test Script folder will contain all test script files created. A: Window B: Object C: Action D: Data E: ONERROR (Input of “Yes” will indicate that whole script will be skipped at this run). In the Framework approach we are either performing some actions in a particular windows with a particular object, which may involve object, or creating input of data in the same. Oneclick Testing Solutions (P) Ltd 31 Automation Framework Table : Intermediate and low level test table(s) Created by : Business user/Manual tester/Automation Specialist Automation specialist responsible for creating the low level test table(s) Purpose: Outlines the steps of the test case to be executed Record format: The intermediate and low level test tables representing the test cases are comprised of excel spreadsheet(s) with the following column layout: Window Object Action Data/Expected Value OnError Description: Column Description Window The window on

which to perform the action Object The object on which to perform the action Action The action to perform on the window and/or object Data/Expected Value The data to use for the step or the expected result of the previous step(s) [optional] Possible values: % - read data from a data file residing in the Data subdirectory %% - use the name of an internal variable to use as input data ?? – prompt user for data input OnError Determines if the test case should continue/halt upon the step failing - STOP indicates the test case should halt if the step fails - Any other value indicates test case should continue to Oneclick Testing Solutions (P) Ltd 32 Automation Framework next step regardless if current step fails/passes Intermediate table <F0>: Window Object Date/Expected Value Action OnError <Login> <VerifyMainPage> STOP <Logout> Low level table <Login>: OnError Window Object Action LoginPage UserIDTextbox InputText John

LoginPage PasswordTextBox InputText Doe LoginPage UserIDTextBox VerifyValue John LoginPage Enter Click Date/Expected Value STOP Low level table <VerifyMainPage>: Window Object OnError Action Date/Expected Value <verifyHeader> MainPage VerifyCaption CSFB Welcome MainPage VerifyText Welcome MainPage VerifyLink Help STOP Low level table <verifyHeader>: Window Object MainPage Oneclick Testing Solutions (P) Ltd 33 Action VerifyImage OnError Date/ExpecteValue CSFB Automation Framework Note how the record uses a vocabulary that can be processed by both man and machine. With minimal training, a human tester can be made to understand the 1st record instruction from the <Login> keyword as deciphered as the following On the LoginPage, in the UserIDTextbox, input the text "John". The 2nd record instruction from the keyword <VerifyMainPage> is deciphered as the following On the MainPage, verify the caption appears as

"CSFB". The list of action keywords constructed so far include two types. Those that are used to process at the window level and those that are used to process at the object level. Additional action keywords will be created as needed: Action Keywords Action keywords used at the window level: VERIFYCAPTION - verifies the caption appearing at the top of a window VERIFYTEXT - verifies existence of text VERIFYLINK - verifies link on a page VERIFYIMAGE - verifies images on a page VERIFYOBJECT - verifies object on a page VERIFYHTMLCODE - verifies the value of a HTML variable VERIFYSTATUSBAR - verifies status bar message MAXIMIZEWINDOW - Maximizes a window Oneclick Testing Solutions (P) Ltd 34 Automation Framework CLOSEWINDOW - Closes a window LAUNCHBROWSER - Opens the browser and launches the URL address CLOSEBROWSER - Closes all open browser windows WAIT - pauses the script for x seconds before proceeding Action keywords used at the object level: Edit

box INPUTTEXT VALIDATEVALUE VERIFYPROPERTY E – Enabled D - Disabled F – In Focus N – Not in Focus Link CLICK VALIDATELINK Click button CLICK VERIFYPROPERTY E - Enabled D – Disabled F – In Focus N – Not in Focus L – retrieved Button label Push button CLICK Oneclick Testing Solutions (P) Ltd 35 Automation Framework VERIFYPROPERTY E - Enabled D – Disabled F – In Focus N – Not in Focus Check button CLICK SELECT VERIFYPROPERTY E - Enabled D - Disabled F – In Focus N – Not in Focus OFF – Off state ? ON - On state ? Radio button CLICK SELECT VERIFYPROPERTY E – Enabled D - Disabled F – In Focus N – Not in Focus OFF – Off state ? ON - On state ? Combo box/ List box SELECT VALIDATEVALUE Default value Oneclick Testing Solutions (P) Ltd 36 Automation Framework V ERIFYPROPERTY E - Enabled D - Disabled N – Number of elements in combo box L - existence of element in combo box Oneclick Testing Solutions (P) Ltd 37 Automation Framework HTML File:

FILESET – Sets the name of a file VALIDATEVALUE – to be implemented User Keywords: UserKeyWords folder contains the Library of reusable scripts (application dependent); The format of the user keyword file is the same as that of the test script. The following is the template for the User Keywords See Section : Test Scripts A: Window B: Object C: Action D: Data E: ONERROR (Input of “Yes” will indicate that whole script will be skipped at this run). Window Object Action Data Login User Name inputText cv sdhup ONERROR For example: Login.xls In the Test Script we could call the key word file in the Window Column as <Login>. Window Object Action Data ONERROR <Login> The script will drilled down to the user keyword file and read the file from there. The biggest strength of the Framework the keyword files. It avoids duplications of test scripts Which in turn saves a lot of time Maps Maps have the GUI files. The naming convention for the GUI file is the name

of the application folder in the APPFOLDER. (For example, if the subfolder name is repo, then the GUI file will be repogui) Oneclick Testing Solutions (P) Ltd 38 Automation Framework Oneclick Testing Solutions (P) Ltd 39 Automation Framework Log Files: Log files keeps track of each run. Log file is an asset of this Framework After each run there is a sub folder that is created automatically in the Log Files folder. The naming convention for the subfolder is the date and time of the run. (Eg If a folder name is 05112005-113011 it means the script was run on May 11 2005 at 11hrs 30 minutes and 11 milliseconds.)This subfolder will have an error log file and a detailed log file The error log file will have list of the exceptions that are thrown in the run. The naming convention for the error log file is the same as the folder. (Eg if the folder name is 05112005-113011 the errorlogfile will have the name as 05112005-113011.log) The detailed log file will have a full trace of the

execution line by line for the test script will be printed out in the detailed log file. The detailed log file will also include the time taken for the script to run The naming convention for the detailed log file is the name of the test case. For example if 10 scripts are run at once, there will be 10 detailed log files. Every script that is run will have a detailed log file There will be only one error log file for every run no matter how many test cases are run. The exceptions will be cumulated in one error log file Excel spreadsheet: • MUST be a minimum of two (2) and a maximum of ninety-nine (99). The ninety-nine is a limitation of the WinRunner tool and represents the maximum level of recursive function calls TSL allows and which the web engine makes use of. • The first spreadsheet is the high level spreadsheet and contains the test case to execute and a brief description of the test. • The second spreadsheet is the Intermediate level spreadsheet and contains the

keyword(s) that drive the test case. • The third spreadsheet is referred to as the low level spreadsheet and contains the detail(s) of each keyword i.e window, object, action, data, onError In essence, the Intermediate and low level spreadsheet(s) are nothing more than a manual test case represented in five columns. We will refer to the first table as the high level table The 2nd table thru the (nth –1) table as the intermediate table and the nth (last table) as the low level table.To add flexibility, intermediate tables need not consist entirely of actions keywords. They can consist of a combination of action keywords and low level tables hence eliminating the need for the low level tables for some test cases. Oneclick Testing Solutions (P) Ltd 40 Automation Framework Overview – creating a test case: Oneclick Testing Solutions (P) Ltd 41 Automation Framework The process of the Framework script creation and execution. 1. Folder “Automation” can be created on

any drive and the content of the existing Automation folder should be copied there. 2. The subfolders of the AppFolders:Internal QA (Project) folder should be renamed to the appropriate project name (InternalProjectName). 3. oneclick(Project) folder should be renamed to the appropriate project name. 4. Excel file with the name of the project should be stored in the TestScripts folder and Data subfolder of the TeatScripts folder. 5. The appropriate header should be created in the Script and Data files. 6. Data file have an appropriate data if there is a data driven test will be executed. 7. If there is no data driven test needed, just header is present in the table. 8. Updates need to be done in following files: App.ini – located in Project subfolder of the AppFolders. 9. Global1.ini, Userconfigini – located in the Webengine 3 folder 10. The updates should be the following: 11. in Appini – URL, browser and e-mails 12. in Global1ini – Browser, AppList, URL,

environment 13. in Userconfigini – Application (APP), Selected Region, URL 14. These updates should be done under the supervision or by the Frame Work Administrator 15. Test script should be created and saved 16. The flag should be placed in the appropriate row of the TestTheseCases file (row with the name of the script to be executed). 17. StartTest opens in WinRunner Run from the Top Oneclick Testing Solutions (P) Ltd 42