Automation Tool - QTP Part 2

Recording Tests

In this session we will see how to record a test and Analyzing the test.

1. Start QuickTest and open a new test.

2. Start  Programs  QuickTest professional QuickTest Professional.

(Note: Make sure Web addin’s is selected)

3. Choose File and click on the New Button.

4. A Blank Test Opens.

5. (In this session I have used Mercury Tour Website)

http://newtours.demoaut.com/

(Note: In the Web tab, select Open the following browser when a record or run session begins.

In the Windows Applications tab, confirm that Record and run on these applications (opened on session start) is selected, and that there are no applications listed )

 Log in to the website and enter the user name and password and click sign in.

 Enter the Flight details.

 Select a Flight and click continue.

 Enter required passenger and Purchase information.

 In the billing section, Select Ticketless Travel and at the bottom of the page, Click Secure Purchase.

 Click back to home page.

 Stop Recording

 Save your test (Select File > Save  Save dialog box opens. Create a Folder and save the file with a file name).

Analyzing the Test in the Keyword View

The columns in the Keyword View show different information for each step, as follows:

➤ Item—Displays the item for the step (test object, utility object, function call, or statement) in a hierarchical icon-based tree.

➤ Operation—The operation to be performed on the item, for example, Click or Select.

➤ Value—The argument values for the selected operation, for example, the mouse button to use when clicking the image.

➤ Assignment—The assignment of a value to or from a variable so you can use the value later in the test.

➤ Comment—Any textual information you want to add regarding the step, for example, Return to page used in first step of the test.

➤ Documentation—Auto-documentation of what the step does, in an easy-to-understand sentence, for example, Click the “findFlights” image.

Running and Analyzing Tests

Here we will see how to Run the tests.

1. Start  Programs  QuickTest professional QuickTest Professional.

2. Click open Existing.

3. Choose the File > open

4. Confirm that all images are saved to the test results.

5. Start running your test.

Click Run or choose Test > Run. The Run dialog box opens.

6. Select New run results folder. Accept the default results folder name. Click OK to close the Run dialog box.

7. When QuickTest finishes running the test, the Test Results window opens.

Choosing the Recording Mode

QuickTest's normal recording mode records the objects in your application and the operations performed on them. This mode is the default and takes full advantage of QuickTest's test object model recognizing the objects in your application regardless of their location on the screen.

When working with specific types of objects or operations however you may want to choose from the following alternative recording modes:

Analog Recording enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window. In this recording mode QuickTest records and tracks every movement of the mouse as you drag the mouse around a screen or window.

This mode is useful for recording operations that cannot be recorded at the level of an object for example recording a signature produced by dragging the mouse.

Note: You cannot edit analog recording steps from within QuickTest.

Low-Level Recording enables you to record on any object in your application whether or not QuickTest recognizes the specific object or the specific operation. This mode records at the object level and records all run-time objects as Window or WinObject test objects. Use low-level recording for recording in an environment or on an object not recognized by QuickTest. You can also use low-level recording if the exact coordinates of the object are important for your test or component.

Note: Steps recorded using low-level mode may not run correctly on all objects

No comments:

Post a Comment