Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Tips and Tricks
#4
If you feel, the execution of tests has slowed down or there is need to increase the speed ,just keep these few points in mind.

1. Do not load unwanted Add-ins !
Selecting an add-in(eg: web) just because it was selected by default can only reduce performance if you are working with windows applications.Load only required add-ins

2.Run mode=Fast!
Tools>options>Run mode>set it to fast! You will need to have installed Microsoft script debugger to change settings here.

3.Active Screen!
This actually consumes lot of disk space and usually we don't really need active screen which is displayed by default when we open QTP.If you have noticed,while editing scripts,it takes fraction of seconds or more to update Active screen window on each step.So if you are not in need of it, just toggle it (View>Active screen) or close the window(x).
When it comes to saving the tests, again if you don't need any active screens to be stored just clear the option 'save active screen files' in 'save test' dialog box.
If you really need active screen,check capture level in Tools>options>active screen>
minimum/partial would be sufficient

4.Images and movie capture!
Tools>options>Run
Uncheck 'save movie results' and 'save still images'
If you really want images set it 'for errors' instead of 'always'

5.Recovery Scenario!
This is very crucial as far as performance hit is concerned.Try not to use them.Try to run scripts in a separate machine where unwanted softwares are not installed (eg:printers,anti virus e.t.c).Some browser popups can be disabled manually by selecting "do not show this next time" before actually automating scripts.
Prefer 'Exist' method rather than blindly using recovery scenario if you are sure of what exceptional behavior could occur at what point of time.

If it is really needed, make sure in file settings>recovery scenario, you configure "activate recovery scenarios" appropriately. See if 'On error' would handle the job instead of 'on every step'.

6.Importing sheets!

When you import excel sheets using datable methods, make sure you are not dumping the sheet in every iteration!
Eg:If the first line of your script is Datatable.Import(filename) and you have enabled "run on all iterations", you are simply importing the sheet every time unnecessarily.In such cases, set mode to "run one iteration only" and use a loop after import method

Datatable.Import(filename)
for i=1 to some_count
Datatable.SetCurrentRow i
'do some operation
next

or

If Environment("ActionIteration") = 1 Then
DataTable.ImportSheet "E:\......xls" ,1 ,"Global"
End If

7.Lengthy test script
Try to divide lengthy test scripts into appropriate actions though it is not really a big parameter in performance consideration.


If i find any more tips on this, will update this post.
Reply


Messages In This Thread
QTP Tips and Tricks - by rajpes - 07-25-2011, 11:49 AM
How to open and edit multiple scripts - by rajpes - 07-25-2011, 03:48 PM
RE: QTP Tips and Tricks - by Ankur - 07-25-2011, 04:02 PM
To boost performance of scripts execution - by rajpes - 07-26-2011, 10:47 AM
Simplest way to open a webpage - by rajpes - 07-26-2011, 03:24 PM
VBScript to print a pattern - by rajpes - 07-27-2011, 04:05 PM
RE: QTP Tips and Tricks - by nakulgupta18 - 03-07-2014, 04:05 AM
RE: VBScript to print a pattern - by ashitroy1991 - 08-24-2017, 12:46 PM
weblist index tip - by rajpes - 07-29-2011, 11:14 PM
RE: QTP Tips and Tricks - by gaveyom - 08-29-2011, 11:19 AM
@gaveyom - by rajpes - 09-21-2011, 05:11 PM
Initializing a counter in Do loop - by rajpes - 09-21-2011, 06:15 PM
worksheets or sheets - by rajpes - 09-22-2011, 12:13 PM
ComboBox items into array - by rajpes - 09-23-2011, 03:49 PM
DataTable.Import/ImportSheet - by rajpes - 09-25-2011, 12:29 PM
How to know the password - by rajpes - 10-11-2011, 11:06 AM
RE: QTP Tips and Tricks - by sshukla12 - 12-21-2011, 10:43 AM
RE: QTP Tips and Tricks - by Sathiya - 12-21-2011, 05:54 PM
RE: QTP Tips and Tricks - by rajpes - 01-30-2012, 07:51 PM
RE: QTP Tips and Tricks - by rajpes - 02-02-2012, 04:59 PM
RE: QTP Tips and Tricks - by sshukla12 - 03-02-2012, 02:37 PM
Using "Navigate and Learn" option - by rajpes - 02-06-2012, 07:45 PM
RE: Using "Navigate and Learn" option - by Dhiman - 02-15-2012, 10:02 PM
RE: Using "Navigate and Learn" option - by rajpes - 03-02-2012, 01:42 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)