qtp training session5-checkpoints

Upload: austinfru

Post on 14-Apr-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 QTP Training Session5-Checkpoints

    1/19

    Quick Test Professional - QTPSession -5VeriTest, Chennai

  • 7/27/2019 QTP Training Session5-Checkpoints

    2/19

    2

    Session-5: Agenda

    What is a Checkpoint

    Checkpoint Types

    Standard Checkpoint

    How to add a standard checkpoint

    Modifying Checkpoints

    Database Checkpoint

    Creating a Database Checkpoint

    Q & AAssignment

  • 7/27/2019 QTP Training Session5-Checkpoints

    3/19

    3

    What is a Checkpoint

    A checkpointis a verification point that compares a current value for aspecified property with the expected value for that property. This helps toidentify whether the Web site or application is functioning correctly.

    During the test run, QuickTest compares the expected results of thecheckpoint to the current results. If the results do not match, the checkpointfails.

    Results of the checkpoint can be viewed in the Test Results window.

  • 7/27/2019 QTP Training Session5-Checkpoints

    4/19

    4

    Check Points Types

    Wide range of checkpointsStandard

    Text / Text Area

    XML

    HTML

    Table

    Database

    Bitmap

    Image

    Accessibility

  • 7/27/2019 QTP Training Session5-Checkpoints

    5/19

    5

    Standard Checkpoint

    Standard Checkpoint checks the property value of an object in your applicationor Web page. The standard checkpoint checks a variety of objects such as buttons,radio buttons, combo boxes, lists, etc.

    When a checkpoint is added to your test, QuickTest adds a checkpoint to the

    current row in the Keyword View and adds a Check CheckPoint statement in theExpert View.

  • 7/27/2019 QTP Training Session5-Checkpoints

    6/19

    6

    To add a standard checkpoint while recording:

    1 Click the Insert Checkpoint toolbar button or choose Insert > Checkpoint >Standard Checkpoint.

    The QuickTest window is minimized and the mouse pointer turns into a pointing

    hand.

    2Click the object you want to check. Select an Object dialog box opens.

    3Select the item you want to check from the displayed object tree.

    How to add a standard checkpoint

  • 7/27/2019 QTP Training Session5-Checkpoints

    7/19

    7

    How to add a standard checkpoint. Contd.

    4 ClickOK. The Checkpoint Properties dialog box opens.In the CheckpointProperties dialog box, you can specify which properties of the object to check andedit the values of these properties

  • 7/27/2019 QTP Training Session5-Checkpoints

    8/19

    8

    How to add a standard checkpoint. Contd.

    5. ClickOKto close the dialog box. A checkpoint statement is added for theselected object in the Keyword View and Expert View.

    Ex:

    Dialog("Login").WinButton("OK").Check CheckPoint("OK")

  • 7/27/2019 QTP Training Session5-Checkpoints

    9/19

    9

    Bitmap Checkpoint

    Bitmap Checkpoint checks an area of your Web page or application as abitmap.

    Bitmap checkpoint depends upon the screen resolution

    How to add a Bitmap checkpoint:

    1.While recording select the Insert Menu->Checkpoint-> Select->Bitmap Checkpoint2.Select an image or bitmap as a check point to compare with the expected image

    3.The image added as a Checkpoint will be shown in the Keyword View with anicon

  • 7/27/2019 QTP Training Session5-Checkpoints

    10/19

    10

    Bitmap Checkpointcont..

    Expert View will have the code as below

    Example:

    Dialog(FlightReservation).WinObject("PagePreview").Check(CheckPoint("PagePreview"))

  • 7/27/2019 QTP Training Session5-Checkpoints

    11/19

    11

    Modifying Checkpoints

    To modify a checkpoint:

    1Right-click a row with a checkpoint in the Keyword View and choose CheckpointProperties, or select a row with a checkpoint and choose Step > CheckpointProperties. The relevant checkpoint dialog box opens.

    2Modify the properties and clickOK.

  • 7/27/2019 QTP Training Session5-Checkpoints

    12/19

    12

    Database Check Point

    You can create a check on a database in order to check the contents of the entireresult set, or a part of it. QuickTest captures the current data from the database andsaves this information as expected data.

    This checkpoint is displayed in the Expert View as a DbTable.Check

    Checkpoint statement and as a step in the Keyword View, as follows:

    When you run the test or component, the database checkpoint compares thecurrent data in the database to the expected data defined in the DatabaseCheckpoint Properties dialog box.

  • 7/27/2019 QTP Training Session5-Checkpoints

    13/19

    13

    Creating a Database Checkpoint

    To create a database checkpoint:

    1. Choose Insert > Checkpoint > Database Checkpoint. The Database Query

    Wizard opens.

    You can define the query for your checkpoint using Microsoft Query or by manuallyentering a database connection and SQL statement.

  • 7/27/2019 QTP Training Session5-Checkpoints

    14/19

    14

    Creating a Database Checkpoint

    2. Select your database selection preferences and clickNext. You can choose fromthe following options:

    Create query using Microsoft QueryOpens Microsoft Query, enabling youto create a new query.

    Specify SQL statement manuallyOpens the Specify SQL statementscreen in the wizard, which enables you to specify the connection string and anSQL statement.

    Maximum number of rowsSelect this check box if you would like to limitthe number of rows and enter the maximum number of database rows to check.

    Show me how to use Microsoft QueryDisplays an instruction screen whenyou clickNextbefore opening Microsoft Query.

  • 7/27/2019 QTP Training Session5-Checkpoints

    15/19

    15

    Creating a Database Checkpoint

    3. After choosing the database Query Wizard the Instructions for using theMicrosoft Query will be shown followed by a sequence of screens to completethe wizard.

  • 7/27/2019 QTP Training Session5-Checkpoints

    16/19

    16

    Creating a Database Checkpoint

    4. After choosing the columns from the table using Query Wizard the Wizard hasoption to exit from QTP or View/Edit data.

  • 7/27/2019 QTP Training Session5-Checkpoints

    17/19

    17

    3If you chose Create query using Microsoft Query in the previous step,Microsoft Query opens. Choose a data source and define a query.

    To choose a data source and define a query in Microsoft Query:

    Creating a Database Checkpoint

    When Microsoft Query opens during the insert database checkpointprocess,choose a new or an existing data source.

    Define a query.

    When you are done, in the Finish screen of the Query Wizard, select Exitand return to QuickTest Professional and clickFinish to exit Microsoft

    Query.

  • 7/27/2019 QTP Training Session5-Checkpoints

    18/19

    18

    Creating a Database Checkpoint

    4The Checkpoint Properties dialog box opens. Select the checks to perform on theresult set

    5ClickOKto close the dialog box. A checkpoint statement is added for the selectedobject in the Keyword View and Expert View.

  • 7/27/2019 QTP Training Session5-Checkpoints

    19/19

    19

    Creating a Database Checkpoint

    Alternatively if we chose Specify SQL statement in the previous step,the Specify SQL statement screen opens.

    To specify SQL statements:

    1.Choose Specify SQL statement in the Database Query Wizard screen. The

    following screen opens:

    2.Specify the connection string and the SQL statement, and clickFinish.

    3. Proceed and finish the process.