My Blog List

Friday, February 3, 2012

Best Practices for QTP Tool

Recently saw some good tips to improve the QTP execution in best way with good performance. Here I am sharing those ideas.
1. Always try to use Sync or Exist(2) instead of Wait
2. Always specify parameter for Exist otherwise it will wait up to default timeout value.
3. Use Option Explicit to force use of variables by declaring as it fasten the script execution.
4. Load only required add-ins at start-up.
5. Use Automation  Object Model(AOM) to automate QTP execution process.
6. Run in Fast execution mode while executing full scripts.
7. Try to avoid Smart Identification feature.
8. Disable Video recording, Active Screens etc unless you required.
9. Always nullify the objects which are used in scripts.
10. Always try to use variables to store test objects and then do operations from that assigned variable instead of doing it in single object hierarchy line. This will fasten the execution.
  1. //Use Like this,
  2. Dim NameText, PassText
  3. Set NameText = Window("main").Window("sub panel").Dialog("Login").WinEdit("Name")
  4. NameText.Set "username"
  6. //Try to avoid like this,
  7. Window("main").Window("sub panel").Dialog("Login").WinEdit("Name").Set "username"
11. Try to Use With statements
12. Try to minimize the Object Repository file size. Do not keep unwanted test objects in OR.
13. Finally, Use good amount of RAM in computers as QTP will take some amount of RAM while running.

1 comment:

  1. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium