37
Quick test Professional(QTP) Introduction Advantages and Disadvantages Why do we use it ? Functions and Features of QTP. Creating individual Tests in QTP, saving them in to Quality Center with naming convention.. Executing QTP Tests in Quality Centre(QC) Checking the Test Reports

QTP_PRESENTATION_Andy

Embed Size (px)

Citation preview

Page 1: QTP_PRESENTATION_Andy

Quick test Professional(QTP)

⁻ Introduction

⁻ Advantages and Disadvantages

⁻ Why do we use it ?

⁻ Functions and Features of QTP.

⁻ Creating individual Tests in QTP, saving them in to Quality Center with naming convention..

⁻ Executing QTP Tests in Quality Centre(QC)

⁻ Checking the Test Reports

Page 2: QTP_PRESENTATION_Andy

Our Project Project REQUIREMENTS

Project Planning

Naming conventions with Data Table.

Showing the test in QTP with features.

Running the test using features and functions.

Report of the individual test in QTP .

Saving QTP test to Quality Center with naming convention.

Integrating test in Quality Center

Running the integrated test in Quality Center

Correction of errors if any

Checking reports and emailing the test reports if required.

Page 3: QTP_PRESENTATION_Andy

Introduction

QTP stands for Quick Test Professional, a product

of Hewlett Packard (HP). This tool helps testers to perform an

automated functional testing seamlessly without monitoring once

script development is complete. HP QTP uses Visual Basic

Scripting (VBScript) for automating the applications.

HP Quick Test Professional was originally owned by Mercury

Interactive and it was acquired by HP. Its original name was Astra

Quick Test and later named as Quick Test Professional but the

latest version is known as Unified Functional Tester(UFT).

Page 4: QTP_PRESENTATION_Andy

Advantages and Disadvantages

Advantages Easy to use, ease of navigation, results validation and Report

generation.

Readily Integrated with Test Management Tool(HP-Quality Center) which enables easy scheduling and Monitoring.

Can also be used for Mobile Application Testing.

Disadvantages It takes considerable time and efforts to record all the tests.

Even though scripting time is less, the execution time is relatively higher as it puts load on CPU & RAM.

Page 5: QTP_PRESENTATION_Andy

Why do we use it ?

QTP is a Functional and Regression Testing Toolkit, that is Used to Check the Functionality of the Software Application, it is Based on Test Cases. Also, It is Used when the Test Case has to be Reused in Next Iteration and can Perform same Test again and again. Hence it is a Functional Testing tool.

It is used in Regression testing, because, If there are any Enhancements, upgrades and rollouts, QTP can measure the Difference between the Previous and the Latest outputs. In addition to that, it measures the impact of the Changes.

Page 6: QTP_PRESENTATION_Andy

Creating individual Tests in QTP, saving them in to Quality Center with naming convention.

After planning the requirement we can start

doing Individual tests in QTP.

After checking the reports, transfer or save in

Quality center with applicable Naming

convention in Test Plan.

Page 7: QTP_PRESENTATION_Andy

Functions and Features of QTP.

Simple interface.

Presents the test case as a business workflow to the tester (simpler to understand).

Uses a real programming language (Microsoft’s VBScript) with numerous resources available.

Data table integration better and easier to use.

Test Run Iterations/Data driving a test is easier and better.

Parameterization easier than other testing tools.

The Test Report is more robust.

Help menu, Recording, Playing back, Expert View, Keyword View, Document tabs, Status bar, Function Library, Data Table, Import, export, output value, checkpoints, loop Statements, calling functions and Test Flow.

Page 8: QTP_PRESENTATION_Andy

Executing QTP test in Quality Center

Data such as attachments and scripts (workflow script editor) can be saved and stored into the File System.

A Database consists of many tables where objects are stored such as Requirements, Tests, Runs, Test Sets, Bugs and so on.

Page 9: QTP_PRESENTATION_Andy

Checking the Test Reports

After running the test or component, we can view the results of the run in the Test Results window. We can view a summary of the results as well as a detailed report.

***************End of part one**************

Page 10: QTP_PRESENTATION_Andy

Project Requirement

The first requirement is to test the complete Procure to Payment cycle with creation of master data with multiple cost center and commitment checks.

The second requirement is to test the complete order to cash cycle with multiple cost center along with budget checking in FM area.

Both tests should be reusable and can be used as templates in the future, each one will have a separate data sheet.

Page 11: QTP_PRESENTATION_Andy

Project Planning

Baring the first requirement in the mind, We have decided to use one excel sheet for the complete P to P cycle. Along with that, we have decided to use one standard hierarchy of cost center, one Parent group cost center and four cost centers by inputting the values in the Data table and utilizing the features of import and export of Data table with naming convention.

Data Table: Assists you in parameterizing your test. The Data Table contains the Global tab and a tab for each action.

Import :Imports the specified Microsoft Excel file to the run-time Data Table.

Note :The imported table must match the test. The column names must match the parameters in the test, and the sheet names must match the action names.

Export: Saves a copy of the run-time Data Table in the specified location.

The next slide gives a clear picture of importance of naming conventions.

Page 12: QTP_PRESENTATION_Andy

Naming conventions with Data Table

Naming convention in Excel sheet and local sheet. Such as, Input values and output values.

It is very important to choose right names for columns. Because, if we do not give the exact name in the value configuration option, the system will not pick the right value in parameterizing. Moreover, if we add, “input” or “output” as a suffix to the name of the column, it will be easy for us to understand whether the system is picking the value or populating the value in the excel sheet.

Configuring a Selected Value :The Value Configuration Options dialog box enables you to define a selected value as a constant or a parameter. In some situations, you can also define the constant or parameter using a regular expression. (The following examples illustrate the Value Configuration Options dialog box with and without the Regular expression check box.)

Page 13: QTP_PRESENTATION_Andy

Adding Existing Output Values to a Test :QuickTest enables you to insert existing output values into your test.

When you insert an existing output value in your test, consider which output values should be used in multiple locations in your test. Each time an output value step is performed, the value contained in the output value is overwritten with the new output value. You should insert an existing output value into your test only if the stored value will no longer be needed by your test when the output value object is used again.

Page 14: QTP_PRESENTATION_Andy

Checkpoints :QuickTest enables you to add checks to your test. A checkpoint is a verification point that compares the current value for specified properties with the expected value for those properties. This enables you to identify whether your application is functioning correctly.

Keyword View :The Keyword View enables you to create and view the steps of your test in a keyword-driven, modular, table format. The Keyword View is comprised of a table-like view, in which each step is a separate row in the table, and each column represents different parts of the steps. You can modify the columns displayed to suit your requirements.

Expert View : If you prefer to work with VBScript statements, you can choose to work with your tests in the Expert View, as an alternative to using the Keyword View. You can move between the two views as you wish, by selecting the Expert View or Keyword View tab at the bottom of the Test pane in the QuickTest window.

Below is the sample of naming convention

Page 15: QTP_PRESENTATION_Andy

Showing the test in QTP with features

Below figure shows, how QTP looks in keyword View and import and export file statements

Page 16: QTP_PRESENTATION_Andy

Below figure shows, how QTP looks in export View and import and export file statements

Page 17: QTP_PRESENTATION_Andy

Running the test using features and functions

Before running the test, we need to know some facts of QTP.

When we import the Datasheet to an individual test. First we need to check Data Table Row counts. Because, the test runs on the number of rows in the Data Sheet. As, we are using the same Excel file, it is a good practice to use the calling function “exit test” at the end of test scripting. Or, we can set the test to run from which row to which row count in run properties. This setting can be done through run properties in settings. If, we failed to put “exit test” or set run properties settings, consequently , the test will fail.

Below figures shows the iteration settings

Specifies the iterations for the test. Select an option:

Run one iteration only. Runs the test only once, using only the first row in the global Data Table.

Run on all rows. Runs the test with iterations using all rows in the global Data Table.

Run from row __ to row __. Runs the test with iterations using the values in the global Data Table for the specified row range.

Page 18: QTP_PRESENTATION_Andy

Running the test for four cost centers.

Before giving the cost center input values in Datasheet, we should always check whether the cost center numbers are already exist in the system or not. If they exist the test will not be able to run. Consequently, the test will be a failed test.

Page 19: QTP_PRESENTATION_Andy

For loop statement

we have used the, “For” loop in the second requirement. Where we have to create sales order with budget checks. As, the sales order has the more than one item.

Page 20: QTP_PRESENTATION_Andy

Exit test : Exits the entire QuickTest test or Quality Center business process test, regardless of the run-time iteration settings. The pass or fail status of the test remains as it was in the step prior to the ExitTest statement.

We have used this function, wherever we were taking a single value from to data table to the test

Page 21: QTP_PRESENTATION_Andy

Wait Statements :You can enter Wait statements to instruct QuickTest to wait for a window to open or an object to appear. Wait statements instruct QuickTest to wait a specified amount of time before proceeding to the next step.

Wait(): we have used this statements, when we were checking budgets. As, while running the QTP test, it does not give us enough time to note the budget amount.

Page 22: QTP_PRESENTATION_Andy

Report of individual test in QTP

Page 23: QTP_PRESENTATION_Andy

Saving QTP test to Quality Center with naming convention

Naming convention in Test Plan folder structure in QC.

We have done individual tests according to the transaction codes. Reason behind that is, the requirement is P to P cycle. In this cycle there are few SAP modules included. So, we have decided to store the tests according to modules. For example, we tested KS01 which is Controlling module transaction code.

To save this KS01 test we have created Controlling folder. Under Controlling folder we have created KS01 Transaction code folder. Under this transaction code folder we have saved this test KS01. if we have to do KS01 testing for other cycles, we can differentiate that with the test name.

All the folders are saved in test plan in Quality Center.

The next slide gives us a clear view of test plan tree

Page 24: QTP_PRESENTATION_Andy
Page 25: QTP_PRESENTATION_Andy
Page 26: QTP_PRESENTATION_Andy

Integrating test in Quality Center

Creating test sets and choosing which tests to include in each set. A test set is a group of tests in a Quality Center project designed to achieve specific testing goals.

Creation of a test set, select the tests from test plan and integrate them in the test lab.

Page 27: QTP_PRESENTATION_Andy

Running the integrated test in Quality Center

We have two integrated tests to run.

The First is to test complete Procure to Payment cycle with creation of master data with multiple cost center and commitment checks.

The second is to test the complete order to cash cycle with multiple cost center along with budget checking in FM area.

In QC we have two ways of running the test. Run test and Run all

To run tests automatically

Select a test from the test sets tree or the test sets grid and click Run.

Select a test set and click Run all, the tests in a test set will run automatically.

Page 28: QTP_PRESENTATION_Andy

The below is the P to P cycle test in Quality center

After integrating all the tests from test plan, select a test or tests and click run. Or , click on select test and click on Run all.

Next slide will show how Run all test works .

Page 29: QTP_PRESENTATION_Andy

After coming to this window click run all. Next slide will show the results.

Page 30: QTP_PRESENTATION_Andy

After completing the test we can see the individual test results in status column.

Page 31: QTP_PRESENTATION_Andy

Correction of errors if any

The current status of the test. A test status can be one of the

following:

Failed. The test run failed.

N/A. The current status of the test is not applicable.

No Run. The test has not been run.

Not Completed. The test run was not completed.

Passed. The test run was successful.

Page 32: QTP_PRESENTATION_Andy

Checking and emailing the test reports if required

There are few ways that we can send the test reports in the email. The common ways are (Manual and automatic.)

Manually sending reports via email.

In the QC test lab window select the test that we want to send and select the execution grid. Then in execution grid right click and click on export then select the tests that we want to send. Then , save those files to the local system. From, the system we can use as an attachment to our email and can send it.

Note : It will save in Excel format and it saves as read only file.

Below slide will give an idea of manually sending email.

Page 33: QTP_PRESENTATION_Andy

After clicking on All, a new window will open you can save the files there. Next slide will show how it looks like.

Page 34: QTP_PRESENTATION_Andy

When we save, and opens it looks like the below file in excel file

Page 35: QTP_PRESENTATION_Andy

Automatic reports via emails.

In the QC test lab window select the test that we want to send and select the

execution grid. Then in execution grid click the automation tab, there we fill

find two tabs one is “Notification” and another is “On Failure”.

Below window pops up when we click on “Notifications”. We can select any

options that we need and can insert email addresses that we want to send.

Page 36: QTP_PRESENTATION_Andy

Below window pops up when we click on “On Failure”. We can select any options that we need. Once the test finishes the system sends the email to the email address that we inserted in the ``Notifications``.

************* End of part Two *************

Page 37: QTP_PRESENTATION_Andy

A big thank you to Ted, Paul, Doug and Gurjeet for giving me an opportunity to work with TDSB.

Special thanks to Dave, John, Luciana and Salah for their support, time and patience.

Live Demo of complete P to P Cycle