当前位置:首页 >> IT/计算机 >>

QTP Automation Framework


Automation Framework Filename: QTP Automation Framework.doc

Document Version: 1.0 Date: May 18, 2011

QTP Automation Framework

Document Control
ProcQA Authored by Approved by Name Title Quality Assurance Date May 18, 2011

Revision History
Date May 18, 2011 Version 1.0 Description Initial version Author

Development/Support Center

@ 2011

Page - 1 -

Automation Framework Filename: QTP Automation Framework.doc

Document Version: 1.0 Date: May 18, 2011

QTP Automation Framework
Table of Contents

1.

INTRODUCTION __________________________________________________________ - 3 1.1 QTP AUTOMATION FRAMEWORK ______________________________________ - 3 -

2. 3.

REFERENCE _____________________________________________________________ - 3 PURPOSE __________________________________________________ 错误!未定义书签。 3.1 PURPOSE OF QTP AUTOMATION FRAMEWORK __________________________ - 3 -

4.

QTP AUTOMATION FRAMEWORK - FOLDER STRUCTURE __________________ - 3 4.1 4.2 DESCRIPTION _________________________________________________________ - 3 QA QTP automation FRAMEWORK - FOLDER STRUCTURE __________________ - 3 -

5.

QTP AUTOMATION FRAMEWORK – MULTI FUNCTION LIBRARY LAYER ____ - 4 5.1 5.2 DESCRIPTION _________________________________________________________ - 4 MULTIPLE FUNCTION LIBRARY LAYER _________________________________ - 5 -

6.

QTP AUTOMATION FRAMEWORK – TESTING DATA MANAGEMENT ________ - 5 6.1 6.2 6.3 6.4 DESCRIPTION _________________________________________________________ - 5 TEST DATA ___________________________________________________________ - 6 REPORTS _____________________________________________________________ - 6 SCREEN CAPTURE _____________________________________________________ - 6 -

7.

QTP AUTOMATION FRAMEWORK – QC INTEGRATION _____________________ - 6 7.1 7.2 DESCRIPTION _________________________________________________________ - 6 QC INTEGRATION STRUCTURE _________________________________________ - 7 -

8.

QTP AUTOMATION FRAMEWORK – WORK FLOW __________________________ - 7 8.1 8.2 DESCRIPTION _________________________________________________________ - 7 QTP AUTOMATION FRAMEWORK WORKFLOW __________________________ - 7 -

Development/Support Center

@ 2011

Page - 2 -

Automation Framework Filename: QTP Automation Framework.doc

Document Version: 1.0 Date: May 18, 2011

QTP Automation Framework
1. INTRODUCTION
1.1 QTP AUTOMATION FRAMEWORK This document outlines the QTP Automation Framework along with QC integration as a plus, which accommodates all AUTs (Application Under Test), BS/CS structure, or different technology, e.g. .Net, Web, VB, Java, C++, etc, which will be used by QA team. The framework structure defined in this document should be strictly followed because its internal function layer modulizes and optimizes the complex QTP codes implementation for various standard objects. It cuts down the automation engineer training cost, script developing efforts and maintenance cost as well. And it allows easy expanding for integration testing.

2. REFERENCE
< QTP Coding Standard - PopVerifyFunction.doc> < QTP Coding Standard - ObjectRepositoryManagement.doc> < QTP Coding Standard - BestPractice.doc>

3. PURPOSE
3.1 PURPOSE OF QTP AUTOMATION FRAMEWORK The purpose of this document is to introduce the QA QTP automation framework which categorized as below: ? ? ? ? ? QTP Automation Framework – Folder Structure QA QTP Automation Framework – Multiple Function Library Layer QA QTP Automation Framework – Testing Data Management QA QTP Automation Framework – QC Integration QA QTP Automation Framework – Work Flow

4. QA QTP AUTOMATION FRAMEWORK - FOLDER STRUCTURE
4.1 DESCRIPTION Automation folder structure defines the physical folder structure for categorizing all testing related data. The folder structure is defined as Generic structure. All scripts, function libraries, documents, log files, object repository, screen captures should be placed under corresponding directory. 4.2 QA QTP AUTOMATION FRAMEWORK - FOLDER STRUCTURE

AUT Test Case

Test Case directory should be placed under the AUT (Application Under Test) folder and all the test scripts should be placed in this directory with the naming conventions.

Development/Support Center

@ 2011

Page - 3 -

Automation Framework Filename: QTP Automation Framework.doc

Document Version: 1.0 Date: May 18, 2011

Test Data

Function Lib

Screen Capture

Object Repository

Documents

Config File Reports

Utilities

Data sheets for all scenarios and individual script should be placed under this directory with the naming conventions. All user-defined, product-specific function libraries should be placed under this directory. Basically, two libraries for each AUT: <AUTName>_FunctionLib_Init.vbs <AUTName>_FunctionLib_Main.vbs All runtime screen captures recorded in test scripts should be stored in this directory, which will be used for post-execution reference and results analyse if necQAary. All AUT related GUI objects should be placed here as shared object repository, which is used by all test script under Test Case directory. It can be just one .tsr file which contains all AUT GUI objects or multiple .tsr file which categorized by various modules or components for easy maintenance. All testing configuration, execution, results analysing related instruction documents should be stored under this directory, e.g. script user guide, AUT configuration guide This is where QTP configuration script stores, by executing the Config script, the pre-defined QTP runtime settings will be automatically applied to the testing pc for testing execution, and the QTP Object Identification setting will be applied for script developing as well. It is very important to execute the Config script before developing and executing any test. However this is one-time configuration, which means one specific testing machine only needs to execute the Config script once at the very beginning as long as nobody manually change the QTP settings. This directory contains all testing related report file, log file, etc, during the testing execution. All third-Party testing tools or self-developed tools used to assist QTP automated testing should be placed under this directory. LibraryFile_Generic.vbs (read-only) User defined generic functions, e.g. file system I/O functions, Excel read/write functions, string manipulate functions, etc LibraryFile_StandardWindows.vbs (read-only) User defined functions for Microsoft Windows standard window objects LibraryFile_Web.vbs (read-only) User defined functions for Web objects LibraryFile_NET.vbs (read-only) User defined functions for .Net objects

Generic Lib Common Lib StandardWin Lib Web Lib .Net Lib

5. QA QTP AUTOMATION FRAMEWORK – MULTIPLE FUNCTION LIBRARY LAYER
5.1 DESCRIPTION The test automation toolset needs to be treated like software development architecture, with reusable modules that exist as part of standard automation frame work. The multiple function library layer modulizes the basic functions for standard windows controls, standard .Net controls and standard Web controls and object-independent function library. And the AUT specific library layer is listed as well.

Development/Support Center

@ 2011

Page - 4 -

Automation Framework Filename: QTP Automation Framework.doc

Document Version: 1.0 Date: May 18, 2011

5.2 MULTIPLE FUNCTION LIBRARY LAYER There are two categories of function libraries: one is common function library which stores function libraries shared by all AUTs (under Common Lib folder). Another is AUT specific library which applies to one and only one specific AUT (under AUT folder). These two categories are defined by the Automation Folder Structure, which is called Physical Category. The function library layer here is defined by function call logic, which is called Logic Category. There are three layers (Logic Category) of function libraries which are defined in this framework.

There are three layers of function library. The later one depends on previous one, e.g. Layer 3 depends on Layer 2 which depends on Layer 1. Layer 1: This is an independent function layer, in another word, it is NOT object-related. And it is the lowest layer which can be called by any other function library and can be used by any type of AUT. For example, file I/O functions, Excel manipulate functions, string compare functions, etc. Layer 2: This layer contains libraries for specific type of object, e.g. LibraryFile_Web.vbs defines the very basic methods/functions for Web app objects, for example, WebEdit, WebList, etc. And LibraryFile_StandardWin.vbs for standard windows objects, LibraryFile_Net.vbs for .Net objects. The functions/methods defined in this layer are registered for its own class, which means user can use context menu to browse and select the method during scripting in QTP. Layer 3: This layer is AUT specific function library, which means each AUT has its own init library and main library and it depends on its corresponding library in Layer 2, e.g. Retirement Studio is a .Net standard alone application, the user function defined in its corresponding main function library RetirementStudio_LibraryFile_Main.vbs will call methods defined in LibraryFile_Net.vbs. For each AUT, there are two function libraries in Layer 3, one is <AUT>_LibraryFile_Init.vbs, which defines AUT specific const, QTP option settings, etc. Another is <AUT>_LibraryFile_Main.vbs, which defines all the user defined functions for the AUT.

6. QA QTP AUTOMATION FRAMEWORK – TESTING DATA MANAGEMENT
6.1 DESCRIPTION Test data management in the document includes all testing related input/output and log data structure and naming convention. Based on the Folder Structure, there are three directories used to store testing data: Test Case, Reports, Screen Capture.

Development/Support Center

@ 2011

Page - 5 -

Automation Framework Filename: 6.2 TEST DATA QTP Automation Framework.doc

Document Version: 1.0 Date: May 18, 2011

All test input data should be placed under Test Data folder under its AUT directory using the same name as its test script name. It could be MS Excel file type or TXT file format or any other type. For example, a test script named “RS_DataStandardCheck001”, which is placed under Test Case folder, and its corresponding input data should named as “RS_DataStandardCheck001.xls” and placed under Test Data folder. A MS Excel file using the same name as the test script is required to store very basic testing info, e.g. Results (E_OK/E_ERROR), TimeStart, TimeEnd. This gives tester a brief idea of the testing result and the testing start and testing end time. Refer to below screenshot.

If one particular test script it requires multiple input data files, then a sub folder should be created under Test Data folder using the same name as its test script. All the testing input files should be placed under this sub folder. 6.3 REPORTS All testing output data/log files should be placed under this folder. And the naming convention should be applied as well. (The output/log file should use the same name as test script and if multiple output files for single test script is required, need to create a sub folder under Reports folder using the same name as test script.) 6.4 SCREEN CAPTURE This folder is used to store all runtime screen captures which will be used as reference when test requires further analyze. As a standard of this framework, each AUT specific function will generate a runtime screen capture using the function name and it is stored in Screen Capture folder. As a standard workflow of this framework, a monthly or bi-monthly backup of this folder is required to archive all screen captures for future reference.

7. QA QTP AUTOMATION FRAMEWORK – QC INTEGRATION
7.1 DESCRIPTION As a test management tool, HP QC is well integrated with QTP. The automation test scripts, resources will be stored in QC Test Plan. QC Test Lab supports automation batch execution functionality as well as scheduled runner. Automation test scripts should be executed from QC, which makes all execution results history available in QC. Meanwhile QC auto-email notification feature will update the predefined users with the execution results as soon as it finishes execution.

Development/Support Center

@ 2011

Page - 6 -

Automation Framework Filename: QTP Automation Framework.doc

Document Version: 1.0 Date: May 18, 2011

7.2 QC INTEGRATION STRUCTURE The below chart shows the generic QC structure for one specific AUT. All items marked in dark blue are QC items which stores in QC database after user upload. For example, Test Scripts are stored in QC test plan, test set 20110304.1 is a user defined test set using build name and linked to related test scripts. All items marked in light blue are external resources which are required to execute the test from QC. For example Web Lib, this equals to LibraryFile_Web.vbs, which stores under Common Lib directory and will be called in AUT main library and be used in Test scripts.

8. QA QTP AUTOMATION FRAMEWORK – WORK FLOW
8.1 DESCRIPTION The workflow illustrates the relationship between different components/folders in this automation framework. Test script under Test Case folder will be the core of this workflow and rest of components will be directly or indirectly connected to Test Script.

8.2 QA QTP AUTOMATION FRAMEWORK WORKFLOW

Documents and Config File affect Test Script indirectly (dash line) because they have no file or data will be called or used by Test Script. Refer to chapter 4.2 for detailed instruction on these two components.

Development/Support Center

@ 2011

Page - 7 -


相关文章:
QTP Automation Framework.doc
Automation Framework Filename: QTP Automation Framework.doc Document Version: 1.0 Date: May 18, 2011 QTP Automation Framework Document Control ProcQA ...
第八章:QTP自动化测试框架_图文.ppt
进阶 讲师:孙老师 (北风网版权所有) 软件测试框架介绍 什么是框架framework ? ...driver.vbs文件,使用了QTPautomation object model,也 是整个框架的入口。可以...
QTP轻量级自动化测试框架_图文.ppt
(The Hybrid Test Framework) Automation Framework) 火龙果软件工程技术 / UML 软件工程组织 www.uml.org.cn QTP实践-例子-QTP自带示例-我们的框架 Lib Action ...
QTP_Framework_Saffron.pdf
QTP_Framework_Saffron_IT/计算机_专业资料。QTP_Framework_Saffron ...使用了 QTPautomation? object? model,也是整个框架的入口。可以直接执 行...
QTP 自动化测试框架.ppt
B:采用Automation Framework统一调度自动化脚本 ? C:采用QC+QTP+Framework的模式 ? D:采用QC+QTP(BPT)的模式 自动化框架目标 ? ? ? ? ? 代码开发快速简单 ...
QTP小强老师学习笔记.doc
QTP小强老师学习笔记_工学_高等教育_教育专区。小强零基础学习软件测试系列视频...第十九讲 第二十讲 How to build automation framework QTPQ 之焦点 焦点:...
QTP自动化测试脚本.txt
QTP自动化测试脚本_IT/计算机_专业资料。QTP自动化测试脚本,在使用的时候需要把...Prototype 1.1' ' Simple Automation Framework For Remarkably Obvious Notes '...
QTP入门与实践.ppt
混合的测试自动化框架(The Hybrid Test Automation Framework) 火龙果软件工程技术 / UML 软件工程组织 www.uml.org.cn QTP实践-例子-QTP自带示例-我们的框架 Lib...
QTP入门实践_图文.ppt
混合的测试自动化框架(The Hybrid Test Automation Framework) 火龙果软件工程技术 / UML 软件工程组织 www.uml.org.cn QTP实践-例子-QTP自带示例-我们的框架 Lib...
Automation Engineer自动化工程师英文简历模板.doc
Extensive experience in developing automation framework in B/S and C/S based on QTP, VBS, C# environment .Willing to improve testing skills continuously....
Test Automation Factory_图文.ppt
Implemented Multiuse Test automation framework for HP QTP scripts ? XML document comparison tool with advanced features integrated with QTP and multiuse ...
自动化工程师英文简历模板.doc
Extensive experience in developing automation framework in B/S and C/S based on QTP, VBS, C# environment .Willing to improve testing skills continuously....
Functional Automation Testing presentation_图文.ppt
AUTOMATION TEST DESIGN: have the design ready for Automation test Framework ...(Concurrent licenses alternate with teams) QTP Virtual Project LR Tool ...
QTP:测试web对象论述_毕业论文.doc
QTP:测试web对象论述_毕业论文_工学_高等教育_教育专区。毕业论文,单片机论文,...automation development process, framework, and a wide variety, for example, ...
【最新文档】电子信息工程英文工作简历表-word范文 (2页).doc
Extensive experience in developing automation framework in B/S and C/S based on QTP, VBS, C# environment .Willing to improve testing skills continuously....
QTP interview questions.doc
RepositoriesCollection.Add "D:\gcreddy\Login.tsr" QTP Interview Questions Part-I Questions & Answers 1) Explain about your Company's Automation Framework?...
QTP安装和使用教程及实例_图文.ppt
例如: .NET Framework 2.0; Microsoft Visual C++ 2005; Redistributable等; ...QTP界面展示 实例1、通达海信息管理系统登录 ? 点击 “Automation” >> “...
QTP介绍_图文.ppt
混合的测试自动化框架(The Hybrid Test Automation 混合的测试自动化框架( Framework) ) http://www.51testing.com 上海博为峰软件技术有限公司 24 QTP实践 例子 ...
QTP新手入门教程_图文.doc
Automation | Record” ,或按快捷键 F3,QTP 将自动启动指定目录下的“Flight...安装.net Framework 1.1 安装QTP文件 如果手边还没有得到QTP的安装文件,可以用...
QTP9.2教程.pdf
Framework 1.1 如果本机没有安装过 .net Framework 1.1,在第一次安装 QTP ...如图: 第二步:开始录制测试脚本 点击菜单【Automation】〉【Record and Run ...