Friday, March 25, 2011

Testing GUI & Non-GUI Applications with QTP

Testing GUI & Non-GUI Applications with QTP

Before reading further make sure you know little bit about Service Test 11.0

Let’s try to run the test we created here via QTP 11.0 (NOT Service Test 11.0) and see how you can test your GUI and UI-Less Application Functionality in One Test.

Open new test in QTP.
Go to Insert (Menu) -> Call to Service Test Test….
Call to Service Test Test window opens.
Navigate to the test (which was created in Service Test 11.0 and saved on the disk).
Select it and click open.
Click OK to come out of Call to Service Test Test window.

It will add a call to Service test as shown below:

var_CallServiceTest = CallServiceTest ("ServiceTest1.st","ServiceTest1Params-2.xml")

This is just a simple example. You can add other code before or after this call to service test in order to see the testing of GUI and Non-GUI part in one test.
Run this test. (Obviously the service should be running, Start-> All Programs->HP Service Test 11.0 ->Sample Application)

It will run the test and show the combined results in the Run Results Viewer.