Академический Документы
Профессиональный Документы
Культура Документы
9. Click INSERT ORDER. 10. On the FLIGHT RESERVATION window toolbar, click NEW ORDER to set end conditions. 11. On the QuickTest Professional toolbar, click STOP to end the recording session. 12. Save the test as LABCH4_1.
2. On the QuickTest Professional toolbar, click the OBJECT SPY button. The OBJECT SPY dialog box appears. 3. In the OBJECT SPY dialog box, click the pointing finger button. The mouse cursor changes to a pointing finger. 4. In the F LIGHT RESERVATION window, click the NAME field with the pointed finger cursor. The OBJECT SPY dialog box shows the object properties for the NAME field. 5. Document the following object property values: a) CLASS NAME ______________________ b) ENABLED ______________________ c) ATTACHED TEXT _____________________ d) NATIVECLASS ______________________ 6. Close the OBJECT SPY dialog box.
13. Type the following purchase data: NAME: MAURA TICKETS: 2 CLASS: FIRST 14. Click INSERT ORDER. 15. Wait until the INSERT DONE... message appears. 16. On the Flight Reservation toolbar, click NEW ORDER to set end conditions. 17. On the QuickTest Professional toolbar, click STOP to stop recording. 18. Save the test as LABCH5_1.
CLASS: First
10. Click the INSERT ORDER button. Wait for the progress bar to complete and for the words INSERT DONE... to appear. 11. In the QUICKTEST PROFESSIONAL window, select INSERT CHECKPOINT STANDARD CHECKPOINT. The cursor changes to a pointing hand. 12. In the FLIGHT RESERVATION window, in the progress bar, click the words INSERT DONE... with the pointing hand cursor. The OBJECT SELECTION - CHECKPOINT PROPERTIES dialog box appears. 13. In the OBJECT SELECTION - CHECKPOINT PROPERTIES dialog box, click OK. The CHECKPOINT PROPERTIES dialog box appears. 14. In the CHECKPOINT PROPERTIES dialog box, check the TEXT property and uncheck all other properties. 15. Click OK. 16. In the FLIGHT RESERVATION toolbar, click the NEW ORDER button to set end condition for the test. 17. On the QuickTest Professional toolbar, click STOP to stop the test. 18. Save the test as LABCH6_1.
the insert done operation. 2. In ACTIVE SCREEN, right-click the ORDER NO: field (not on static text) and select INSERT STANDARD CHECKPOINT. The OBJECT SELECTION - CHECKPOINT PROPERTIES dialog box appears. 3. In the OBJECT SELECTION - CHECKPOINT PROPERTIES dialog box, click OK. 4. In the CHECKPOINT PROPERTIES dialog box, uncheck all the check boxes except TEXT. Note: Ensure that when you select the TEXT property, the ORDER NO appears in the CONSTANT field. 5. Click OK. 6. Save the test as LABCH6_3. 7. On the QuickTest Professional toolbar, click RUN to run the test. The test should fail. 8. View the test results.
9. On the QuickTest Professional toolbar, click RUN to run the test. The test should pass.
2. Check whether the COMMENT column is visible in KEYWORD VIEW. 3. If the COMMENT column is not visible, right-click any column name in KEYWORD VIEW and from the menu, select COMMENT. 4. In KEYWORD VIEW, select the ORDER NO. step. 5. Click the COMMENT column. Type A UNIQUE ORDER IS GENERATED EVERY TIME YOU INSERT AN ORDER. in the COMMENT column. 6. Save the test as LABCH6_5.
CONFIGURE THE VALUE button. 4. Click the CONFIGURE THE VALUE button. The VALUE CONFIGURATION OPTIONS dialog box appears. 5. Ensure that the CONSTANT option is selected. 6. In the CONSTANT field, type .*. 7. Check the REGULAR EXPRESSION check box. A dialog box appears. 8. In the dialog box, click NO. 9. Click OK. 10. Close the OBJECT REPOSITORY dialog box. 11. Save the test as LABCH6_8. 12. Run the test. 13. View the test results. The test should pass. 14. Close the TEST R ESULTS window.
CLASS: First
12. Click INSERT ORDER. 13. Wait for the progress bar to complete and the words INSERT DONE... to appear. 14. Insert a synchronization point on the INSERT ORDER... step. To do this: a) From the QuickTest Professional menu bar, select INSERT SYNCHRONIZATION POINT after the progress bar completes. The cursor changes to a pointed finger. b) In the F LIGHT RESERVATION window, in the progress bar, click the words INSERT DONE... with the pointed finger cursor. The OBJECT SELECTION SYNCHRONIZATION POINT dialog box appears. c) In the OBJECT SELECTION - SYNCHRONIZATION POINT dialog box, click OK. The ADD S YNCHRONIZATION POINT dialog box appears. d) From the PROPERTY NAME list, select TEXT. e) In the PROPERTY VALUE field, type "INSERT DONE...". f) Retain the default timeout of 10000 milliseconds. g) Click OK. An INSERT DONE (Wait Property) step is added in KEYWORD VIEW. 15. Add a standard checkpoint that uses a regular expression on the FAX ORDER NO. window title bar. To do this: a) From the Flight Reservation menu bar, select FILE FAX ORDER. The FAX ORDER NO. window appears. b) From the QuickTest Professional menu bar, select INSERT CHECKPOINT STANDARD CHECKPOINT. The cursor changes to a pointing hand. c) Click the FAX ORDER NO. window title bar with the pointing hand cursor. The OBJECT SELECTION - CHECKPOINT PROPERTIES dialog box appears. d) In the OBJECT SELECTION - CHECKPOINT PROPERTIES dialog box, click OK. The CHECKPOINT PROPERTIES dialog box appears. e) In the CHECKPOINT PROPERTIES dialog box, check the TEXT check box. Uncheck all other check boxes. f) Select the TEXT property and ensure that the CONSTANT option is selected. g) Click the CONSTANT VALUE OPTIONS button next to the CONSTANT field. The CONSTANT VALUE OPTIONS dialog box appears. h) In the VALUE field, replace the existing text with FAX ORDER NO..*. i) Check the R EGULAR EXPRESSION check box. j) In the dialog box that appears, click NO. k) Click OK. l) In the CHECKPOINT PROPERTIES dialog box, click OK. m) In the FAX ORDER NO. window, in the FAX NUMBER field, type 4255550150 and click SEND. n) In the F LIGHT RESERVATION window, click the NEW ORDER button to set the end condition.
o) On the QuickTest Professional toolbar, click STOP. 16. Modify the object properties for the FAX ORDER NO. title bar step to use the regular expression. To do this: a) From the QuickTest Professional menu bar, select RESOURCES OBJECT REPOSITORY. The OBJECT REPOSITORY dialog box appears. b) In the OBJECT REPOSITORY dialog box, select the FAX ORDER NO. object. c) In the OBJECT PROPERTIES pane, select the TEXT property row. d) Click the VALUE column. The CONFIGURE THE VALUE button appears. e) Click the CONFIGURE THE VALUE button. The VALUE CONFIGURATION OPTIONS dialog box appears. f) Ensure that the CONSTANT option is selected. g) In the CONSTANT field, replace the existing text with FAX ORDER NO..*. h) Check the REGULAR EXPRESSION check box. i) In the dialog box that appears, click NO. j) In the VALUE CONFIGURATION OPTIONS dialog box, click OK. k) Close the OBJECT REPOSITORY dialog box. 17. Save the test as LABCH7_1. 18. Run the test. 19. On the QuickTest Professional toolbar, click the RESULTS button to view the test results. The test should pass.
5. In the VALUE CONFIGURATION OPTIONS dialog box, change the parameter type from DATATABLE to RANDOM NUMBER. 6. Change the NUMERIC RANGE from 0 to 100 to 1 to 10. 7. Check the NAME check box and in the NAME field, type TICKETS_OUT. 8. Ensure that the FOR EACH ACTION ITERATION option is selected. 9. Click OK. 10. Save the test as LABCH7_4. 11. Run the test. 12. 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. 13. Close the QuickTest Professional and Flight Reservation applications.
1. Ensure that the LABCH8_1_F LIGHTLOGIN test is open. 2. In KEYWORD VIEW, right-click the ACTION1 step and select ACTION PROPERTIES from the menu. The ACTION PROPERTIES dialog box appears. 3. In the ACTION PROPERTIES dialog box, from the GENERAL tab, in the N AME field, replace ACTION1 with FLIGHT_LOGIN. 4. Check the REUSABLE ACTION check box. 5. Click OK. The HINT dialog box appears. 6. In the HINT dialog box, click OK. 7. Save the test.
2. Rename the default ACTION1 as FLTBUSPROCESS. Note: This name is an abbreviation for Flight Business process and this action is not reusable. 3. In the QUICKTEST PROFESSIONAL window, select the FLTBUSPROCESS action. 4. From the QuickTest Professional menu bar, select INSERT CALL TO COPY OF ACTION. The SELECT ACTION dialog box appears. 5. In the S ELECT ACTION dialog box, browse, and select the LABCH8_1_FLIGHTLOGIN test. 6. In the ACTION list, ensure that FLIGHT_LOGIN is selected. 7. Ensure that the AFTER THE CURRENT STEP option is selected. 8. Click OK. In KEYWORD VIEW, COPY OF F LIGHT_LOGIN appears. 9. In the KEYWORD VIEW, select the FLTBUSPROCESS action. 10. From the QuickTest Professional menu bar, select INSERT CALL TO COPY OF ACTION. 11. In the SELECT ACTION dialog box, from the F ROM TEST list, browse and select the LABCH8_3_NEWORDER test. 12. In the ACTION list, ensure that FLIGHT_NEWORDER is selected. 13. Ensure that the AFTER THE CURRENT STEP option is selected. Note: In KEYWORD VIEW, COPY OF F LIGHT_NEWORDER appears before the FLIGHT_L OGIN test. 14. Drag and drop the FLIGHT_LOGIN action before the F LIGHT_NEWORDER action. 15. Save the test as LABCH8_4_FLTBUSPROCESS. 16. Close the FLIGHT RESERVATION window and then launch the L OGIN window of the application. 17. Run the test. The test should pass. 18. Close the QuickTest Professional and Flight Reservation applications.
Note: Verify that all of the objects that you have added appear in the object repository tree in the SELECT OBJECT FOR STEP dialog box. 6. In the object repository tree, select the LOGIN window object. 7. Click OK. The object is added to the IF statement in KEYWORD VIEW.
5. In the DETAILS field, type THE FLIGHT RESERVATION APPLICATION LOGIN IS SUCCESSFUL. 6. Click OK. 7. Close the Flight Reservation application and open it again but do not log on. 8. Save the test as LABCH9_4. 9. Run the test. Note: View the test results to see how the REPORTER EVENT reports the test status.
13. Click OK. 14. Run the test. Note: It takes a few seconds to view the test run. 15. In KEYWORD VIEW, select the last step. 16. From the QuickTest Professional menu bar, select INSERT NEW STEP. A new step is added. 17. From the list, select OBJECT FROM REPOSITORY. The SELECT OBJECT FOR STEP dialog box appears. 18. In the SELECT OBJECT FOR STEP dialog box, in the object repository tree, select the LOGIN window object and click OK. 19. In the KEYWORD VIEW, select the LOGIN step. 20. From the QuickTest Professional menu bar, select INSERT NEW STEP. A new step is added. 21. From the list, select AGENT NAME. 22. In the VALUE column, type LAURENCE. 23. From the QuickTest Professional menu bar, select INSERT NEW STEP. A new step is added. 24. From the list, select PASSWORD. 25. In the VALUE column, type MERCURY. 26. From the QuickTest Professional menu bar, select INSERT NEW STEP. A new step is added. 27. From the list, select OK. 28. Close the LOGIN window. 29. Save the test as LABCH9_5. 30. Run the test.
31. View the test results. Note: Verify that the ELSE statement was executed. 32. Close the QuickTest Professional and Flight Reservation applications.
Verify that a new flight reservation can be made for one to four passengers (hint:
standard checkpoint).
Verify that the YOUR ITINERARY HAS BEEN BOOKED! text appears on the FLIGHT
CONFIRMATION Web page (hint: text checkpoint).
Verify that the transaction is successful for three different combinations of cities
(hint: parameters). This exercise consists of the following parts: Part 1: Prepare the test environment. Part 2: Record a test on the Web application. Part 3: Insert a standard checkpoint and a text checkpoint. Part 4: Use parameters to store city names.
Password: BEAN
10. Click SIGN-IN. Ensure that the FLIGHT FINDER Web page appears. Note: The FLIGHT FINDER Web page is the initial and end condition for creating this test.
9. Click SECURE PURCHASE to book a flight. 10. On the left side of the FLIGHT CONFIRMATION Web page, click the FLIGHTS link to set the initial condition for the test. 11. On the QuickTest Professional toolbar, click STOP. 12. Save the test as LABCH10_2.
3. In the VALUE CONFIGURATION OPTIONS dialog box, select the PARAMETER option. 4. In the NAME field, type FROMPORT. 5. Click OK. 6. Perform steps 1 to 5 for the TOPORT step and name the parameter as TOPORT. 7. In DATA TABLE, type the following names of cities in the FROMPORT column: FRANKFURT LONDON PORTLAND 8. In DATA TABLE, type the following names of cities in the TOPORT column: SEATTLE ZURICH SYDNEY 9. Save the test as LABCH10_4. 10. Run the test and view the test results in the TEST RESULTS window. The test passes. 11. Close the QuickTest Professional application and the Mercury Tours Web browser.
5. Check the TEXT check box and click MODIFY. The OUTPUT OPTIONS dialog box appears. 6. In the NAME field, type NTICKETS. 7. Click OK to close the OUTPUT OPTIONS dialog box. 8. Select the AFTER CURRENT STEP option. 9. Click OK to close the OUTPUT VALUE PROPERTIES dialog box. 10. Verify that: a) A TICKETS step appears in KEYWORD VIEW that has the OUTPUT value in the OPERATION column. b) A column named NTICKETS appears in the GLOBAL sheet of DATA TABLE. 11. From ACTIVE SCREEN, select the PRICE field and perform steps 2 through 10 to create an output parameter NPRICE. 12. From ACTIVE SCREEN, select the TOTAL field and perform steps 2 through 10 to create an output parameter NTOTAL. 13. Double-click the fourth column in the GLOBAL sheet of DATA TABLE that does not have a name. The CHANGE PARAMETER NAME dialog box appears. 14. In the DATA TABLE COLUMN NAME field, type PRICECHK. 15. Click OK. The new column name appears in the DATA TABLE. 16. Save the test as LABCH11_2.
3. To perform the calculation, press ENTER. The TRUE value appears in the PRICECHK column.
4. Change the value of NTICKETS to 2 and press ENTER. The FALSE value appears in the PRICECHK column.
6. In KEYWORD VIEW, select the IF statement. 7. From the QuickTest Professional menu bar, select INSERT CONDITIONAL STATEMENT ELSE. The ELSE statement line is highlighted. 8. From the QuickTest Professional menu bar, select INSERT REPORT. The INSERT REPORT dialog box appears. 9. In the S TATUS list, select FAILED. 10. In the NAME field, type TOTAL. 11. In the DETAILS field, type TOTAL WAS NOT CALCULATED SUCCESSFULLY. 12. Click OK. 13. Save the test as LABCH11_5. 14. Ensure that the AUT is in the initial condition. 15. Run the test and view the test results. 16. In the TEST RESULTS window, check that the REPORTER EVENT step reports the correct status based on the outcome of the test. 17. Verify that the value of PRICECHK is TRUE in RUN-TIME DATA TABLE of the TEST RESULTS window.
5. Open the TEST RESULTS window. The test fails. 6. Expand all steps in the TEST RESULTS window to view the output of the R EPORTER step. 7. Check the values in RUN-TIME DATA TABLE to see which values passed. 8. Close the QuickTest Professional and Flight Reservation applications.
10. In the PROPERTY VALUE field, type "INSERT DONE...". 11. In the TIMEOUT field, retain the default value. 12. Click OK. 13. In the FLIGHT RESERVATION window, click the NEW ORDER button to set end conditions for the test. 14. On the QuickTest Professional toolbar, click STOP to stop the test. 15. Save the test as LABCH12_1. 16. In KEYWORD VIEW, select the INSERT DONE step. 17. In ACTIVE SCREEN, right-click the ORDER NO field, and select INSERT OUTPUT VALUE to create an output parameter. The OBJECT SELECTION - OUTPUT VALUE PROPERTIES dialog box appears. 18. Click OK. The OUTPUT VALUE PROPERTIES dialog box appears. 19. Check the TEXT check box, and click MODIFY. The OUTPUT OPTIONS dialog box appears. 20. In the NAME field, type GUIORDER_NO. 21. Click OK to close the OUTPUT OPTIONS dialog box. 22. In the OUTPUT VALUE PROPERTIES dialog box, select the AFTER CURRENT STEP option. 23. Click OK to close the OUTPUT VALUE PROPERTIES dialog box. 24. Verify that: a) The KEYWORD VIEW has an ORDER NO step that has the OUTPUT value in the OPERATION column. b) The GLOBAL sheet of DATA TABLE has a column named GUIORDER_NO. 25. Repeat steps 17 to 24 to create an output parameter for the number of tickets and name it as NTICKETS. 26. Save the test. 27. Run the test to verify that the new order number and the number of tickets are
14. In the QUERY WIZARD - SORT ORDER dialog box, from the SORT BY list, select ORDER_NUMBER. 15. Select the DESCENDING option, and click NEXT. 16. In the QUERY WIZARD - F INISH dialog box, click SAVE QUERY. 17. In the SAVE AS dialog box, click SAVE to save the query by the default query name. The QUERY WIZARD - FINISH dialog box appears. 18. Ensure that the EXIT AND RETURN TO QUICKTEST PROFESSIONAL option is selected. 19. Click FINISH. The DATABASE CHECKPOINT PROPERTIES dialog box displays a table that shows the result set of the SQL query.
2. Click the ADD TO CHECK button to select the first cell of the TICKETS column. 3. In the CONFIGURE VALUE section, select the PARAMETER option, and click the PARAMETER OPTIONS button. 4. In the PARAMETER OPTIONS dialog box, from the NAME list, select NTICKETS and click OK to close the PARAMETER OPTIONS dialog box. 5. Click OK to close the DATABASE CHECKPOINT PROPERTIES dialog box. 6. Save the test as LABCH12_4.
REPOSITORY. The OBJECT REPOSITORY dialog box appears. 2. On the OBJECT REPOSITORY toolbar, click the ASSOCIATE REPOSITORIES button. The ASSOCIATE REPOSITORIES dialog box appears. 3. Click the ADD R EPOSITORY button. The ADD SHARED OBJECT REPOSITORY dialog box appears. 4. Navigate to the directory in which you saved the F LIGHT.TSR file, and open the file. 5. In the ASSOCIATE REPOSITORIES window, in the AVAILABLE ACTIONS list, select ACTION 1, and use the right-arrow button to move the action to the ASSOCIATED ACTIONS list. 6. Click OK. The objects are added in the local object repository. 7. Close the OBJECT REPOSITORY dialog box. 8. Close the QuickTest Professional and Flight Reservation applications
14. On the QuickTest Professional toolbar, click RUN. Click OK to accept the R UN settings.
10. In the NAME field, type PENCIL. 11. In the COLLECTION NAME box, type PAINT. 12. Select the YES option. 13. Click NEXT. The MAP TO A STANDARD CLASS page appears. 14. From the CLASS list, select TABLE. 15. In the NUMBER OF ROWS box, type 2. 16. In the NUMBER OF COLUMNS box, type 14. 17. Click NEXT. 18. On the MARK VIRTUAL OBJECT page that appears, click MARK OBJECT. 19. Use the cross-hairs cursor to draw a rectangle around the color palette in the Paint application. 20. Click NEXT. The OBJECT CONFIGURATION page appears. 21. Ensure that the PARENT ONLY option is selected, and click NEXT. The SAVE VIRTUAL OBJECT page appears. 22. In the NAME field, type COLOR. 23. In the COLLECTION NAME box, ensure that PAINT is selected. 24. Ensure that the N O option is selected. 25. Click FINISH.
4. Click NO when prompted to save the existing drawing. 5. From the QuickTest Professional menu bar, select AUTOMATION ANALOG RECORDING. The ANALOG RECORDING SETTINGS dialog box appears. 6. In the ANALOG RECORDING SETTINGS dialog box, select R ECORD RELATIVE TO THE FOLLOWING WINDOW.
Part 1: Use Parameters to Store Input Values for Month and Year
1.Open QuickTest Professional. 2. In the QUICKTEST PROFESSIONAL - ADD-IN MANAGER dialog box, check the WEB check box. 3. Click OK. 4. Open the LABCH10_2 test that you created in Chapter 10, Creating Tests on a Web Application, Exercise: Creating Tests on a Web Application. 5. Save the test as LABCH16_1. 6. In KEYWORD VIEW, expand the BOOK A FLIGHT: MERCURY step. 7. In KEYWORD VIEW, click the VALUE column of the CC_EXP_DT_MN step to store the value of month in a parameter. The CONFIGURE THE VALUE button appears. 8. Click the CONFIGURE THE VALUE button. 9. In the VALUE CONFIGURATION OPTIONS dialog box, select the PARAMETER option. 10. In the NAME field, type MONTH. 11. Click OK. 12. Perform steps 7 to 11 for the CC_EXP_DT_YR step to store the value of year in the YEAR parameter.
13. In DATA TABLE, append the following data in the MONTH column: 11 10 14. In DATA TABLE, append the following data in the YEAR column: 2005 2003 15. Save the test.
3. In the S CENARIOS section, click the NEW SCENARIO button to display RECOVERY SCENARIO WIZARD. 4. Click NEXT. The S ELECT TRIGGER EVENT page appears. 5. On the SELECT TRIGGER EVENT page, ensure that the POP-UP WINDOW option is selected. 6. Click NEXT. The S PECIFY POP-UP WINDOW CONDITIONS page appears. 7. Click the pointing hand button, and then click the pop-up error message box that appears in the Mercury Tours Web application. 8. On the SPECIFY POP-UP WINDOW CONDITIONS page, click NEXT. The RECOVERY OPERATIONS page appears. 9. Click NEXT to define a recovery operation. 10. Ensure that the KEYBOARD OR MOUSE OPERATION option is selected. Click NEXT. 11. On the RECOVERY OPERATION - CLICK BUTTON OR PRESS KEY page, select the CLICK BUTTON WITH LABEL option. 12. Click the pointing hand button, and then click OK on the pop-up error message box that appears in the Mercury Tours Web application. 13. Click NEXT. The RECOVERY OPERATIONS page appears. 14. Clear the ADD ANOTHER RECOVERY OPERATION check box. 15. Click NEXT. The POST-RECOVERY TEST RUN OPTIONS page appears. 16. Select the PROCEED TO NEXT STEP test run option. 17. Click NEXT. The NAME AND DESCRIPTION page appears. 18. In the SCENARIO NAME field, type CREDIT CARD DATE ERROR. 19. In the DESCRIPTION field, type AN INVALID DATE WAS ENTERED IN THE CREDIT CARD DATE FIELD.