automation testing 1

Document Sample
automation testing 1 Powered By Docstoc
					Class-1 Quick test professional 9.5 Introduction to automation Automation: Is a technology which is used to access the objects of one application from another application. It was developed by microsoft corp and can be implemented using any programming language(c,c++,vc++..) Or scripting language(vb script, jscript..) Disadvantages of manual testing: 1. It is a time consuming process 2. Requires lot of human resources 3. Less accurate 4. Not reusable 5. Exhaustive testing is not possible Advantages of automation testing: 1. Automation process is high speed 2. Components in automation are reusable. 3. Programmable: can generate comprehensive scripts to test a feature 4. Very accurate Disadvantages of automation testing: 1. Tools are expensive 2. Lack of skilled resources. Introduction to quick test professional: 1. Quick test is a functional regression test tool. 2. Is a product of hp(Hewlett-Packard) 3. Is a record and play back tool 4. It follows vb scripting. 5. It supports advanced keyword driven scripting. 6. It is an object based language 7. It is a desktop based application. Launching quick test: Start --> programs --> quick test professional --> quick test professional

Licenses in quick test professional: Quick test supports two types of licenses: A) seat license: is single user license B) site license: multi user pack Quick test supports following browsers: A) internet explorer(default browser) B) mozilla firefox C) netscape navigator D) opera E) aol Databases supported by quick test: A) ms access B) ms sqlserver C) oracle 4) mysql 5) sybase 6) db2 Architecture of quick test professional: Version in quick test professional: 5.5, 6.5, 8.0, 8.2, 9.0, 9.1, 9.2, 9.5 and 10.0 Addin manager: Is to display the list of addins available or supported and we can select the addin based on which the type of application are supported. Addin manager will be displayed at the start up, to configure addin manager; Navigation: Tools --> options --> general --> display addin manager at start up Default environments supported in quick test: A) standard windows B) vb C) active x D) web Additional addins supported: 1. .net framework 3.0 2. Java 3. Wpf 4. Web services Multimedia technologies:

5. Adobe 6. Flash Web technologies: 7. Xml 8. Html and dhtml Erps: 9. Sap 10. People soft 11. Oracle Crm: Oracle crm 12. Seibel crm Mainframes: 13. Terminal emulator From 9.5 14. Power builder Class-2 Record and run engine: Is responsible for generating the script during recording and is also responsible for executing the script during run. Test pane: Is where the script is displayed while recording or when generated manually. It is split into two components: A) keyword view: Is more of like gui, in the form of icons, which would be easy for the beginners to understand. It consists of 4 tabs: I) item: is the object on which the operation is performed. Ii) operation: is the action performed on the object Iii) value: is the input passed to an object while performing an operation. Iv) documentation: is the summary of the statement performed. B) expert view: Is like an editor in any other programming language, where the script is displayed in the form of vb script. Syntax: Classtype("logical name").operation "value" Note: any modification in keyword view will by default reflected in expert and vice versa Active screens: Is to capture the snapshots while recording.

Following operations can be reformed in active screens: A) insert checkpoints and output value B) generate step C) view/add object to object repository Note: Active screens will be captured only if the script is generated by recording. Datatable: Is a default object in quick test which is used to pass the inputs to the test or to capture the output from the test during run time. Navigation: View --> data table. Datatable is collection of sheets, by default there would be 2 sheets in data table. Sheets in data table are similar to the sheets in excel. Object repository: Is a centralized location to store the objects along with their properties. Quick test will identify the objects on the application under test by comparing the properties which are present in object repository during runtime. Navigation: Resources --> object repository Or Ctrl+r Repositories are of twp types: A) per action repository B) shared repository Recoveries: Recoveries are the exception handlers, which are used to handle the exceptions(un expected errors) in the test execution process which might cause damage to the test execution process. Navigation: Resources --> recovery scenario manager There are 4 types of triggers supported. A) popup window B) object state C) test run D) application crash Information pane: Is to display the statement(s) where there is a syntax problem. Navigation:

View --> information pane To check syntax in the script: Tools --> check syntax Or Ctrl+f7 Debug viewer: Is used to monitor the variables in debugging the script. Navigation: View --> debug viewer It consists of three tabs: A) watch B) variable Both are used to monitor the values passed to the variables in the test during runtime C) command: Is to pass the value to a variable in the test during runtime. Missing resources: Is to display the list of resources which are associated to a test and which are missing while loading the test into quick test. It displays the file name along with the path that it is associated. Test flow: Is to display all the types of actions associated to the test. Navigation: View --> test flow Resources: Will display the list of resources files associated to the current test. Resource files like; Library files Recovery scenarios Repository files Navigation: View --> resources Available keywords: Will display the list of keywords available in the test Keywords like; Test objects Local script function Library functions

Navigation: View --> available keywords Note: Test flow, resources and available keywords were introduced in 9.5 Record and run settings: Are the pre requisites in quick test professional, which should be configured before the record or run session begins. Navigation: Automation record and run settings There would be a tab displayed with two options in every tab for every environment that is selected in addin manager during the start up The default environment is windows Windows based: There would be two options: A) record and run on any open windows based applications: When selected quick test will record and run only on the applications which are already opened. We can also open the application during run using: I) systematic: Is a utility object using which we can launch any windows based application. Syntax: Systemutil.run "application path" Ii) invoke application: Is a built in function, which is also used to invoke there application. Syntax: Invoke application "application path" B) record and run only on: Applications opened by quick test Applications opened through windows list view When selected, we have to specify the path of the application, quick test will by default launch the application. We can specify one or more applications. Web based applications:

A) record and run on any open browser: When selected, quick test will record and run only on the browsers which are already opened or we can also open the browser using a utility object during run Systemutil: Syntax: Systemutil.run "application url" Note: System util will work with both window2s and web based applications but invoke application is supported only on windows based applications. B) record and run on: Specify the address(url) Select the browser(default : internet explorer) Ignore the browser already opened Close the browser after the test closes. When selected, quick test by default will launch the web based application. Recording: Is the process of generating a script based on the actions performed by the user on the application. In recording, quick test will generate and display the script in the test pane and will also capture the objects in object repository and snapshots in the active screens There are three types of recording modes supported in quick test: A) normal recording: Is otherwise called as context sensitive recording mode, it is a default recording mode and a preferred recording mode. Navigation: Automation --> record Or F3 In normal recording quick test will generate the script based on the window or screen area coordinates and every object is identified based on its class type and the operations are also captured based on their class type. B) analog recording mode: Is a high level recording mode, in which for the complete operation there would be only one line of statement generated. In this the script is generated based on the desktop coordinates Navigation: Automation --> analog recording

Or Shift+alt+f3 By default it is disabled and we can perform analog recording only when we start of with normal recording. Analog recording can be done in two ways: A) record analog on the following screen: When selected, the analog recording starts for the al the mouse clicks and keyboards events performed on the desktop. Syntax: Desktop.runanalog, "track1" B) record relative to the following window: When selected the analog recording is done only on the window selected Syntax: Window("logical name").run analog, track1 In this case there would be one object captured in object repository. Class-3 C) low level recording: Script is generated based on the window or screen area co ordinates but every object is identified as window or win object. Most of the operations captured are "type" Co-ordinates for the mouse clicks are also captured. Navigation: Automation --> low level recording Or Ctrl+shift+f3 By default low level recording is disabled, to perform low level recording, start off with normal recording and then select low level recording Low level recording can be preferred in two scenarios: A)to check the mouse clicks B) is preferred when an object is not identified by quick test. Ex: Window("login").win object("agent name:").type "edge" Run: Is the test execution process in quick test professional. Navigation: Automation --> run

Or F5 Quick test is s default compiler, will compile the script of any syntax errors and then executes the script. During run quick test will executes the script from first statement in first action and will be stopped after executing the last statement in last action. Stop: Is to terminate the test execution process and also to stop the recording process Navigation: Automation --> stop Test results: Result is the summary of the test execution process in quick test. Quick test will capture the summary for a test executed every time. During run, quick test will display the run settings, where the test results should be stored A) specified path: When selected, we can specify the path of the results. B) temporary location: When selected, quick test will store the result in a temporary location. The file extension for the test results is ".xml" Navigation:(to view the last run results) Automation --> results Configuration to display the results page after every test run: Tools --> options --> run --> view result at the end of test run Test result page is divided into two components: A) results details: Result details page will capture the complete summary of the test, runtime data table and the actions summary. It also captures the test run start time, end time and also capture the details execution process of the every action. A test in quick test can have 4 different status: I) done: is the default test status, when a test is successfully executed without any failures in object identification or with out any checkpoints or control statements inserted. Ii) passed: when a test is executed successfully with all the checkpoints and control statements ended in pass state.

Iii)failed: test execution terminated in between due to the objects on the application or any control statement or checkpoint inserted is not executed successfully Iv) warnings: are the messages displayed when there is a delay in identifying an object by quick test. Warnings can be ignored. Configuring the images to be captured in results summary: Navigation: Tools --> options --> run --> capture still images The images can be captured in three scenarios: I)when selected, the images would be captured for every statement executed. Ii) for errors: when selected, the images would be captured only for errors in the test execution process Iii) for errors and warnings: when selected, the images would be captured only for both errors and warnings in the test execution. Screen recorder: Is to capture the movie file for the test run. Navigation to configure: Tools --> options --> run --> save movie to file We can capture the movie file in following scenarios: A) always: not preferred as the size of the movie file might be very huge, when selected the entire run will be captured. B) for errors: When selected e have to specify the size of the of the movie segment to be captured. C) for errors and warnings: Movie's captured only for errors and warnings The movie file can sent as an attachment with the defect report. The file will be saved with file extension ".fbr"(flash back recorder) Navigation: File --> export movie to file B) screen recorder: Class-4 Script structure: Test generated in quick test can be stored in 2 locations: A) windows folder(drives: c:,d:,e:...)

When a test is saved, there would be a folder created with the name specified and in that following things are saved: I) script Ii) repository files Iii) active screens Iv) data table V) test results(optional) There would be a folder created for every action in type test along with a root folder called "action 0" Every action folder consists of script file, repository file and active screens. The file extension for repository file is ".mtr"(mercury test repository) The file extension for script file is "mts"(mercury test script) Object repository: Object: is a component or element on a screen or a window or window by itself is considered to be an object Properties: The characteristics of an object. Every object will have their own set of properties associated based on the environment they are created. Ex: class name, abs_x, asb_y, x, y, enabled, focused, height, width, window id, text, attached text, is child window, is owned window, innertext, inner html..... Object repostiory is a collection of objects along with their characteristics/properties. Navigation: Resources --> object repository Or Ctrl+r Quick test will identify the object on the application(aut) during runtime based on the properties associated with that object in object repository. The objects in object repository are captured in 2 scenarios A) while recording B) by adding manually Following things are captured for every object in object repository: Logical name of the object Class type Repository type and

Description properties There are two types of objects: A) test objects: an object present in object repository at any instance and in any type of repository is called as test object B) runtime object: an object present on the application(aut) during runtime/test execution is called as runtime object. Adding object to object repository: The objects in object repository can be added in 2 scenarios: A) from object repository: Addin objects to object repository is preferred when the recording is available. We can add objects to object repository only if the application is available. Quick test will reduce the efforts in generating the script if the objects are present in object repository, we can generate the script by drag and drop on the test pane. The objects that are present in object repository are called as keywords which will be available in the available keywords pane. Navigation: In "o.r" Object --> add objects to local We can add two types of objects: I) child object: an object present in another object When we add a child object, if the object's parent is not available in "o.r", the quick test will add both the selected object along with its parent if not it will append to the parent already existing. Ii) parent object: When a parent object is added the following filter options will be displayed: I) selected object only(no descendants): When selected, only the selected object will be added Ii) default objects: when selected, the objects on which we perform operations will be added. Iii) all object types: when selected all the object present in that screen or window will be added Iv) selected object types: when selected, we have specified the type of the object by selecting the class type checkbox. B) from active screens:

We can also add objects to object repository from active screens, but this can be done only if the script is recorded. This might be useful, when we need to add one or more objects to object repository, which were not captured into object repository while recording. Implementation: After recording, got active screens, right click on th obejct and select "vie/add object", the object selection window will be displayed, click ok, the properties of the object will be displayed with "add to repository", if the object is not available in object repository else, "view in repository" option would be displayed. Update from application: Is to update the property(s) orf or more objects from the application to object repository if the properties are changed. Navigation: In "o.r" Object --> update from application Locate in repository: Is to locate an object in object repository. Navigation: In "o.r" View --> locate in repository Highlight in application: Is to blink(highlight) the object on the application. The above two can be used in identifying an object if there is no unique logical name created or if there is large number of objects in object repository. Define new test object: This is an useful feature in quick test to create a new test object. This can be done if the application not available for generating a script by recording or by adding objects to object repository Navigation: In "o.r" Object --> define new test object We have to specify the following things while defining a new test object: A) select the environment B) specify the logical name C) select the class type of the object D) describe the properties of the object Object repository types: There are two types of object repositories:

A) per action repository: A repository file associated with every action in a test. The object present in peraction repository file is non reusable. The objects in a peraction repository file are considered as local objects and they are captured while recording or manually adding the objects Peraction repository file is saved along with the test with the file extension ".mtr"(mercury test repository) Shared repository: Is an external repository file, which consists of the reusable objects and the objects in shared repository are considered as "external objects" Objects in shared repository file can be accessed in any action of any test. The file extension of a shared repository file is ".mtr"(mercury test repository) Creating a shared repository file: We can create a shared repository file in 2 ways: A) export local objects: When performed a shared repository file will be created with the complete set of the objects present in the local repository and the object in local repository will also be available. Navigation: In o.r File --> export local objects B) export and replace local objects: When performed all the objects present in local repository are exported to a shared repository and the local objects will be replaced with the external objects of the shared repository file. Navigation: "in o.r" File --> export and replace local objects Associating a shared repository file: The objects in a shared repository file can be associated to any action in any test. There can be one or more shared repositories associated to one or more actions at one instance. Association can be done in three ways: A) from object repository: Navigation:

"in o.r" Tools --> associate repositories When selected, browse window will be displayed, browse and select the file, the list of available actions will be displayed, select one or more actions and move to associated actions Advantage: We can associate one or more repositories to one or more actions in a test at one instance. B) from action properties: Navigation: Edit --> action --> action properties --> associate repositories When selected, the browse option will be displayed, browse and select the file(s) and click ok. Advantage: We can set the associated repository(s) as default to the action. C) repositories object: Is a utility object used to associate the shared repositories, using the "add" method with the utility object we can associate the shared repositories. In this case the repositories are loaded only during test execution and the scope of the repositories is also only till the test execution. Syntax: Repositories collection.add "file path" Note: The external objects which are associated to an action cannot be modified or deleted, they are non editable, if we have to make any changes then right click on the object and select copy to local. Any modifications on the converted local object will not be reflected in the shared repository file. Object repository manager: Is the feature introduced in 9.0 of quick test pro. It consists of following tools and features: A) enable editing B) object repository comparison tool C) object repository merge tool Navigation: Resources --> object repository manager

Enable editing: Is to enable the editing option in or manager, to modify or add or delete the objects or properties of an object in a shared repository file. Implementation: Open the shared repository file in or manager and select "enable editing" and after the changes, click on save Class-5 Object repository comparison tool: Is a tool present in object repository manager, used to make a comparison between two shared repository files. Navigation: In o.r manager: Tools --> object repository comparison tool At one instance we can merge two shared repository files Comparison is done to under the list of objects that are present in two shared repository files. After the comparison, the following statistics would be displayed: A)unique objects in first and second file. B) identical(similar) objects in both the files. C) test object same D) two objects with same name but different Description. B) object repository merger tool: Is to merge the objects in 2 shared repository files. With the statistics after the comparison, we get know that whether the repository files have to be merged or not. When two files merged, the unique objects of both the files are added with their file name and the identical objects are captured only once(no redundancy) Navigation: In o.r manager: Tools --> object repository merge tool At one instance we can merge only 2 files. After the merge, we can save the result file and it will be saved as a shared repository with ".tsr", extension. Object identification:

Base filter properties:

First quick test will try to invoke the properties that are set in base filter and will try to identify the object uniquely. Optional filter: If the quick test is unable to identify the object uniquely with the base filter, looks for the properties configured in optional filter. Smart mechanism will be invoked only during runtime And the complete description will be captured and displayed in the results page, post execution. Ordinal identifier: This is final level of configuration for identifying an object. If quick test is unable to identify and object uniquely with mandatory, assistive, smart identification then it looks for ordinal identifier. The ordinal identifier will be captured by default with the smart identification in object repository. In this there are two types of properties for all the objects except browser in web based applications A) location: Specifies the placement of the object on the window or frame or page. The location is set for all the similar types of an object. Its value starts from 0,1,2,3.... B) index: Is like the identification number for all the similar types of the objects. It also starts from 0,1,2,3..... C) creation time: Is the unique identifier captured for only the browser objects, it also starts with 0,1,2,3.... The first browser opened will have the creation time as 0, next one will have 1 and soon.. Class-6 Vb script: Is a scripting language developed by microsoft. Vbscript is not case sensitive. Variable: Is a memory allocated to store some information or data A variable in script is used to pass the input to the script or to capture the output from the script. A variable declared can be redefined at any stage in the program.

A variable in vbscript can store data of any size. Standards to be followed, for the variables: A) all the variables should be declared at the start of the program or test. B) every variable should be prefixed with the type of data it is used to store. C) variable declaration should start with an alphabetic character. D) a variable name should not exceed 255 characters. Data type: A variable in vb script can store any type of data, there is no specific tintype for a variable, by default any variable is considered to be "variant". Variant is the data type that stores any type of data. There are two types of variables: A) scalar variable: A variable which can store only one value at one instance. B) array variable: Is a collection of data, an array in vb script can store any type of data. An array should be declared with its size and the index of an array starts with "0" Syntax: Array(size) Dim: Is dimension, is to declare multiple variables in one statement without assigning any value. Ex: Dim var1, var2... Redim: Is to redefien the size of an array Syntax: Redim array(size) Input statements: Statements used to pass the inputs to the script through a variable dynamically during runtime.

Input box when implemented, will display a popup with a text box to accept the value along with ok and cancel buttons. Syntax: Return type=input box("description")

Output statements: Used to capture the result/output from the script during test execution. There are two types of statements: A) message box: Will display a pop up, which will hault the test execution process until it is handled. Syntax: Msgbox variable/value B) print: Is to capture the output from the script during test execution. Print will capture and display the input in a print log and will not hault the test execution process and the log will be present even after the test execution. Syntax: Print variable/value Option explicit: Is a statement used in vb script, which will make it mandatory to define all the variables used in the script using one of the following statements. Dim/public/private It is prescribed to have option explicit as the first statement in any script. Built in functions: String functions: 1) string concatenate: Is to merge two or more strings(sub strings) into own string Syntax: Return type=string1&string2 2) string reverse: Is to reverse a given string. Syntax: Return type=strreverse 3) space: Is to insert space between two strings, generally used while concatenating two or more stings. Space function should always be specified with the number of spaces inserted. Syntax: Space(number of space)

4) ucase: Is to convert a string into upper case alphabets. Syntax: Ucase(string) 5) lcase: Is to convert a string into lowercase alphabets Syntax: Lcase(string) 6) trim: Is to ignore the space on both the sides of a given string Syntax: Trim9string) 7) ltrim: Is to ignore the space on the left hand side of a given string Syntax: Ltrim(string) 8) rtrim: Is to ignore the spaces on the right hand side of a given string Syntax: Rtrim(string) 9) length: Is to get the length of a given string. Space in the string is also considered as a character. Syntax: Len(string) 10) asc: Is to get the ascii character of an alphabet or a special character Syntax: Asc("alphabet") 11) string compare: This can be done two ways: A) using a built in string function: When performed the comparison is done in the ascii format by fetchng the ascii value of every character. The return can be three values

If both the strings are equal the return value is "0" If the first string is greater than the second the return value is "1" else the return value is "-1" Syntax: Strcomp(str1,str2) B) we can also compare two strings in a control statement, the return value would be Boolean, i.e. "true" or "false" 12. Left: Is to get a portion of a text or a sub string from the left hand side of a given string We have to specify the length from the left hand side of the string Syntax: Left(string, length) 13. Right: Is to get a portion of a text or sub-string from right hand side of the given string Syntax: Right(string, length) 14. Mid: Is to get a portion of text from a given string. In this we have to specify the start position and length from the start position. Syntax: Mid(string, start position, length from the start position) 15. Split: Is to split a given string into multiple sub strings. To split, we have to specify a delimiter Syntax: Split(string,"delimeter") When a string is split, the return variable which stores the substrings, will become an array. 16.ubound: Is to get the upper bound of an array Syntax: Ubount(array) 17. Cint: Is to convert a value into integer value Syntax: Cint(variable) 18. Cdbl:

Is to convert a value into double Syntax: Cdbl(variable) 19. Cstr: Is to convert a value in a variable into string. Syntax: Cstr(variable) 20. Cdate: Is to convert the given date into vb date format(mm/dd/yyyy) Syntax: Cdate(date) 21. Date: Is to get the current system's date Syntax: Date 22. Time: Is to get the current system's time Syntax: Time 23. Now: Is to get both date and time of the current system Syntax: Now 24) date add: Is to add some interval in the given date, we have to specify the interval and the number which should be added to a given date Syntax: Date add("interval",number,date) 25) date part: Is to get the portion of a date, we have to specify the interval and the date Syntax: Date part("interval",date) 26) datediff: Is to get the difference between two dates, we have to specify the inteval and two dates Syntax: Datediff("interval",date1,date2)

Control statements: Control statements are of two types: A) conditional statements: Statements used to check the conditions in the given script. This can be implemented using two types of statements: I) if Ii) select case If statements: An if block can have one or multiple conditions to be checked. In if statements only only block of script is executed based on the condition. There are three kinds of if statements: Simple if: There would be only one block of statements, and those statements would be executed only if the condition is satisfied Syntax: If condition then Statement..1 Statement..2 Statements End if If then else: In this we have two block of statements, if the condition is satisfied then one block is executed else another block is executed Syntax: If condition then Statement..1 Statement..2 Statements Else Statement...1 Statement...n End if Else if: A control statement with multiple blocks to be executed. Syntax: If condition then Statement..1 Statement..2 Statements Else if condition then Statement...1

Statement...n Else if condition then Statement...1 Statement...n End if End if End if Looping statements: Statements implemented to perform iterations based on the condition. There are two kinds of such statements: A) for B) while For: is a loop which is performing the iterations based on the condition(until the condition is satisfied) There are three types of for loops: Simple for: A single for loop for the entire test or program Syntax: For initialization to condition increment/decrement Statement..1 Next Concatenated for: Having multiple independent for loops in a program or a test Nested for loop: Having loop within a loop, in this first the inner most loop is executed and then the outer loop is executed. Reporter events: Is a utility object default supported by quick test, which are used to configure or customize the test results. There are 4 classes which are prefixed with "mic"(microsoft integer conversion class) Micpass, micfail, micwarnings and micdone In configuring the report, we have to specify the objects and the details(summary) Reporter events are most used in the control statements in the script. Syntax: Reporter.reportevent micclass, "object", "details" Properties supported for a list/menu/combo box:

1. Get item: Is to get an item from the combo or a list box We have to specify the item number(index), the index starts from "0" Syntax: Return type=object class("name").get item(number) 2. Getitemscount: Is to get the count of items from a combo or list box. Syntax: Return type=object class("name").getitemscount 3. Getcontent: Is the total content present in a combo or a list box Syntax: Return type=object class("name").getcontent Class-7 Object methods: Test object methods: These methods are used to work with only the test objects(objects present in object repository) during test execution. A) gettoproperty: Is to get the property value of an o bject present in object repository during test execution. Syntax: Return type=object class("logical name").gettoproperty("property name") B) gettoproperties: Is to get the collection of property values of an object associated with an object in object repository during runtime. We have to specify the set statement for the return type and we have to access the property value by specifing the property name. Syntax: Set return type=class type("logical name").gettoproperties C) settoproperty: Is to set the property value of an object in object repository during runtime. The scope of that will be only till the end of that test execution, the property value will not pbe changed permanently. While setting a property, we have to specify the property name and property value of the object Syntax: Classtype("logical name").settoproperty "property name", "property value"

Ex: Dialog("login").winedit("agent name:").settoproperty "attached text","agent name:" Runtime object methods: Runtime obejcts are the objects present on the application(aut). A) getroproperty: Is to get the property value of an object during runtime, present on the application. Syntax: Class type("logical name").getroproperty("property name") B) getvisible text: Is used to capture the text displayed on the object during runtime. Syntax: Return type=classtype("logical name").getvisible text() Datatable: Is an object in quick test professional. It is used to pass the inputs to the script and to capture the output from the script. Navigation: View --> datatable Datatable looks like an excel workbook, with rows and columns. By default there will be two sheets in a datatale. Global and local Globalsheet: Is a generic sheet which, data in global sheet might reflect in all the actions. Global sheet is generally not preferred. Local sheet is specific to action. There can be a max of 256 sheets, one global and 255 local sheets There are two types of datatables: A) design time datatable: A datatable associated with the test before and after test execution. The design time datatable is converted to runtime datatable assoon as the test execution starts. Datasheet in desing time datatable is created when an action is created and deleted when an action is deleted, the name of the sheet is reflected based on the action name to which is it is associated. B) runtime datatable:

Datatable associated with the test during test execution and which is present in results after the test execution. Datatable methods: Methods which are used to manipulate the data and is to work with the sheets in runtime datatable. 1. Addsheet: Is to add a new sheet to the runtime datatable iduring test execution. Syntax: Datatable.addsheet("demo") Any sheet created will be appended at the end of datatable. We can refere the sheet in datatable with the name of the sheet or by it's id/index. Data sheet's index starts from 1.... 2. Deletesheet: Is to delete a sheet from runtime datatable. Syntax: Datatable.deletesheet("sheet id") 3. Sheet count: Is to get the count of sheets present in the runtime datatable in that instance. Syntax: Return type=datatable.getsheetcount 4. Value: Is to fetch aswell as write the data to datatable during runtime.in this we have to speficy the parameter id and sheet id. Parameter id is the column name in the sheet. Syntax for fetching: Return type=datatable.value("parameter id","sheet id") Syntax for writting: Datatable.value("parameter id","sheet id")=variable/value Note: .value is optional Data in all rows of global will be fetched by default in a sequential order starting from the first row but to fetch the data from any local sheet we have to insert a loop by setting the focus to required row. 5. Getsheet: Is to set the focus to a specific sheet. This is always used the combination of one more method.

Syntax: Datatable.getsheet("sheet id") 6. Rowcount: Is to get the count of number of rows in which there is data in a specific sheet. Syntax: Return type=datratable.getsheet("sheet id").getrowcount This method is often used in performing datadriven testing. The number of iterations to be performed is identified based on the number of records that are present in that sheet. 7. Setcurrent row: Is to set the focus to a row number specified. Syntax: Datatable.setcurrentrow(rownumber) 8. Setnextrow: Is to set the focus to next row in the current sheet while fetching or writing the data Syntax: Datatable.setnextrow 9. Set previous row: Is to set the focus to previous row, it sets the previous row based on the current focus in data sheet. Syntax: Datatable.setprevrow 10. Export: Is to export all the sheets into an excel file in a specified location. Syntax: Datatable.export "file name" 11. Import: Is to import the data present in all the sheets in an excel file to the datatable. Syntax: Datatable.import "file name" Note: In import data will be accomadated only with the number of sheets available in datatable. In export or eport sheet, if the excel file is not available in the specified location, then quick test will create a sheet 12. Import sheet:

Is to import the data from a specific sheet in an excel file to a specific sheet in runtime datatable. In this we have to specify the source sheet(sheet id in excel) and the destination sheet(sheet id in runtime datatable) Syntax: Datatable.importsheet "file name", "source sheet", "destination sheet" 13. Export sheet: Is to export a specific sheet along with the data to an excel sheet from the runtime datatable. If the sheet is slready present in the excel file then the data will be appended and if the sheet is not present then a sheet is created and exported and if the file isnot present then quick test will create a file and then export. Syntax: Datatable.exportsheet "file name", source sheet 14. Rawvalue: It is to get the raw value in a specific cell in a sheet during runtime Syntax: Return type=datatable.rawvalue(parameterid, sheet id) 15. Add parameter: Parameter: is the column name in a sheet, in datatable. We add the column name to a sheet during runtime. In this we have to get the sheet and specify the column name and the value tobe inserted. Syntax: Datatable.getsheet(sheetid).addparameter "parameter name", "value" Or Return type=datatable.getsheet(sheetid).addparameter ("parameter name", "value").value Or Return type=datatable.getsheet(sheetid).addparameter ("parameter name", "value").name Class-8 Parameterization: Is the process of replacing the hadr coded values/constants with the the variables or parameter values. Parameterization will reduce the efforts in maintiaing the test data or input provided to the script and also to maintain the output from the script. Parameterization can be effectively addressed in three scenarios:

A) data driven testing B) environment variables C) action parameters Data driven testing: Is otherwise called as iterative testing, when the same set of satatements or program is executed with multiple combinations of inputs. This can be performed in two scenarios: A) data driver: Data driver is the wizard(feature) in quick test professional using which we can replace the constants with the parameters and can perform iterative testing Navigation: Tools --> data driver Implementation: In data driver, the data can be parameterized in 2 ways: I) step by step parameterization: When selected, will display the hierarchy of the object to which the data is passed, in configure value, click modify and modify the parameter name(sheet name) and select the location(global or local) and click finish. The constant will be "0" and the parameter will be "1". Ii) parameterize all: When selected, the configure value will be enabled, select the location and click finish. After parameterization, the constants in the script will be replaced with the parameter values and the constant will be first value in the datasheet to which it is parameterized. Syntax for globalsheet: Datatable ("parameter name", dtglobalsheet) Syntax for localsheet: Datatable ("parameter name", dtlocalsheet) Note: Ddt internal from datatable is not preferred as the data or input generated is confined to only that test and the data cannot be called or reused in any other test. B) external sources: We can effeclty address ddt from external sources like I) ms-excel: Excel is the most preferred way of performing ddt as the datat can be easily migrated to the test during runtime and it is easy to maintain the data as we can store the data in spread sheet in rows and columns. Generally in the script we create a sheet during runtime and import the data from excel to runtime datatable and then access it to the script.

Script1: Generate a script to perform insert order and generate the reporter event for every record inserted and perform ddt, by fetching the data from excel into runtime datasheet. Class-9 Working with file system objects: In order to work with file system objects from quick test professional we have to create an object. Create object: Is the function used to create objects to work with the file system objects. Scripting.filesystemobject: Is the object class which has to be specified while creating an object, to work with any file systyem object Syntax: Set object=createobject("scripting.filesystemobject") Following operations can be performed in filesystem, using the object created. A) create and delete folders: We can create one or more folders and we can also delete them. Syntax: object.createfolder "folder name" Syntax for deleting a folder: object.deletefolder "folder name" Syntax for creating a file: Object.createtextfile "file name.extension" Syntax for deleting a file: Object.deletefile "filename.extension" Working with databases: To work with any database, we have to firt cereate a connection object to establish the connection to any type of database Syntax: Set object=createobject("object class") Ex: Set con=createobject("adodb.connection") Adodb: activex data object database With the connection object we can establish connection to any database by specifying the provider details of that database.

Provider info for ms access: Connectionobject.open "provider=microsoft.jet.oledb.4.0;data source=databasename" Oledb=object linking and embbeding Provider info for ms sql server: Connectionobject.open "provider=sqloledb.1;server=servername;uid=username;pwd=password;database=datab ase name" Provider info for oracle: Connectionobject.open "provider=microsoft odbc fororacle;uid=username;pwd=password;database=database name"

Recordset object: Is a database object used to perform the select operations in the database(to fetch the records from any database throught script) Syntax for recordset object: Set recordsetobject=createobject("adodb.recordset") Syntax to execute the query using recordset object: Recordsetobject.open "select query",connection object When the above query is executed in the connection object, all the records fetched will be stored in the recordset object Following are the operations performed in the recordset object: Movefirst: Is to set the focus to the first record in the recordset object. Syntax: Recordset object.moverfirst Movenext: Is to set the focus to next record in the recordset object Syntax: Recordsetobject.movenext Reading the values from record set: We can read the values from recordset by specifying the fields or by specifying the index. The index in recordset starts from "0" Syntax: Recordsetobject("fields") Or Recordsetobject(index)

Close: Is to close the recordset and connection objects Syntax: Recordsetobject.close Connectionobject.close Command object: Is used to perform both dml and ddl operations in any database, through script. First there should a connection established and the queries should be executed using command object in connection object. Syntax for creatign a command object: Set commandobject=createobject("adodb.command") Commandobject.activeconnection=conectionobject Syntax to specify the sql query: Commandobject.commandtext="query" Syntax to execute the query: Commandobject.execute Class-10 Environment variables: Environment is a built in object. Environment variables are of two types: A) built in: Are the set of predefined variables which are associated with every test and can be accessed in any action. Built in environment variables: Actionname, action iteration, test name, os, os version, localhostname, group name... We can access the values associated with the environment variables by specifying it's property name. Syntax: Return type=environment.value("variable name") B) user defined: These are the variables which are created/defined by the user. User defined environment variables are reusable. Note: local script variables are confined to one action. User defined environment variables are of 2 types: I) internal:

Variables created by the user. These variables can be accessed in any action of one test, they are confined to the same test, cannot be reused in any other test. Navigation: File --> settings --> environment --> user defined Creating an user defined environment variable: Goto file, settings, environment, user defined and click "add new", a pop up will be displayed, specify the name and the value. We can also assign the value for an environment variable during runtime Syntax: Environment.value("variable name")=value/variable Accessing the environment variable during runtime: Syntax: Return type=environment.value("variable name") External environment variables: The user defined variables which are created and stored in the external sources and which can be accessd in any action of any test by assosiating the file. These can be created in the following sources: A) xml(extensible markup language): Open a notepad and save it with file extension ".xml" Creating an environment variable in xml file: Syntax: <environment> <variable> <name>variable name</name> <value>value</value> </variable> </environment> We can have any number of environment variables in a single file. Xml file when opene3d, will be opened in a browser. The variables are non editable when opened in a browser. it is preferred to have environment variables in an xml format, as they cannot be modified when opened. B) text file: We can also create environment variables in a text file.

Syntax for creating variables in text file: [environment] Variable1= value Variable2= value " Variablen= value C) initialization file: It is configuration file, which is created with file extension ".ini" The variables in initialization files are also created in the same manner that of a text file. Note: We can also create external environment variables by exporting the local variables from user defined in environment. When exported, the variables will be saved in a file with extension ".xml", by default Navigation: File --> settings --> environment --> user defined --> export local variables to file. Assosiating an external environment variable file to the test: Wer can associate the external environment variable file to test in two ways: A) file;settings: Navigation: File --> settings --> environment --> user defined --> load variables and values from file B) throught script: Syntax: Environment.loadfromfile "file path" Note: The environment variables in the external file are non editable. Action: An action is a bloxk/set of statements in a test, it is a component within a test in quick test. There can be any number of actions in a single test in quick test. There would be one action associated with a test by default with a name called "action 1" Every action will have a datasheet in datatable and a repository fiel in object repository. Actions are reusable.

Creating an action: Navigation: Insert --> call to new action When an action is created, the repository file along with a sheet in datatable are crated with the same name that of the action. By default every action is a reusable action from 9.5 There are three types of actions: A) reusable action B) normal action C) external action During run, all the actions are executed sequentially, one after the other based on their creation. When ever an action is created there would be a data sheet and repository file created with the same action name. We can create two types of actions: A) independent action: An action which is not dependent on any other action and will be created/appened at the end of the actions list in the test. This can be done by selecting: "at the end of the test", while creating an action. B) nested action: An action within an another action is called as nested. We can create that be selecting: "after the current step", while creating an action. The newly created action becomes nested(stub) to the current action, in the current action, there would be a driver script generated. Driver script: Runaction "action name", oneiteration Delete action: Is to delete an action from the action list in atest, when an action is deleted, the data sheet, per action repository file associated to that action are also deleted Note: There should be atleast one action in every test. Navigation: Edit --> action --> delete action

Rename action: Is to change the name of a given action: Navigation: Edit --> action --> rename action Note: When atest is saved, there would be a folder created to every action and a driver script generated to every independent action in the script file of the root foleder (action 0) Manipulating the order of execution of actions in a given test: We can manipulate the order of execution of actions in 2 ways: A) keyword view: In keyword view drg and drop the action in which they have to be excuted. B) from action 0 folder: In the root folder(action 0), open the script file and change the order of the driver scripts for the actions in which they have to be executed. Execution selected actions: In a given list of actions in atest, we can execute the selected actions by commenting the driver script for the action(s) which should be executed. Comment is done by specifying single quote(') at the beginning of the driver script in the root folder(action 0) of the test. Executing only the selected action: This can be done by selecting the action and performing "run current action" Navigation: Automation --> run current action Split action: Is to split a complex action into two actions Navigation: Edit -->a ction --> split action This will improve the reusability of the actions. We have to save the test before splitting an action. An action can be split in two ways: A) independent action: Implementation: Place the cusrsor from whwre the action has to be split and goto edit, action and split action, select "independent action" and specify the names and descript6ions(optional) to the actions and click ok.

Note: 1) at a given instance we can split one action only into two. 2) when an action is split, there would be a sheet and object repository created for both the actions. 3) after the split both the actions will have all the data in the sheet if any and the objects in object repository. B) nested action: When selected, the first action will become the parent to the second and the second will be the nested action. There would be a driver script generated at the end of the first action for it's nested action Syntax: Runaction "action name", one iteration Note: the nested action is executed only if the driver script in the parent action is executed. Class-11 Action methods: Methods used to reuse the actions. There are three methods: A) call to copy of action B) call to existing action C) call to winrunner action Call to copy of action: Is to reuse an action from another of action of the same test or another test. Navigation: Insert call to copy of action 1) call to copy can be performed on both normal and reusable actions 2) the called action is considered to be stub, and the callin action is considered to be driver, there would be a driver script generated in the calling action Syntax: Runaction copy of action name oneiteration 3. One action can be called any number of times using call to copy of action, every time the driver script is generated and the script of called action is dumped into the calling test. 4. An action is considered as reusable action, when called. 5. The script in called action will be editable when called Call to existing action:

Is to reuse action from another action of same or different test. Navigation: Insert --> call to existing action 1.an action can be called using call to exisitng only if the action is a reusable action. 2. When an action is called, there would be a driver scipt generated in the caling action. Syntax: Runaction actionname[test name], oneiteration 3. The script of called action is dumped only once, when called, and the script in called action will be non editable. 4. The called action will be considered as external action in the calling test. Call to winrunner action: Is to call the winrunner script from quick test professional. Navigation: Insert --> call to winrunner test When called, quick test will launch winrunner, load the test and executes the test. Action properties: Are the characteristics of an action in a test. There are three tabs in the action properties: A) general B) action parameters C) associate repositories General: Is to rename the action, specify or modify the action description and to conevrt a normal into reusable action and vice versa. Navigation: Edit --> action --> action roperties Action parameters: Parameters are used to capture the output and pass the input into the actions. There are two types of parameters associated with every action I) output parameter: Used to captured the putput of the current action Ii) input paramters: Used to pass the input to the current action

For every parameter we have to specify the parameter name and the type of the data that it holds A parameter variable in the script is specified with the parameter keyword with the name of the parameter enclosed in double quotes Syntax: Parameter("name") Parameters can be set in different ways for the action of same test and different tests. Parameters for the actions in different test: For this we need not set the output parameters, we can pass the parameters along with the driver script, with a delimiter "," Syntax: Run action copy of action name, oneiteration,parameter1, parameter2... Implementation: Generate a script for open and update order and replace the constant of order number with parameter variable(ex: parameter("var1")) and got edit, action, parameters, in input parameters, crea the same variable(ex: var1) with data type as any and click ok. Open a new test and generate a script for insert order and capture the order number generated and call the "open order script" using "call to copy" or "call to existing" and pass the order number captured as parameter to the driver script. Parameters for the actions same test: For this we require both input output parameters. Implementation: In a test create two actions, in the first action generate a script for insert order and capture the order nunber generated and assign it to a paramter variable(ex: parameter("var1")) and goto edit, action, parameters and in output parameters specify the same variable(ex: var1), with the type as number. Goto second action and generate a script for open and update order and replace the order number constant with the parameter variable(ex: parameter("var2")), goto edit, action, parameters and under input parameters, specify the same parameter variable(var2) and specify the dattype as any and click ok. Goto keyword view and right click on the first action and select "action call properties", select parameters, under output parameters specify a variable in "store in"(ex:a), right click on the second action and select "action call properties", select parameters, under input parameters, under "value" specify the same variable(ex:a) and click ok Web testing:

For any web absed applications, the parent object object is browser and in browser, there would be page and in page we have elements. Ex: Browser("browser name").page("page name").webedit("id").set "edge" Webtable: Is a table which is embedded in a page of any web based application. A webtable, will be similar to the datatable in quick test or a table in database or like an excel sheet with rows and columns Note: the columns in every row need not be consistent in a web table. Following are the methods working with a web table: A) rowcount: Is to get the count of row in a table present on a page. Syntax: Return type=classtype("logical name").rowcount B) column count: Is to get the number of columns in a specific row. Syntax: Return type=classtype("logical name").coloumncount(row number) C) getcell data: Is to get the data present in a specific cell A cell is the intersection of row and column. Syntax:returntype=classtype("logical name").getcelldata(row,column) D)child itemscount: Child item, is an item present in a specific cell in webtable. Child items count is to get the count of items present in a given cell Syntax: Return type=classtype("logical name").childitemscount(row,column,micclass) E) child item: Is the method in quick test to work with the item(s) present in a specific cell We have to create an object by specifying the class name of the object and it's index Index for child items starts with "0" Class name for web based objects are specified using "micclass"(mercury interactive content class) Syntax: Set object=classtype("logical name").childitem(row,column,micclass,index) Child objects:

A child object is an object that is present in any other object(an object in a screen or a window or a page) Chuldobjects, is the method used to get the collection of the similar types of objects present in ascreen or a window or a page To get the collection of similar types of objects, we have to create an object using description.create Descreption.create: Is the method used to create an object reference for a test object Syntax: Set object=description.create Object("property name").value="property value" Note: for child objects, the property name should be the "class name" or "micclass" in windows based applications, for web based applications it is only "micclass" Syntax for getting the collection of the objects: Set objectcollection=classtype("logicalname").childobjects(object) Syntax to get the count of objects in the collection: Return type=objectcollection.count Note: The index of the childs objects collection starts from "0" Class-12 Descriptive programming: Is the process of generating the script by describing the object in the script dynamically. In descriptive programming we do not require objects in object repository. Disadvantages of mainating object repositories: 1. Tool's performance might get slowed down if there are multiple properties captured. 2. Failures in the script execution if the characteristics of an object are changed. 3. Maintianing the object repositories is a time consuming process. 4. Cannot maintain repositories if the application is not available. 5. Redundancy of maintaing the test objects, reusability is not completely possible. Advantages of descritpive programming:

1. Easy to maintain the objects. 2. High speed in test execution(improved tool's performance) 3. No redundancy, an object created can be used any number of times(reusable). Disadvantage in d.p: Time consuming process to generate the script. When do we prefer descriptive programming: 1. When the application under test is under construction. 2. If the repository size is getting huhe and huge. Types of descriptive programming: There are 3 types of descriptive programming: A) static descriptive programming: In this we have specify the properties/characteristics of an object dynamically in the script. It is redundent, every time we use the object, the object should be described. Hence this type of "d.p" is not preferred . Syntax: Class type("property name:=property value").operation "value" We can describe an object with one or more characteristics, by specifying the multiple properties with a delimiter "," Dynamic descriptive programming: In this we create an object by specifying one or more characteristics of an object. These objects are called as user defined objects. The objects once created are reusable. Objects are created using a method called as "description.create". Syntax: Set obj=description.create Obj("property name").value="property value" Functions: A function or a sub routine is a set of executable statements(script/program), to perform a specific task. A common thing in both function and a sub-routine is both cannot run on their own, they should be called by some other program. Functions and sub routines are often called as called programs(stub) The calling program is referred to as "driver" Function will return a value but a sub routine will not return a value.

In general functions are of two types: 1) built in functions: these are set of predefined functions, which are default associated with any programming or scripting language. 2. Library functions: These are the user defined functions, which are created by the user. Syntax for a function: Function functionname(arg list) Statement...1 Statement...2 Statement...n End function Syntax for sub-routine: Sub subname(arg list) Statement...1 Statement...2 Statement...n End sub Driver script for functions and sub: Call function(arglist) Or Return type=functionname(arglist) Call subname(arglist) Note: We can have a function in another function. Functions can be defined in two ways: A) public: When a function is defined as public then the function can be called in nother function of the same library or from a function in any other library. B) private: When a function is defined as private, then the function can be called only from the functions of the same library. Arguments: Are the inputs or the parameters, passed to the function while calling a function. The arguments are of two types: A) by reference: When we define an argument as reference, then we can pass the reference as the parameter while calling a function. By default it is by reference. Syntx: Function funtionname(byref arg1, byref arg2..)

B) by value: When we define an argument as by value, we have to pass the value in the function call. Syntax: Function functionname(byval arg1, byval arg2) We can also create a function from the following navigation: Insert --> function definition generator Function library: Is a collection of user defined functions. A library file is a file with extension ".vbs"(visual basic script) or with file extension ".qfl"(quick test function library) Creating a library file: We can create a library file in 2 ways: A) file: In quick test: File --> new --> function library When saved, the library file is saved with ".vbs" / ".qfl" B) notepad: Open a notepad and save it with extension ".vbs" / ".qfl" Assosiating alibrary file to test: We can associate the library file to test in 2 ways: A) file;settings: Navigation: File --> settings --> resources --> associate library B) through script: We can associate a library file through script, using a built in function alled "execute file" Syntax: Execute file "file path" Note: We can associate one or more library files to a test. We can also set the library file as "default", when associated through file;settings We can also check the syntax in the library files associated to the test, when associated throught "file;settings" Class-13 Debugging: Is the process of identifying the problem in the script enhancement. Following options are available in debugging the script.

Breakpoint: Is to hault the test execution process. From the breakpoint we can perform line by line execution. We can have one or more break points in a program or script. Insert/remove breakpoint: Is to insert or remove a break point Navigation: Debug --> insert/remove brekpoint Or F9 Enable/disable breakpoint: Is to enable or disable a specific breakpoint in the script. If a break point is disabled then the script executed will nto be stopped. Navigation: Debug --> enable/disable brekpoint Enable/disable all brekpoints: Is to enable or disable all the break points in the test Navigation: Debug --> enable/disable all brekpoints Clear all break points: Is to remove all the break points from the test Navigation: Debug --> clear all brekpoints Step into: Is to excute one statement at one instance from the break point Navigation: Debug --> step into Or F11 Step out: Is to come out of the break point by executing all the statements in a sequential order. This is by default disabled and is enabled only when step into is performed atleast once. Navigation: Debug --> step out Or Shift+f11 Step over:

Is to execute all the statements in a sequential order from one check point to the other or till end of the test. Step out can be performed only if step into is not performed atleast once. Navigation: Debug --> step over Or F10 Pause: Is to hault the test execution process. Navigation: Debug --> pause Runto step: Is tio perform test execution till the specified location in the test. To perform, place the cursor at the desired line and then select run to step Navigation: Debug --> run to step Or Ctrl+f10 Debug from step: Is to perform the test execution from a specific location in the test. Navigation: Debug --> debug from step Debug viewer: Is to monitor the variables in the script during runtime. Navigation: View --> debug viewer There are three components in debug viewer: A) watch: Is to monitor the values passed to a specific variable in the test during test execution. We have to define the variables in the watch, we can add the vatriable to watch manually by specifying the variable name Add to watch: Is the option used to add the variable to watch in debug viewer Navigation: Debug --> add to watch Or Ctrl+t

B) variables: Is also used to monitor the values passed to the variables defined in the script, during runtime. Variables will by default capture values passed to all the variables in the script, we cannot define the vartiables. Note: When there are large number of variables in the script, and if we have to monitor only specifc set of variables then it is preferred to go with "watch", else we can go with "variables" C) command: Is to pass the value to one or more variables in the script during runtime. We have to specify the variable name with the value to be passed during the execution of that statement. The scope of the value passed to the variable(s), is only to that test execution Class-14 Miscellaneous: 1. Synchronization: Is the concept of making a sync between tool and the application under. Quick test is pretty quick in execution and some times will not wait for the application, jumps into the next activity, which might cause failures in test, to avoid such situations, we implement synchronization. Synchronization can be done in following ways: A) synchronization timeout: Is an object synchronization, when set quick test will wait before running each step. The time should be specified in seonds Navigation: File --> settings --> synchronization timeout B) wait: Is a statement used to make quick test wait until a specific statement or task is completed. Wait is static, have to specify the time in seconds Syntax: Wait (time in seconds) C) synchronization point: Can be implemented using wait property which makes quick test wait until the specified task is competed. Navigation: Insert --> synchronization point By default it is disabled, have to insert while recording the script.

Synchronization point has to be implemented by specify a property of an object along with time in milliseconds Syntax: Classtype("logical name").waitproperty "property name", "property value", time in milli seconds Note: Synchronization point is preferred, as the tool jumps to next statement as soon as the specified task is completed, wait will make quick test wait until the time specified is completed. 2. Transactional statements Statements used to capture the time for a specific transaction performed. There are two statements available A) start transaction: Is to capture the start time of the specified transaction. Navigation: Insert --> start transaction Syntax: Services.starttransaction "transaction name" B) end transaction: Is to capture the end time of a given transaction, it also captures the total time taken to perform the transaction. Navigation: Insert --> end transaction Syntax: Services.endtransaction "transaction name" Note: The complete time information will be captured and displayed in the test results. 3. With statement: The with statement allows you to performa series of statements on a specified object without requalifying the name of the object. With statement with reduces the redundancy of the objects used int he script and will also reduce the width of a given statement. Navigation: Tools --> options --> general --> automatically generate with statement after recrding Syntax: With class type("logical name") Satement 1 Satement 2....

End with 4. Statement completion Statement completion, enables you to select the method or property for your statement from a drop-down list and view the relevant syntax. Navigation: Ools --> view options --> stetement completion 5. Comment: Is to comment a single statement or a block of statements. When commented, the statement(s) will not be executed. It is used to have the documentation for a given test. Single line comment: Single quote (') Multiple line comment: Select the block and Ctrl+m To uncomment a block: Ctrl+shift+m 6. Action template: Is a shared template, which is used to display some generic information for every new test opened in quick test. Action template should be saved with the file name "actiontemplate", with extension ".mst"(mercury shared template) Creating a hared template: Open notepad and save it with filename and extension as "actiontemplate.mst" The file has to be saved in the following location: C:\programfiles\hp\quick test professional\dat 7. Virtual objects 8. Password encoder 9. Test batch runner 10. Test resuts deletion tool


				
DOCUMENT INFO
Shared By:
Stats:
views:906
posted:4/15/2009
language:English
pages:51
Description: automation testing