Friday, July 18, 2008
What is the difference between Wait and Synchronization point?
Local and Global.
For an object there is a Global synch time (20 seconds by default)(Available under File->Settings->Run in QTP 9.0) and additionally we can set individually the synch time for a particular object.
Hence total synch time is = Local + Global synch time.
In wait there is no Global concept and it is local to that object only.
Another key difference is: Suppose we have put a wait for 10 seconds then the application would wait for 10 seconds unconditionally. But say if we put a synch point of 10 secs say for an object to appear(local) and default Global synch time is 20 seconds, then total synch time for that object is 20 + 10 =30 seconds, but in case the object would appear in 15 seconds itself, even though the total synch time was 30 seconds, the script would proceed to the next task.
What property we use to get the tooltip of a link or an Image?
Ex : var1=browser("MSN.com").Page("MSN.com").Image("NFL Sunday: Week 10 //LaDainia").GetROProperty("alt")
How to programmatically load a Shared Object Repository
How can you load External Library files in QTP?
Choose Test > Settings > Choose Resources tab > Choose + button so select the library file > browse and select the library file > click Ok.
We can load the library files using Scripting:
Use executefile function to load library files.
Example:
executefile "C:\Documents and Settings\ukumar\Desktop\Sample.vbs"
x=10
y=5
result=SumOfTwoNumbers(x,y)
msgbox(result)
'Code in External Library file.
'Public function SumOfTwoNumbers(a,b)
'Dim sum
'sum=a+b
'SumOfTwoNumbers=sum
'End Function
How to check number of items in a WebList at run time.
How to "Turn Off" QTP results after running a Script?
Is it possible to use the new text recognition mechanism to capture text that is in another language such as French or Japanese?
To indicate which language dictionaries QTP's text recognition mechanism should use, update the supported language list in the registry.
1. Open the registry editor.
2. Navigate to HKEY_CURRENT_USER\SOFTWARE\Mercury Interactive\QTP\MicTest\OcrEngine.
3. Right-click on the supportedLanguages value, and select "Modify."
4. Set the value data to the language or languages to be supported. Use a comma to separate the languages.
Example:English,German,Spanish,French
Note:Combined hieroglyphic languages (CJK - Chinese, Japanese, or Korean) and non-hieroglyphic languages are not supported. For example: English,Japanese
5. Click
6. Restart QTP.
Is there a way to change the method QTP 9.2 uses for text recognition
QTP 9.2 introduced a new text recognition mechanism. The information provided here applies to QTP 9.2 or higher. This solution is not available for earlier versions of QTP.
1. Open the registry editor. (Windows + Run -> regedit)
2. Navigate to HKEY_CURRENT_USER\SOFTWARE\Mercury Interactive\QTP\MicTest\OcrEngine.
3. Right-click on the mode value, and select "Modify."
4. Set the value data for the mode you want to use:
0 - No OCR. Instructs QTP to use only the Windows API-based mechanism (and not the OCR mechanism) to retrieve text from the object.
1 - Windows API/OCR. Instructs QTP to first try to retrieve text directly from the object using the Windows API-based mechanism. If no text can be retrieved, QTP tries to retrieve text using the OCR mechanism. (Default) (Highly recommended when working with CJK languages.)
2 - OCR/Windows API. Instructs QTP to first try to retrieve text from the object using the OCR mechanism. If no text can be retrieved, then QTP uses its Windows API-based mechanism to retrieve text from the object.
3 - OCR only. Instructs QTP to use only the OCR mechanism (and not the Windows API-based mechanism) to retrieve text from the object. (Required when working with Windows Vista.)
5. Click
6. Restart QTP.
Which add-ins can be used with QTP 9.2
· QTP Java Add-in 9.1
· QTP .NET Add-in 9.2
· QTP Oracle Add-in 8.2
· QTP PeopleSoft Add-in 8.2*
· QTP Add-in 8.2 for SAP Solutions
· QTP Siebel Add-in 8.0*
· QTP Stingray Add-in 8.2
· QTP Terminal Emulator Add-in 8.0*
· QTP VisualAge Smalltalk Add-in 8.2
· QTP Web Services Add-in 9.2
Note:You cannot use any other add-ins or add-in version with QTP 9.2, except for those listed above. The PeopleSoft, Siebel, and Terminal Emulator add-ins require an Add-in Upgrade patch before you can use them with QTP 9.2. You can install Add-in Upgrade patches by running the relevant patch executable from the
Does QTP support Macintosh operating systems?
How to change the default directory that appears when saving a test
2. igate to the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QTP\MicTest
3. Find the TestsDirectory value. The value contains the path to the directory you want to be the default test script directory.
4. Edit this value to have your desired path.
a. Right click on TestsDirectory.
b. Choose Modify from the menu.
c. Enter the path into the Value data field.
d. Click OK.
Note:You should not place a "\" at the end of the path.
5. Repeat steps 2 through 4 for the following key: HKEY_CURRENT_USER\Software\Mercury Interactive\QTP\MicTest Note:If the specified directory path does not exist, QTP will open the "My Documents" directory by default.
How to programmatically set the object timeout value
Setting("DefaultTimeout") = Milliseconds
Setting("DefaultTimeout") = 4000
Milliseconds: Maximum time in milliseconds to wait before it is determined that an object cannot be found.
To retrieve the setting:
CurrentSetting = Setting("DefaultTimeout")
We can use the browser navigation time-out by:
Setting("WebTimeout") = Milliseconds
To retrieve the setting:
currentsetting = Setting("WebTimeout")
Tuesday, July 15, 2008
How will you customize the Active Screen settings in QTP?
The Active Screen tab enables you to specify which information QuickTest saves and displays in the Active Screen while recording and running tests.
The more information saved in the Active Screen, the easier it is to edit the test or component after it is recorded. However, more information saved in the Active Screen adds to the recording time and disk space required. This is especially critical in Visual Basic, ActiveX, and .NET Windows Forms environments.
We can customize the Active Screen setting, by using “Custom Active Screen Capture Settings”.
To do this follow below navigation:
General Options:
You can specify the type of compression QuickTest uses for storing captured Active Screen information.
- Simple—Instructs QuickTest to save Active Screen captures in standard uncompressed file formats (for example, .html and .png).
- Compressed—Instructs QuickTest to save Active Screen captures in a compressed (zipped) file format. Using this option saves disk space, but it may affect the time it takes to load images in the Active Screen. This is the default option.
Windows Applications Options:
You can specify which properties are captured for each object in a Windows application when it is captured for the Active Screen.
- Complete—Instructs QuickTest to save all properties of all objects in the application's open window/dialog box in the Active Screen of each step. This option makes it possible for you to insert checkpoints and perform other operations on any object in the window/dialog box, from the Active Screen for any step.
- Partial—(Default). Instructs QuickTest to save all properties of all objects in the application's open window/dialog box in the Active Screen of the first step performed in an application's window, plus all properties of the recorded object in subsequent steps in the same window.
This option makes it possible for you to insert checkpoints and perform other operations on any object displayed in the Active Screen, while conserving recording time and disk space. Note that with this option the Active Screen information may not be fully updated for subsequent steps.
- Minimum—Instructs QuickTest to save properties only for the recorded object and its parent in the Active Screen of each step.
This option enables speedy recording and requires relatively little disk space. However, you can insert checkpoints and perform other operations only on the recorded object and on the window/dialog box itself. You cannot perform operations on the other objects displayed in the Active Screen.
This option allows extremely fast recording and requires only a minimum of disk space. However, you cannot perform post-recording test editing from the Active Screen.
Web Options
You can specify whether QuickTest captures Web pages for the Active Screen.
- Disable Active Screen capture—Disables the screen capture of all steps in the Active Screen. If you do not select this option, you can also delete Active Screen information after you have finished editing your test by selecting Save As, and clearing the Save Active Screen files check box.
How will you do batch testing in QTP?
You can use Test Batch Runner to run several tests in succession. The results for each test are stored in their default location. Using Test Batch Runner, you can set up a list of tests and save the list as an .mtb file, so that you can easily run the same batch of tests again, at another time. You can also choose to include or exclude a test in your batch list from running during a batch run.
To enable Test Batch Runner to run tests, you must select Allow other Mercury products to run tests and components in the Run tab of the Options dialog box.
To set up and run a test batch:
To remove a test from the list, select it and click the Remove button or choose Batch > Remove.
What are the file extensions for the following?
QTP Script file extension : .mts
Recovery scenario file extension : .qrs
Shared Object repository file : .tsr
Per Action Object repository file : .mtr
Outline the benefits of using GetROProperty instead creating an Output checkpoint
What is Database Output value?
What is Text and Text-area output values?
You can create a text output value from a text string displayed in a screen. You can define the output value as part of the displayed text, and you can specify the text before and/or after the output text.
You can also output text values from defined text areas.
When you create a text or text area output value, the text-recognition mechanism may not always retrieve the expected text. For this reason, when possible, you should retrieve text from your application window by using a standard output value for the object containing the text you require, using its text (or similar) property.
You can create a text output value while recording or editing your test .
To create a text output value while recording:
What are standard output values?
You can use standard output values to output the property values of most objects. You can use standard output values to output text strings by specifying the text property of the object as an output value.
You can also use standard output values to output the contents of table cells.
You can create standard output values while recording or editing your test .
To create standard output values while recording:
What are the different types of categories in “Output Values”
We can create the following categories of output values:
- Standard Output values
- Text and Text-area output values
- Database output values
What is “Output Value”
An output value is a step in which one or more values are captured at a specific point in your test and stored for the duration of the run session.
You can output the property values of any object. You can also output values from text strings, table cells, databases, and XML documents.
If you select to output a value to an existing parameter, Data Table column, or environment variable, the existing value is overwritten when the output value step runs. When the run session ends, the original value is restored.
When you insert an output value step in your test, it is displayed in the Expert view as:
How you will add Recovery Scenarios to your test?
After you have created recovery scenarios, you can associate one or more scenarios with a test in order to instruct QuickTest to perform the recovery scenario(s) during the run session if a trigger event occurs.
To add a recovery scenario to a test:
Can we prioritize the recovery scenarios?
Where recovery scenarios are saved?
Recovery scenarios are saved in recovery scenario files. A recovery scenario file is a logical collection of recovery scenarios, grouped according to your own specific requirements.
What is Application crash error trigger event in recovery scenario?
What is Test-run error trigger event in recovery scenario?
What is Object state trigger event in recovery scenario?
QuickTest detects a specific test object state and identifies it according to its property values and the property values of all its ancestors. Note that an object is identified only by its property values, and not by its class.
What is pop-up trigger event in recovery scenario?
What are the different trigger types in Recovery Scenario?
QTP have 4 types of triggers in Recovery scenario:
- Pop-Up window
- Object State
- Test Run error
What is the process of creating a recovery scenario?
The Recovery Scenario Wizard contains five main steps:
- defining the trigger event that interrupts the run session
- specifying the recovery operation(s) required to continue
- choosing a post-recovery test run operation
- specifying a name and description for the recovery scenario
How can you create Recovery Scenario?
How the recovery scenarios will work?
When you run a test for which you have defined recovery scenarios and an error occurs, QuickTest looks for the defined trigger event(s) that caused the error. If a trigger event has occurred, QuickTest performs the corresponding recovery and post-recovery operations.
The set of recovery operations is performed for each occurrence of the trigger event criteria. For example, suppose you define a specific object state, and two objects match this state, the set of replay operations is performed two times, once for each object that matches the specified state.
What a recovery scenario consists of?
A recovery scenario consists of:
- Trigger Event—The event that interrupts your run session. For example, a window that may pop up on screen, or a QuickTest run error.
- Recovery Operation(s)—The operation(s) that need to be performed in order to continue running the test. For example, clicking an OK button in a pop-up window, or restarting Microsoft Windows.
What is recovery Scenario?
Tuesday, July 8, 2008
What is entire parent hierarchy option in Virtual Object Wizard?
If you want QuickTest to identify the virtual object in one occurrence only, select entire parent hierarchy. QuickTest identifies the virtual object only if it has the exact parent hierarchy. For example, if the virtual object was defined using Browser("A").Page("B").Image("C"), QuickTest will not recognize it if the hierarchy changes to Browser("X").Page("B").Image("C").
What is parent-only option in Virtual Object Wizard?
We can select how you want QuickTest to identify and map the virtual object.
In the Identify object using box, we have two options:
- Parent-only option
- entire parent hierarchy
Where does these Virtual Objects will be saved?
What is Virtual Object Manager?
What is Virtual Object collection?
What are the steps you follow to identify a virtual object?
We can define a virtual object by:
- Mapping it to a standard class
- Marking its boundaries
- Assigning a parent object
- Specifying a name and collection
How you identify Virtual Objects in your application?
What is Virtual Objects in QTP?
Your application may contain objects that behave like standard objects but are not recognized by QuickTest. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box.
QuickTest does not support virtual objects for analog or low-level recording.
- The Web page or application window must be the same size and in the same position when recording and running tests s as it was when you defined the virtual object.
- You cannot insert any type of checkpoint on a virtual object.
- The virtual object should not overlap other virtual objects in your application or Web page.
- You can define virtual objects only for objects on which you can click or double-click and which record a Click or DblClick step. Otherwise, the virtual object is ignored.
How will you create Synchronization points in QTP?
To insert a synchronization point:
- Begin recording your test or component.
- Display the screen or page in your application that contains the object for which you want to insert a synchronization point.
- Choose Insert > Step > Synchronization Point.
- Click the object in your application for which you want to insert a synchronization point. >Click OK.
- The Add Synchronization Point dialog box opens.
6. The Property name list contains the test object properties associated with the object. Select the property name you want to use for the synchronization point.
7. Enter the property value for which QuickTest should wait before continuing to the next step in the test or component.
8. Enter the synchronization point timeout (in milliseconds) after which QuickTest should continue to the next step, even if the specified property value was not achieved.
9. Click OK. A WaitProperty step is added to your test or component.
Ex: Window("Flight Reservation").WinObject("Update Done").WaitProperty "visible", 1, 10000
You can enter Exist and/or Wait statements to instruct QuickTest to wait for a window to open or an object to appear. Exist statements return a boolean value indicating whether or not an object currently exists. Wait statements instruct QuickTest to wait a specified amount of time before proceeding to the next step. You can combine these statements within a loop to instruct QuickTest to wait until the object exists before continuing with the test or component.
In general, the amount of time QuickTest waits for objects to appear or for a browser to navigate to a specified page is insufficient, you can increase the default object synchronization timeout values for your test, by changing the Object Synchronization Timeout in the Test > Settings > Run tab.
What is synchronization point?
When you run a test or component, your application may not always respond with the same speed. For example, it might take a few seconds:
- for a progress bar to reach 100%
- for a status message to appear
- for a button to become enabled
- for a window or pop-up message to open
What is Object Spy?
Using the Object Spy, you can view the run-time or test object properties and methods of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object's hierarchy tree. It displays the run-time or test object properties and values of the selected object in the Properties tab. It displays the run-time or test object methods associated with the selected object in the Methods tab.
To use Object Spy:
- Choose Tools > Object Spy.
- Alternatively, click the Object Spy button from the Object Repository dialog box.
How to use user defined environmental variables?
Environmental variable is useful to carryon the variable values through diff actions in a single script.
- Choose Test > Settings > Click on Environment Tab.
- Select
in the variable type drop down. - Create a new variable and initialize it with a value. This variable will be the Global variable.
Environment("variable_name").
What is parameterization in QTP?
A parameter is a variable that is assigned a value from an external data source or generator. You can use the parameter feature in QuickTest to enhance your test by parameterizing the values that it uses.
You can parameterize values in steps, checkpoints in your test and values of action parameters.
If you wish to parameterize the same value in several steps in your test , you may want to consider using the Data Driver rather than adding parameters manually.
There are four types of parameters:
Test, action parameters: enable you to use values passed from your test , or values from other actions in your test.
In order to use a value within a specific action, you must pass the value down through the action hierarchy of your test to the required action. You can then use that parameter value to parameterize a step in your test .
Data Table parameters: enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table.
Environment variable parameters: enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose.
Random number parameters: enable you to insert random numbers as values in your test.
What is run-time data table?
During the run session, QuickTest creates a run-time Data Table—a live version of the Data Table associated with your test.
What is design-time data table?
Can we create test scripts in QTP without using object repository or objects?
Whenever QTP records any action on any object of an application, it adds some description on how to recognize that object to a repository of objects called object repository. QTP cannot take action on an object until unless its object description is in the Object Repository. But descriptive programming provides a way to perform action on objects which are not in Object repository.
Below are some of the situations when Descriptive Programming can be considered useful:
1. The objects in the application are dynamic in nature and need special handling to identify the object. The best example would be of clicking a link which changes according to the user of the application, Ex. “Logout <
2. When object repository is getting huge due to the no. of objects being added. If the size of Object repository increases too much then it decreases the performance of QTP while recognizing a object.
3. When you don’t want to use object repository at all.
4. Modification to a test case is needed but the Object repository for the same is Read only or in shared mode i.e. changes may affect other scripts as well.
5. When you want to take action on similar type of object i.e. suppose we have 20 textboxes on the page and there names are in the form txt_1, txt_2, txt_3 and so on. Now adding all 20 the Object repository would not be a good programming approach.
There are two ways in which descriptive programming can be used
By creating properties collection object for the description.
Dim obj_Desc ‘Not necessary to declare
Set obj_Desc = Description.Create
obj_Desc(“html tag”).value= “INPUT”
obj_Desc(“name”).value= “txt.*”
obj_Desc(“name”).regularexpression= “txt.*”
Browser(“Browser”).Page(“Page”).WebEdit(obj_Desc).set “Test”
By giving the description in form of the string arguments.
What will happen if you split an action and using shared object repository mode?
Monday, July 7, 2008
What will happen to the tests if you rename a shared object repository?
What are the limitations for parameterizing test objects in shared object repository?
When parameterizing using a Data Table parameter:
- You must use the global data sheet. The Current action sheet (local) option in the Data Table Parameter Options dialog box is disabled.
- Your change to the object is saved in the shared object repository, but the corresponding Data Table is saved only with the test in which you are currently working.
- The column name in the global Data Table related to the parameterized object must be the same for every test using the same shared object repository.
What is shared object repository type in QTP?
When you use the shared object repository mode, QuickTest uses the object repository file you specify for all the actions in your test.
If you do not specify a file extension when creating a new object repository file, then QuickTest automatically appends the default extension name for shared object repositories: .tsr
When working in shared object repository mode:
- QuickTest adds new objects to the object repository as you record steps on the object.
- QuickTest uses the existing information and does not add the object to the object repository if you record operations on an object that already exists in the shared object repository (i.e. the object has the same test object description).
- QuickTest uses the same test object from the shared object repository file when you record on the same object in two different actions or in different tests
- QuickTest saves changes to the shared object repository file when you save your open test or when you click Save in the Object Repository dialog box if the shared object repository is not locked and/or opened in read-only mode.
What will happen if you insert a call to action into a test and using per-action object repository mode?
- Only the action itself is copied and not its corresponding object repository.
- The copied action will use the same shared object repository as the test into which it is being copied.
- When you insert copies of actions from tests using a different shared object repository or per-action repository mode, you must ensure that all the objects contained in the action are in the test's shared object repository. If the action uses objects that are not in the shared object repository, the test may fail.
What will happen if you insert a copy of an action and using per-action object repository mode?
When you insert a copy of an action into your test:
- The copied action's action object repository is copied along with the action steps.
- You can edit the object repository of the copied action as you would any other object repository in the test.
What will happen if you split an action and using per-action object repository mode?
When you split an action:
- QuickTest makes a copy of the action object repository.
- The two actions have identical object repositories containing all of the objects that were in the original object repository.
What is per-action object repository type in QTP?
When working in object repository per-action mode:
- QuickTest creates a new (blank) object repository for each action. As you record operations on objects in your application, QuickTest automatically stores the information about those objects in the appropriate action object repository.
- When you create a new action, QuickTest creates another new object repository and again begins adding test objects to the repository as you record.
- When you record on the same object in your application in two different actions, the object is stored as a separate test object in each object repository.
What are the different types of object repositories in QTP?
There are two types of object repositories
- Per-action object repository (default)
- Shared Object repository
We can set the default object repository mode, by selecting Test > Settings > Resources tab > choose Object repository types as “Shared” > click on Set as default button > Click apply and click ok.
How QuickTest Identifies Objects During the Run Session
During a run session, QuickTest searches for a run-time object that exactly matches the description of the test object it learned while recording. It expects to find a perfect match for both the mandatory and any assistive properties it used to create a unique description while recording. As long as the object in the application does not change significantly, the description learned during recording is almost always sufficient for QuickTest to uniquely identify the object. This is true for most objects, but your application could include objects that are more difficult to identify during subsequent run sessions.
How QuickTest Identifies Objects During the Run Session
During a run session, QuickTest searches for a run-time object that exactly matches the description of the test object it learned while recording. It expects to find a perfect match for both the mandatory and any assistive properties it used to create a unique description while recording. As long as the object in the application does not change significantly, the description learned during recording is almost always sufficient for QuickTest to uniquely identify the object. This is true for most objects, but your application could include objects that are more difficult to identify during subsequent run sessions.
How QuickTest Learns Objects While Recording
QuickTest uses the below method when it learns objects during the recording process.
- First, it "looks" at the object on which you are recording and stores it as a test object,
- Determines the test object class that best fits it.
- Then, for each test object class, QuickTest has a list of mandatory properties that it always learns; When you record on an object, QuickTest always learns these default property values, and then "looks" at the rest of the objects on the page, dialog box, or other parent object to check whether this description is enough to uniquely identify the object. If it is not, QuickTest adds assistive properties, one by one, to the description, until it has compiled a unique description; If no assistive properties are available, or if those available are not sufficient to create a unique description, QuickTest adds a special ordinal identifier, such as the object's location on the page or in the source code, to create a unique description.
- Reads the current value of the object's properties in your application and stores the list of properties and values with the test object
- Chooses a unique name for the object, generally using the value of one of its prominent properties.
What is Run Object in QTP?
What is Test Object in QTP?
What is call to an existing action?
You can insert a call to a reusable action that is stored in your current test (local action), or in any other test (external action). Inserting a call to an existing action is like linking to it. You can view the steps of the action in the action view, but you cannot modify them. If you call an external action, you can choose, however, whether you want the data from the action's data sheet to be imported as a local, editable copy, or whether you want to use the (read-only) data from the original action.
If the test calling an action uses per-action repository mode, the called action's object repository is read-only.
If the test calling an action uses a shared object repository, the called action uses the same shared object repository as the calling test.
What is call to copy of actions?
When you insert a call to a copy of an action into a test, the original action is copied in its entirety, including checkpoints, parameterization, the corresponding action tab in the Data Table, plus any defined action parameters.
If the test you are copying uses per-action repository mode, the copied action's object repository is also copied together with the action.
If the test into which you are copying uses a shared object repository, the copied action will use the same shared object repository as the calling test.
If you are working in a test that uses per-action object repository mode, you cannot copy an action from a test using a shared object repository.
The action is inserted into the test as an independent, non-reusable action (even if the original action was reusable).
What are the restrictions to split an action?
How can you split actions in a test, what is the use of splitting the test?
You can split an action that is stored with your test into two sibling actions or into parent-child nested actions. When you split an action, the second action starts with the step that is selected when you perform the split action operation.
We can split the action in two ways:
Independent of each other—Splits the selected action into two sibling actions.
Nested (the second action is called by the first)—Splits the selected action into a parent action whose last step calls the second, child action.
To split an action:
- Select the step before which you want the new (second) action to begin.
- Choose Step > Split Action. (In QTP 9.2, Edit -> Action -> Split Action)
- Choose one of the following options:
- Independent of each other
- Nested
- If you wish, modify the name and description of the two actions in the Name and Description boxes.
What is nesting of actions?
Can two or more tests call the same action at a time?
Can we use steps in a non-reusable action?
What are the different types of actions?
There are three kinds of actions:
- non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once. By default, new actions are non-reusable.
- reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.
- external action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.
What is an action?
- A logical unit of a test is called action. Actions divide your test into logical sections. When you create a new test, it contains a call to one action. By dividing your tests into calls to multiple actions, you can design more modular and efficient tests.
- An action consists of its own test script and its own object repository if the test is in per-action repository mode.
- Each action is stored together with the test in which you created it. You can insert a call to an action that is stored with the test and, depending on the properties of the action, you may also be able to call an action stored with another test.
- For every action called in your test, QuickTest creates a corresponding action sheet in the Data Table so that you can enter Data Table parameters that are specific to that action only.
- You can specify input parameters for actions, so that steps in an action can use values supplied from elsewhere in the test. You can also output values from actions to be used in steps later in the test, or to be passed back to the application that ran the test.
How do you create XML File checkpoint?
You create XML file checkpoints in order to directly access and verify specified XML files in your system.
To create an XML file checkpoint:
In the XML file box, enter the file path or Internet address of the XML file. > Click OK. The XML Checkpoint Properties dialog box opens.
Select the element(s), attribute(s), and/or value(s) that you want to check. > Click OK to add the XML checkpoint.
How to create XML checkpoint in QTP?
To create a XML (Web Page/Frame) checkpoint:
Select the XML document you want to check, and click OK.
Select the element(s), attribute(s), and/or value(s) that you want to check. For each element you want to check, select the checks you want to perform. For each attribute or value you want to check, select the checks you want to perform, or the parameterization options you want to set. If you want to check that the XML structure adheres to a specific XML schema, click Activate Schema Validation and set the required options. > Click OK to add the XML checkpoint.
What is Database checkpoint in QTP?
You create a database checkpoint based on the results of the query (result set) you defined on a database.
Database checkpoint is displayed in the Expert View as a DbTable.Check CheckPoint statement.
When you run the test or component, the database checkpoint compares the current data in the database to the expected data defined in the Database Checkpoint Properties dialog box. If the expected data and the current results do not match, the database checkpoint fails. The results of the checkpoint can be viewed in the Test Results window.
To create a database checkpoint:
Select your database selection preferences and click Next. If you chose Specify SQL statement in the previous step, the Specify SQL statement screen opens. Specify the connection string and the SQL statement, and click Finish.
The Checkpoint Properties dialog box opens. Select the checks to perform on the result set and click OK.
What is text checkpoint in QTP?
Enables you to check that the text is displayed in a screen, window, or Web page, according to specified criteria. It is supported for all environments.
Text (or text area) checkpoints may behave differently in different run sessions depending on the operating system version you are using, service packs you have installed, other installed toolkits, the APIs used in your application, and so on.
Therefore, when possible, it is highly recommended to check text from your application window by inserting a standard checkpoint for the object containing the desired text, using its text (or similar) property.
To add a text checkpoint while recording:
Choose Insert > Checkpoint > Text Checkpoint > Click the text string for which you want to create the checkpoint. The Text Checkpoint Properties dialog box opens.
Specify the checkpoint settings. > Click OK to close the dialog box.
What is bitmap checkpoint in QTP?
You can check an area of a Web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. QuickTest captures the specified object as a bitmap, and inserts a checkpoint in the test or component.
You can create bitmap checkpoints for all supported testing environments (as long as the appropriate add-ins are loaded).
The results of bitmap checkpoints may be affected by factors such as operating system, screen resolution, and color settings.
To create a bitmap checkpoint while recording:
Choose Insert > Checkpoint > Bitmap Checkpoint > Click an object to check in your Web page or application. > Select an object from the tree on which to create a bitmap checkpoint. > Click OK. The Bitmap Checkpoint Properties dialog box opens.
If you want to check a specific area of the object, click the Select Area button.
If you want to save only the selected area of the object with your test or component (to save disk space), select the Save only selected area check box.
When you run the test or component, QuickTest compares the object or selected area of the object currently displayed on the Web page or application with the bitmap stored when the test or component was recorded. If there are differences, QuickTest captures a bitmap of the actual object and displays it with the expected bitmap in the details portion of the Test Results window.