UFT is one of the most powerful tool in the functional testing that is mainly used during the regression testing, but when I tried to execute the script it took long time to complete the execution of script. After performing many researches here are the few tips to optimize the UFT Scripts
- Launch UFT using a .vbs file and not the UFT desktop icon. You will notice a substantial increase in speed.
- Load only the add-ins that are required for your Application Under Test – don’t load unnecessary add-ins in the Add-in Manager when UFT starts
- Reduce default time-out settings for Object synchronization timeout and Browser navigation timeout.
- Disable Smart Identification
- While running, UFT consumes a lot of memory by itself. It is always advisable to have lots of available RAM (much more than what is recommended by HP) and good processor speed on a system where you intend to install UFT.
- Avoid using hard coded Wait(x) statement. Wait statement waits for full x seconds, even if the event has already occurred. Instead use “. sync” or “. exist” statement.
- To prevent unnecessary bloat of your results folder while debugging scripts, save the run results to a temporary folder
- Make the Run Mode as “fast”. This setting is present under Tool > Options > Run tab.
- While identifying the objects make the index to none under the ordinal identifiers
- Make use of relative paths while calling reusable actions in your script.
- Hiding Active Screen (by right clicking the Active Screen pane > Hide) may help with editing response time.
- Run UFT scripts in “hidden mode” this will improve the execution time
- If you are creating objects, make sure you destroy them after using them.
Try these and let me know how it works !