Friday, May 29, 2009

Understanding Test Settings and Options settings in QTP



It is usual that people will be getting confused with different settings/options available in QTP IDE.

It is necessary to have clear understanding about different settings/options in QTP and the difference between them.

Remember the below two facts.

1.IDE Setting

Settings/options done for QTP IDE will be available only for the particular instance of the QTP installation. i-e If you set an option in QTP installed in Computer1 won't be available in QTP installed in Computer2.. It will be available for all the Tests in Computer1.

2.Test Setting

Settings/options done for particular Test (eg. Test1) will be available for that Test only. It won't be available for other Tests(e.g Test2). But, note that Test1 will keep the settings/options even when we copy the Test1 from Computer1 to Computer2.

Now we will see these two type of settings with examples and screenshots.

The Test setting can be done from below screen which can be accessed from Files->Settings.




In this screen if you do any change, that change will be applicable only to the particular Test. For example, if you set an Environment variable "username" for Test1, the environment variable "username" can be used within Test1 only.

We need not do anything manually to copy these settings when copying the Tests to another machine.


The QTP IDE settings/options can be changed from below screen which can be accessed from Tools->Options.



All the settings done in this screen will be applicable for all Tests. But it will be applicable within the same machine only. For example if you set Run mode as Fast in your Computer, then all the Tests will be executed in Fast mode in your Computer.

If you want to run all the Tests in Fast mode in other Computers also, then you need to transfer this setting to other computers.

Setting can be easily transferred from one machine to another machine using QTP automation object model vbs script. This vbs script can be automatically generated by pressing "Generate Script" button.

eBook for learning Software Testing and QTP Automation.

More Articles...

2 comments:

Mitch said...

Hello,
I have this Do Until loop in my code:

Do Until OracleFormWindow("Requests").OracleTextField("Phase").Verify("Completed")
Wait(5)
OracleFormWindow("Requests").OracleButton("Refresh Data").Click
Loop

It basically checks the value of a field on screen, and if it's not Completer, it waits 5 seconds and refreshes. However, every time it does this check, and it's not complete, it reports a failure to the test results. This seems odd to me.. it's not failing at all... Is this due to some setting I have in QTP??

Thanks!

Anonymous said...

Hi,

Do you know where does QTP save it's settings after you close it? Is there a config file somewhere? Is it readable by external programs (e.g. notepad ?)

thanks.



Thanks for visiting our blog


twitterrss facebook linkedin YouTube subscribe


Subscribe via email

Enter your email address: