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.
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.
- //Use Like this,
- Dim NameText, PassText
- Set NameText = Window("main").Window("sub panel").Dialog("Login").WinEdit("Name")
- NameText.Set "username"
- //Try to avoid like this,
- 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.
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.
Comments
Post a Comment