Professional Documents
Culture Documents
Learntocheckthebehaviorof
3. Parameterization 2
TestScriptsforMultipledata
4. Learn how to do
Synchronization 2
synchronization of Test Cases
Learntotesttherecovery
6. RecoveryScenarioManager 2 mechanismforthespecified
scenario
9. Independent Test cases for Students Learn to write own Test cases
2
University Result System and do Manual Testing
1. K. SENTHIL KUMAR
2. B. PRIYADHARSHINI
3. R. THENMOZHI
4. S. KAVITHA
1. OVERVIEW OF QTP
Mercury quick test professional is one important comedy of HPs quality center.
It consists of a number of software packages and tools for handling the computer software
development life cycle.
From requirements management to maintenance of the software.
These components of quality center include mercury test director for the test process management as
well as mercury win runner and mercury quick test professional for functional testing.
QTP most popular tools for functional / regression testing.
FEATURES OF QTP
QTP can be used to test a variety of applications such as .NET,J2EE,Web services,CRM and
ERP etc.
It has the record/replay provision to record the user interactions with the application software.
It uses VB script as the scripting language. Since the syntax is very similar to visual basic,
learning this scripting language is very easy.
The keyword driven testing feature provides a facility to build tests without writing the scripts.
It provides checkpoints option. using checkpoints you can verify whether the expected result and
the actual result are the same
It provides a facility for synchronization of test cases.
Object repository manager helps in ensuring that if a changes is made in one object, that changes
is reflected in all the tests that refer that object (ex:-changing the name of a button from login to
sign in).
Its auto-documentation feature provides the feature of creating test documentation
automatically.
It supports Unicode and hence you can test applications written for any of the world languages ,
such as hindi,Japanese,Chinese,etc
QTP can be integrated with win runner-test script of one tool can be used with the other. The test
results also can be shared between the two tools.
QTP has a recovery manager and, in case, the application halts due to an error, it will
automatically recover this is very useful for unattended testing.
Test report data is stored in documented XML format. This facilities transferring the report data
to another third party tool or into HTML web page.
Using special add-in modules , you can use QTP for testing a variety of applications,such as:
1. ERP/CRM Packages, such as sap, Siebel , people soft , oracle.
2. .Net webforms , winforms, .Net controls.
3. Web service applications, such as protocols, including XML,SOAP,WSDL,J2EE,and
.NET.
Multimedia applications, such as real audio/video and flash.
2. RECORD AND REPLAY
AIM:
PROCEDURE:
This displays an add-in-manager window prompting you to select the add-ins to be loaded.
STEP:2 when you click the ok button ,QTPs welcome screen is displayed prompting you to select the one
of four options.
TUTORIAL
START RECORDING
OPEN EXISTING
BLANK TEST
STEP:3 select the blank test option to create new test case.
STEP:7 select the application and working folder using browse button (....).
STEP:8 then click the ok button. The selected application is added to the application details.
File -save
Or
STEP:14 select the folder where the test results are to be stored by clicking on browse button(...) and then
click the ok button.
STEP:15 The test results get displayed in the test result window. The test result of the recorded test case can
be any of the following. done, warning, passed, failed.
OUTPUT:
3.PARAMETERIZATION:
AIM:
PROCEDURE:
STEP:3 Press any number. The entered value will be displayed in the edit box only through keyboard.
STEP:7 The result will be displayed in the edit box of the calculator.
STEP:9 Save the test case. File -save or click save button. Now lets create the data table to parameterize
the test case.
STEP:10 Double click the data table first column A to assign a name to it. The change parameter names
dialog is displayed.
STEP:11 enter any name as data column name and click on ok.
STEP:12 Repeat step 10 and 11 for the second column and so on if needed.
STEP:14 Now we need to parameterize the Edit object with these data table columns.
STEP:15 Select the first edit box entry in the keyword view of the test case.
STEP:16Click on value columns modify button to modify the value. Instantly the value configuration
options dialog opens.
STEP:17 The constant radio button is selected by default. Select the parameter radio button and choose
the data table option from drop down list.
STEP:18 select the parameter name from name drop down list box.
AIM:
PROCEDURE:
STEP:4 Click on the select object button to get the required object for adding the synchronization point
.This displays the select object for step.
STEP:5 To add the edit object from the calculator application, click on select object button. The mouse
pointer will be changed to a hand pointer and the QTP environment is minimized.
STEP:6 Click on the edit box of the calculator application, so that the object selection dialog is displayed.
STEP:7 This dialog prompts you to select the object on which the synchronization point has to be created.
As indicated in this dialog, if the location you clicked is associated with several objects,you need to select
the required object.Click ok.
STEP:8 Instantly the step generator dialog is displayed.Select the operation as wait property. Also
select the required property name and value.
STEP:9 Now enter the maximum time out value and click ok to proceed.
STEP:10 The wait property statement will be inserted into the keyword view.If any changes are to be
made , such as changing the time out time select the expert view which displays the vb script for the
recorded action and change the time out time to the required value.
STEP:11 Now run the test case by clicking the run button or bu selecting automation-run menu option.
OUTPUT:
5.CHECKPOINTS
AIM:
PROCEDURE:
STEP:1 Perform the basic steps for recording. After pressing the 1/x button the result is displayed in the
edit box. As we have not done any operation on the edit box so far, we dont have the reference of edit box
in our object repository(only 4 and 1/x will appear in object repository). So first of all we have to bring it to
the object repository.
STEP:2 Click on record button to start recording and add the check point to this case. This opens the
calculator application.
STEP:3 Click the next row of 1/x item, so that you can see another option <select an item> in the drop
down list.
STEP:5 Since there is no item as such as edit except 1/x and 4 , select object from repository. The
select object for step dialog will be displayed.
STEP:6 Click on plus node (+) to extend the calculator object tree in the select object for step dialog.
This displays 1/x and 4 as objects.
STEP:7 Click on the select object button to add the edit object from the calculator application. The
mouse pointer changes to hand pointer, minimizing the QTP environment.
STEP:8 Click on the edit box of the calculator application so that the object selection dialog will be
displayed with the object reference of the calculator.
STEP:9 Select win edit:edit and then click ok,so that the selected object will be added to the calculator
object repository list.
STEP:10 Select edit object and then click ok . You will see that the edit item is added to the current test.
STEP:11Now stop recording . You will see that the edit object is added to the object repository. Now we
need to add the standard checkpoint to it. So read along.
STEP:12 Right click on the edit item and select the insert standard checkpoint option.
STEP:13 On selection of insert standard checkpoint option, checkpoint properties dialog is displayed.
STEP:14 By default, enabled and text properties are checked. So uncheck the enabled property and
change the text property value to 0.25(since the value of is 0.25).
STEP:15 Enter checkpoint timeout as 10 seconds and select the after current step option for insert
statement. Once all the properties are chosen the checkpoint properties displayed.
STEP:16 Finally click on ok. The various steps for executing the test cases are displayed.
STEP:17 Select the third statement as indicated and right click on it . No use of third statement so better to
delete it.
STEP:18 Then select the delete option from the popup menu. So that it displays the dialog.
STEP:19Click on delete step buttonso that the selected statement is deleted. Once deleted the test case
keyword view will be shown.
STEP:20 Save and run the test case. You will notice that the results status shows failed.
OUTPUT:
6.RECOVERY SCENARIO MANAGER
AIM:
PROCEDURE:
STEP:1 Open the internet explorer. Type the wrong URL in space bar. Open QTP and select the resources.
STEP:2 Click recovery scenario manager. Recovery scenario window will be opened. Select new scenario
icon from that.
STEP:6 New object select window will be displayed. Click ok and next.
STEP:7 You will get recovery option. Click open. Select close application process and click next.
STEP:8 Select iexplorer.exe . Double click on that. Again you will get new box explorer.exe. click next.
STEP:9 Deselect add another recovery . click next and select stop the test run. Click next.
STEP:10 Give scenario name as SCI. Click next and add scenario default settings. click finish.
STEP:11 Click save and save the file in any folder of yours.
STEP:12 Now go to file-settings-click + symbol and click browse button. Now open the file that you
have saved.
STEP:14 Record -web-click record and run. Click ok. Again click the wrong URL. Stop the process
and run the process.
OUTPUT:
7. TESTING A WEB APPLICATION
AIM:
STEP:2 Start the recording process.click the record button. The record and run settings dialog is
displayed.
STEP:4 Select the open the following address when a record or run session begins radio button.
STEP:5 Enter the URL of your web site in combo box . You need to enter the URL as
http://localhost/WeatherIndia/weather/main1.html.
STEP:6 Select Microsoft internet explorer option from open the following browser when a run session
begins drop down list.
STEP:7 Check the two check boxes- do not record and run on browsers that are already open and close
the browser when the test closes.
STEP:8 Click the ok button. The , record and run settings dialog gets closed and weather India web site
opens is Microsoft Internet explorer.
STEP:11 Save the test script and look at the keyword view of the test case. Let us now insert the standard
checkpoint to check the number of links in the current page and the URLs.
STEP:12 Right click the weather India-Home item. A popup menu is displayed.
STEP:13 Select the insert standard checkpoint option from the pop up menu. Instantly the page
checkpoint properties dialog is displayed.
STEP:14 All the options are selected , by default. Uncheck all of them, except number of links check box
from class group box. The option, number of links, displays the number of links observed during the
recording phase in the selected page.
STEP:15 All check boxes are selected in all objects in page group box,by default uncheck images and
broken links.
STEP:16 Click on the filter link check... button from all objects in page group box. The filter link
check dialog is displayed.
STEP:17 Select the link and change the Link URL to the expected URL.
STEP:20 You can view the results by exploring the test weather summary node.
OUTPUT:
MANUAL TESTING
8.LOGINPAGE:
9. UNIVERSITY RESULT: