Facebook

For any corporate training requirements Please mail To sudhakar@qtpsudhakar.com
New Schedule in MindQ Systems, Madhapur By SUDHAKAR
Course Name Date Time Duration Type Branch
Selenium+Appium 16th October 2017 7.30 AM - 9.00 AM IST 45 Days ClassRoom + Online Mind Q Madhapur
Selenium+Appium 30th October 2017 9.30 AM - 11.00 AM IST 45 Days ClassRoom + Online Mind Q Madhapur

A book "Cracking the QTP interview" authored by Sudhakar.Read More. Buy From FlipKart

Friday, May 1, 2009

QTP Tips


I found a QTP tips file in QTP installation folder which is developed by HP. Here i am giving the tips which they have mentioned in that file.
If you have installed QTP in your machine then find the file in this path  
QTP installation Folder -->Dat --> Tips.txt.
 
  • The RegisterUserFunc statement now has an optional argument that you can use to set a function as the default operation for a test object.
  • You can use the new Function Definition Generator to easily generate user-defined functions (Insert > Function Definition Generator).
  • NEW!! You can manage the availability of keywords used to create keyword-driven components using the new Keywords pane in the application area of QuickTest Professional.
  • NEW!! You can associate a function library with the open test by opening the function library and choosing File > Associate Library 'library_name' with 'test_name'.
  • NEW!! You can check syntax errors by clicking CTRL + F7. If your script contains errors you can view them in the new Information pane.
  • The Select Object for Step dialog box enables you to select a new object from your application. If you select an object in your application that is not in the object repository, the object is added to the object repository when you insert the new step.
  • You can select an object in the object repository and locate it quickly in your application using the Highlight button in the ORM or ORE.
  • NEW!! You can locate an object in the object repository by pointing to an object in your application. If the object exists in the object repository, it is highlighted.
  • NEW!! You can now add new objects to the object repository using filtering capabilities. For example, you can choose to add only a selected type of object residing in a window or a web page/frame.
  • NEW!! You can now associate multiple object repositories with an action or application area. In previous versions of QuickTest Professional, you could associate only a single object repository with a test asset.
  • NEW!! You can export object repository content to an XML file and import a new object repository from an XML file.
  • The list of Utility objects available when you open the Step Generator from the Keyword View is a sub-group of the list available when you open the Step Generator from the Expert View.
  • Open XML format used for report information now enables you to easily customize run reports and integrate result information with other applications. Refer to the QuickTest online documentation for a detailed description of the report's XML elements.
  • You can export test results to an HTML file to easily view the test results when you are not working in a QuickTest environment.
  • You can write automation scripts to control virtually every QuickTest feature and capability using the objects, methods, and properties included in the QuickTest Professional automation object model.
  • Test object and method names are not case sensitive.
  • When you type VBScript keywords in the Expert View, the relevant VBScript syntax or blocks are added to the test script.
  • You can now locate specified text strings in the Expert View, and replace them with text strings that you specify. You can search for literal text or use advanced options to fine-tune your search.
  • NEW!! You can select a block in the Expert View and press CTRL + M to comment this block. Press SHFT + CTRL + M to uncomment the block.
  • NEW!! You can select a block in the Expert View and indent or outdent it by clicking the Indent or Outdent toolbar buttons.
  • NEW!! You can control the layout of the QuickTest Professional Window by dragging and dropping panes to a dockable, floating, and tabbed mode.
  • NEW!! To move a dockable pane without snapping it into place, press CTRL while dragging it to the required location.
  • NEW!! To auto-hide all the tabbed panes, select the title bar of the active tabbed pane, right-click and choose Auto Hide.
  • NEW!! When you rename a test object, you can choose whether to automatically update all occurrences of the test object, or manually change the names in steps that use the renamed test objects.
  • NEW!! You can copy objects from a shared object repository to the local object repository in order to modify them.
  • NEW!! You can use the Object Repository Merge Tool to merge objects from two shared object repositories into a single object repository.
  • NEW!! You can associate shared object repositories with multiple actions simultaneously, using the Associate Repositories dialog box.
  • NEW!! You can resolve missing resources (such as missing object repositories and actions), using the new Missing Resources pane.
  • You can use the Advanced Windows Applications Options dialog box to modify how QuickTest records and runs tests on Windows applications. Choose Tools > Options > Windows Applications tab > Advanced.
  • You can save the resulting data from the run-time Data Table to a file by inserting a DataTable.Export statement to the end of your test.
  • To instruct QuickTest to wait for an object to open or appear during test run, use an Exist or Wait statement.
  • To stop an analog step in the middle of a test run, click Ctrl + Esc, and then click the Stop toolbar button.
  • If you want to create a bitmap checkpoint of multiple objects, select the object in the Object Selection dialog box that includes all the objects you want your bitmap checkpoint to contain.
  • If you need to recover Active Screen files after you save a test without Active Screen files, re-record the necessary steps or use the Update Run option to recapture screens for all steps in your test.
  • You can use a PathFinder.Locate statement in your test to retrieve the complete path that QuickTest uses for a specified relative path based on the folders specified in the Folders tab.
  • To maximize performance, load only the add-ins you need.
  • You can define a recovery scenario to handle unexpected behavior during your run session.
  • You can add new objects to the Object Repository from the Active Screen or using the Add Objects option in the Object Repository dialog box and pointing to the object in your application.
  • To record keyboard input, mouse clicks, and the exact path the mouse travels, switch to Analog Recording mode or Low Level Recording mode.
  • If it takes time for an object you are checking to load all of its data, you can increase the checkpoint timeout.
  • You can insert XML output values to your script.
  • You can verify that your XML is structured according to a specific schema.
  • You can specify a relative path when calling actions, functions, and other external files associated with or referenced by a test or business component.
  • NEW!! You can create library files (containing VBScript functions, subroutines, classes, modules, and so forth) in QuickTest Professional and associate them with your test or application area.  You can then call these functions (or other elements) from within your test assets.
  • NEW!! You can debug functions, subroutines and classes defined in a function library file in QuickTest Professional.
  • You can create a user-defined function and register it as a test object method in order to overwrite or add to existing test object functionality.
  • You can use the Reporter object to disable or enable messages to the Test Results.
  • You can record a test on one version of Microsoft Internet Explorer and then run it on other browsers or versions.
  • To transfer control to the application while spying or inserting checkpoints on objects, press the CTRL key.
  • You can check the content of an image in a Web page when you create an image checkpoint using the Compare Image Content option.
  • You can use the Data Table to run the test several times, each time using different data.
  • By default, in order to conserve disk space, QuickTest does not save screen captures with your test results for steps that pass. You can change the default setting in the Tools > Options > Run tab.
  • The Active Screen loads faster if you clear the Load Images check box in the Web Page Appearance dialog box (Tools > Options > Active Screen tab > Advanced button).
  • You can teach QuickTest to recognize any area of your application as an object by defining it as a virtual object.
  • From QuickTest, you can run WinRunner tests and call TSL functions in compiled modules. The results of the WinRunner test or function are integrated into the QuickTest test results.
  • To modify the text used for a text checkpoint, click the Configure button in the Text Checkpoint Properties dialog box.
  • You can configure an action for repeated use in your test and in other tests. Select the Reusable Action check box in the Action Properties dialog box (Edit > Action > Action Properties).
  • You can use the ExitAction statement to terminate an action before it finishes running, based on conditions you specify in your test.
  • You can set breakpoints in your test, and then use the Debug Viewer pane to view, set, or modify the current value of objects or variables.
  • You can call methods and retrieve and set COM object properties from the Expert View using the .Object property.
  • You can configure how QuickTest records events in Web applications. Choose Tools > Web Event Recording Configuration.
  • You can define custom environment variables for use in your test.         
  • You can add logic to a checkpoint by using a Data Table formula.
  • You can use the Window Script Host and the VBScript Runtime Library to further extend your test. For more information choose Help > QuickTest Professional Help > VBScript Reference.
  • You can use the Object Identification dialog box to configure the way QuickTest learns and recognizes objects.
  • You can run your test in Update mode to update values in your test or business component. You can choose to update checkpoint data, Active Screen images, and/or the descriptions of the objects in the object repository. Choose Automation > Update Run Mode.
  • If you want to add the same comment to every action that you create, you can add the comment to an action template.
  • You can define test or action parameter variables using the Parameter object and its methods in the Expert View.
  • You can create test, action, or component parameter output values that retrieve values during the run session and store them for use at another point in the run session. You can then use these output values to parameterize a step in your test or business component.
  • NEW!! You can create object repository parameters. When associating an object repository to a test asset, you map this parameter to a constant or a test asset parameter (test, action, or business component).
  • In addition to Data Table output values, you can output values to environment variables or store a retrieved value in a test, action, or component parameter.
  • You can use the Data Driver Wizard to automatically parameterize constants in your action or business component.
  • You can set a parameter to use a random numeric value.
  • You can specify test, action, or component parameters to pass values to and from your test or business component, and between actions in your test.
Keyword view tips
  • The Operation item appears in the Keyword View only when functions are defined in function library files associated with the component’s application area.
  • When adding a new step using the Keyword View or Step Generator, you can select a new object from your application and it is automatically added to your object repository.
  • You can specify which columns you want to display in the Keyword View. Choose Tools > View Options or right-click any column header in the Keyword View.
  • You can specify the order in which columns are displayed in the Keyword View. Choose Tools > View Options or drag a column header to a new location in the Keyword View.
  • You can print the contents of the Keyword View to your Windows default printer, or preview it on screen before printing. Click the Print button or choose File > Print.
  • You can copy and paste or drag and drop steps in order to move them to a different location within the Keyword View.
  • You can enter a comment about a step in the Keyword View by clicking in the Comment cell. You can also enter a comment on a new line below the currently selected step by choosing Insert > Comment.
  • You can view the Documentation column in the Keyword View to read a summary of what the step does, in an easy-to-understand sentence.
  • The Function Definition Generator enables you to add documentation that specifies exactly what a step using your function does. This description is shown in the Documentation column of the Keyword View for steps that use the function.
  • NEW!! You can copy the content of the Documentation column to the Clipboard by right-clicking any column header in the Keyword View and choosing Copy Documentation to Clipboard.
  • You can print a single action or business component from the Keyword View (in table format) or from the Expert View (in statement format).
  • You can create a custom report message from the Keyword View by choosing Insert > Report.
Tips When connected with QC
  • You can create multiple application areas to suit different components.
  • NEW!! Business components associated with an application area use only the resources and settings that are defined in the application area. In previous versions of QuickTest Professional, business components could have custom settings.
  • Iterations for a business component are defined in Quality Center.
  • If you are connected to Quality Center, you can view the current Quality Center connection by pointing to the Quality Center icon in the status bar. To open the Quality Center Connection dialog box, double-click the Quality Center icon.
  • If a Quality Center test or shared file (such as a shared object repository or Data Table file) is open when you disconnect from Quality Center, then QuickTest closes it.
  • To access QuickTest tests or components from Quality Center, select the 'Allow other Mercury products to run tests and components' check box (Tools > Options) and install the QuickTest Add-in for Quality Center (from the QuickTest Professional CD-ROM).
  • NEW!! If a business component is currently open, clicking the New toolbar button creates a new business component document (and not a new test document). This also applies if an application area or function library is open.
  • NEW!! You can open a recently used business component, application area, or function library by selecting it from the Recent Files list in the File menu.
  • You can run QuickTest tests from a Quality Center project and pass parameter values to the test.
  • You can choose a Web server accessible via a Local Area Network (LAN) or a Wide Area Network (WAN) when connecting to Quality Center. Click the Quality Center Connection button or choose File > Quality Center Connection.
  • The Open Test from Quality Center Project dialog box displays icons that indicate the version control status of each test in your project.

1 comment :

  1. Hi BuddyI like your blog.Keep it going.Savy

    ReplyDelete