UFT Automation
Framework
By Himal Bandara
Preface
 While there are several frameworks that provide support for automated
software testing using HP UFT, this document introduces one particularly
effective type.
Objective
 To create a framework which supports test automation work done by UFT in
QA environment by working as a tool chain.
 considerations :
 UFT tool will be integrated and used with HP ALM.
 UFT Project solution, resources and test cases are stored in ALM.
 ALM is used as the version control repository for both test cases and test scripts.
 ALM test cases will include both UFT test scripts and other test cases related
details.
Framework Architecture
Features
 1. Folder Hierarchy
2. Config
 Config File which use to store the Test Environment Data .In this configuration
file is xml file which include system url , browser type, test data path etc.
Function Library
 Contains necessary functions that needs to create and execute the test cases
 This Framework has two main components
 Generic function library
 Application specific function library
Generic function library
 Generic Function library is .vbs or .qfl file which include application
independent common scenarios like (“Reading and writing excel data ,
logging functionality ”)
Application specific function library
 Generic Function library is .vbs or .qfl file which include application
dependent common scenarios and module like (login module , Add Course
module)
Logging
 Logs are captured as a text file and stored in a windows location
 Logs can be enabled in ALM at the execution time
Object Repository
 Object repository is a collection of objects and properties
 Shared object repository is maintained(.tsr)
Recovery Scenarios
 In order to recover the test and continue execution
 Can be crucial feature for large tests
 This framework has two recovery scenarios
 Webelement is not visible
 Webelement doesn’t exist
Test data
 External test data is given as inputs to the test scripts to perform the same
operations on the application using different set of data
 The best practice here is to keep the data sheet in a common place,
preferably in the test management tool.
Advantages
 Increase the quality
 Reusability
 Better utilization of tools
 Maintenance
 Minimum effort
 High ROI
Limitations
 Property files(.txt or .properties) can’t be stored in ALM as it only supports
XML and MS Office documents
 It is a must to have the browser extension installed and enabled to execute a
test in a particular web browser
 Learning resources are rare in certain areas (e.g- recovery scenarios)
Learnings And Next Ste
 Support for descriptive programming
 Customize test reports
 Make the generic function library more comprehensive by adding more
generic methods
 Mobile, API testing support
THANKS !!!!!!!

UFT Automation Framework Introduction

  • 1.
  • 2.
    Preface  While thereare several frameworks that provide support for automated software testing using HP UFT, this document introduces one particularly effective type.
  • 3.
    Objective  To createa framework which supports test automation work done by UFT in QA environment by working as a tool chain.  considerations :  UFT tool will be integrated and used with HP ALM.  UFT Project solution, resources and test cases are stored in ALM.  ALM is used as the version control repository for both test cases and test scripts.  ALM test cases will include both UFT test scripts and other test cases related details.
  • 4.
  • 5.
  • 6.
    2. Config  ConfigFile which use to store the Test Environment Data .In this configuration file is xml file which include system url , browser type, test data path etc.
  • 7.
    Function Library  Containsnecessary functions that needs to create and execute the test cases  This Framework has two main components  Generic function library  Application specific function library
  • 8.
    Generic function library Generic Function library is .vbs or .qfl file which include application independent common scenarios like (“Reading and writing excel data , logging functionality ”)
  • 9.
    Application specific functionlibrary  Generic Function library is .vbs or .qfl file which include application dependent common scenarios and module like (login module , Add Course module)
  • 10.
    Logging  Logs arecaptured as a text file and stored in a windows location  Logs can be enabled in ALM at the execution time
  • 11.
    Object Repository  Objectrepository is a collection of objects and properties  Shared object repository is maintained(.tsr)
  • 12.
    Recovery Scenarios  Inorder to recover the test and continue execution  Can be crucial feature for large tests  This framework has two recovery scenarios  Webelement is not visible  Webelement doesn’t exist
  • 13.
    Test data  Externaltest data is given as inputs to the test scripts to perform the same operations on the application using different set of data  The best practice here is to keep the data sheet in a common place, preferably in the test management tool.
  • 14.
    Advantages  Increase thequality  Reusability  Better utilization of tools  Maintenance  Minimum effort  High ROI
  • 15.
    Limitations  Property files(.txtor .properties) can’t be stored in ALM as it only supports XML and MS Office documents  It is a must to have the browser extension installed and enabled to execute a test in a particular web browser  Learning resources are rare in certain areas (e.g- recovery scenarios)
  • 16.
    Learnings And NextSte  Support for descriptive programming  Customize test reports  Make the generic function library more comprehensive by adding more generic methods  Mobile, API testing support
  • 17.