Professional Documents
Culture Documents
Test Da PDF
Test Da PDF
0
Exercises
You can move and resize the QUICKTEST PROFESSIONAL window. This
movement does not impact the recording. Position the QUICKTEST
PROFESSIONAL window and the FLIGHT RESERVATION window so that you can
see both.
4. Click SAVE.
For training purposes, a directory tree was set up on one of your local drives
under \QTP90USING\TESTS. Save all your tests in this directory.
5. In the progress bar, click the words INSERT DONE... with the pointed
finger cursor. The OBJECT SELECTION - SYNCHRONIZATION POINT dialog
box appears.
6. In the OBJECT SELECTION - SYNCHRONIZATION POINT dialog box, click
OK. The ADD SYNCHRONIZATION POINT dialog box appears.
7. From the PROPERTY NAME list, select TEXT.
8. In the PROPERTY VALUE field, type "INSERT DONE...".
9. Retain the default timeout of 10000 milliseconds.
10. Click OK.
11. On the QuickTest Professional toolbar, click STOP to stop recording.
12. Save the test.
13. On the QuickTest Professional toolbar, click RUN to run the test. The
RUN dialog box appears.
14. Click OK to close the RUN dialog box. The test should succeed.
15. On the QuickTest Professional toolbar, click the RESULTS icon to view
the test results. The TEST RESULTS window appears.
16. View the test results and close the TEST RESULTS window.
17. Close the test.
25. Click the FAX ORDER NO. window title bar with the pointing hand
cursor. The OBJECT SELECTION - CHECKPOINT PROPERTIES dialog box
appears.
26. In the OBJECT SELECTION - CHECKPOINT PROPERTIES dialog box, click
OK. The CHECKPOINT PROPERTIES dialog box appears.
27. In the CHECKPOINT PROPERTIES dialog box, check the TEXT check box.
Uncheck all other check boxes.
28. Select the TEXT property and ensure that the CONSTANT option is
selected.
29. Click the CONSTANT VALUE OPTIONS button next to the CONSTANT
field. The CONSTANT VALUE OPTIONS dialog box appears.
30. In the VALUE field, replace the existing text with FAX ORDER NO..*.
31. Check the REGULAR EXPRESSION check box.
32. In the dialog box that appears, click NO.
33. Click OK.
34. In the CHECKPOINT PROPERTIES dialog box, click OK.
35. In the FAX ORDER NO. window, in the FAX NUMBER field, type
4255550150 and click SEND.
36. In the FLIGHT RESERVATION window, click the NEW ORDER button to
set the end condition.
37. On the QuickTest Professional toolbar, click STOP.
38. Modify the object properties for the FAX ORDER NO. title bar step to use
the regular expression. To do this:
39. From the QuickTest Professional menu bar, select RESOURCES >
OBJECT REPOSITORY. The OBJECT REPOSITORY dialog box appears.
40. In the OBJECT REPOSITORY dialog box, select the FAX ORDER NO. object.
41. In the OBJECT PROPERTIES pane, select the TEXT property row.
42. Click the VALUE column. The CONFIGURE THE VALUE button appears.
43. Click the CONFIGURE THE VALUE button. The VALUE CONFIGURATION
OPTIONS dialog box appears.
13. On the QuickTest Professional toolbar, click the RESULTS button. The
TEST RESULTS window appears. The output is displayed in RUN-TIME
DATA TABLE in the ORDER_NO_TEXT_OUT column of the TEST RESULTS
window.
14. Close the QuickTest Professional and Flight Reservation applications.
TO
TO
12. IN THE SELECT ACTION dialog box, from the FROM TEST list, browse and
select the LABCH8_3_NEWORDER test.
13. In the ACTION list, ensure that FLIGHT_NEWORDER is selected.
14. Ensure that the AFTER THE CURRENT STEP option is selected.
15. In KEYWORD VIEW, COPY
FLIGHT_LOGIN test.
OF
4. In the OBJECT SELECTION dialog box, click OK. This adds the LOGIN
object to the object repository tree in the SELECT OBJECT FOR STEP
dialog box.
5. Repeat steps 3 and 4 for the AGENT NAME and PASSWORD fields, and for
the OK button in the LOGIN dialog box.
6. Verify that all of the objects that you have added appear in the object
repository tree in the SELECT OBJECT FOR STEP dialog box.
7. In the object repository tree, select the LOGIN window object.
8. Click OK.
The object is added to the IF statement in KEYWORD VIEW.
13. In the VALUE column, type the absolute path for the Flight Reservation
application:
C:\PROGRAM FILES\MERCURY INTERACTIVE\QUICKTEST
PROFESSIONAL\SAMPLES\FLIGHT\APP\FLIGHT4A.EXE.
14. Click OK.
15. Run the test.
16. It takes a few seconds to view the test run.
17. In KEYWORD VIEW, select the last step.
18. From the QuickTest Professional menu bar, select INSERT > NEW STEP.
A new step is added.
19. From the list, select OBJECT FROM REPOSITORY. The SELECT OBJECT FOR
STEP dialog box appears.
20. In the SELECT OBJECT FOR STEP dialog box, in the object repository tree,
select the LOGIN window object and click OK.
21. In the KEYWORD VIEW, select the LOGIN step.
22. FROM THE QUICKTEST PROFESSIONAL menu bar, select INSERT > NEW
STEP. A new step is added.
23. From the list, select AGENT NAME.
24. In the VALUE column, type LAURENCE.
25. From the QuickTest Professional menu bar, select INSERT > NEW STEP.
A new step is added.
26. From the list, select PASSWORD.
27. In the VALUE column, type MERCURY.
28. FROM THE QUICKTEST PROFESSIONAL menu bar, select INSERT > NEW
STEP. A new step is added.
29. From the list, select OK.
30. Close the LOGIN window.
31. Save the test as LABCH9_5.
32. Run the test.
formula:
=ROUND(A1*B1,2)=ROUND(C1,2)
11. Click the VALUE cell of this step and overwrite TRUE with
VPRICECHK=TRUE.
the right arrow button to add each column to the COLUMNS IN YOUR
QUERY list. Click NEXT.
14. In the QUERY WIZARD - FILTER DATA dialog box, click NEXT.
15. In the QUERY WIZARD - SORT ORDER dialog box, from the SORT BY list,
select ORDER_NUMBER.
16. Select the DESCENDING option, and click NEXT.
17. In the QUERY WIZARD - FINISH dialog box, click SAVE QUERY.
18. In the SAVE AS dialog box, click SAVE to save the query by the default
query name. The QUERY WIZARD - FINISH dialog box appears.
19. Ensure that the EXIT AND RETURN TO QUICKTEST PROFESSIONAL option
is selected.
20. Click FINISH. The DATABASE CHECKPOINT PROPERTIES dialog box
displays a table that shows the result set of the SQL query.
the right arrow button to add each column to the COLUMNS IN YOUR
QUERY list. Click NEXT.
14. In the QUERY WIZARD - FILTER DATA dialog box, click NEXT.
15. In the QUERY WIZARD - SORT ORDER dialog box, from the SORT BY list,
select ORDER_NUMBER.
16. Select the DESCENDING option, and click NEXT.
17. In the QUERY WIZARD - FINISH dialog box, click SAVE QUERY.
18. In the SAVE AS dialog box, click SAVE to save the query by the default
query name. The QUERY WIZARD - FINISH dialog box appears.
19. Ensure that the EXIT AND RETURN TO QUICKTEST PROFESSIONAL option
is selected.
20. Click FINISH. The DATABASE CHECKPOINT PROPERTIES dialog box
displays a table that shows the result set of the SQL query.
CATEGORY: Functions
b. LIBRARY: All
c. OPERATION: InvokeApplication
d. ARGUMENTS: COMMAND - Value
C:\Program Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe".
5. Click OK.
6. Run the test to make sure the step produces the expected result, the
invocation of the Flights application with a Login window.
7. Leave the Login window up on desktop.
8. Save this test as RECOVERY_SCENARIO.
5. Replace the original encrypted Set Secure string with a Set operation and
the understandable password "mercury".
6. Create a second row under Password with an incorrect password value
of "merc".
7. Execute the test. You will notice that on the second iteration, the test
encounters a pop up message indicating that an incorrect password has
been entered.
8. Stop the test, but leave the error message on desktop.
16. Click the ADD button to move the process from left to right.
17. Click the NEXT button.
18. You are now back in the Recovery Operations window and the two
operations should be listed.
19. Uncheck the Add another box.
20. Click the NEXT button.
21. You are in the Post-Recovery Test Run options window.
22. Choose Proceed to next test iteration.
23. Save the test as Incorrect Password Error
24. Click FINISH.
25. Click CLOSE.
26. Add this recovery scenario to the current test.
27. Run the test to ensure that it works as expected. You will notice that the
test hangs.