Advanced UFT 12 for Test Engineers Cookbook

Over 60 practical recipes to help you accomplish automation tasks using UFT 12 and VBScript

Advanced UFT 12 for Test Engineers Cookbook

Meir Bar-Tal, Jonathon Lee Wright

2 customer reviews
Over 60 practical recipes to help you accomplish automation tasks using UFT 12 and VBScript
Mapt Subscription
FREE
$29.99/m after trial
eBook
$10.00
RRP $26.99
Save 62%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$10.00
$44.99
$29.99p/m after trial
RRP $26.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781849688406
Paperback272 pages

Book Description

UFT (QTP) is a functional test automation tool by HP that supports a wide array of technologies for both GUI and API testing. Advanced UFT 12 for Test Engineers Cookbook will provide you with simple solutions to quite complex tasks and leverage your skills in programming with VBScript.

Unlock the full potential of UFT 12 with an introduction to its new features and functionality. Learn the industry's best-kept secrets such as how to enhance toolset capabilities, which you never thought possible. Learn how to extend UFT 12 by overriding methods, perform DB and XML checks, and handle unexpected dialogs. We also cover the topics of object identification using descriptive programming, classes, utility and reserved objects, Windows Scripting Host (WSH), and most importantly API testing and building testware frameworks. This book is an invaluable source of reference for test engineers with clear and powerful coding examples.

Table of Contents

Chapter 1: Data-driven Tests
Introduction
Creating a DataTable parameter
Retrieving data from a DataTable
Storing data in a DataTable
Importing an Excel file to a test
Exporting a DataTable
Parameterizing Test Object properties
Defining test cases using a DataTable
Storing data in the Environment object
Retrieving data from the Environment object
Reading values from an INI file
Using a configuration file to manage test environments
Using a global dictionary for fast shared data access
Using a global dictionary for fast shared code access
Chapter 2: Testing Web Pages
Introduction
Checking whether page links are broken
Deleting cookies
Managing multiple browser windows
Handling pop-up dialogs
Downloading a file using XMLHttp
Checking whether a website is up
Uploading a file using FTP
Identifying elements based on anchors
Synchronizing a test with a web page loading
Accessing web elements through DOM
Chapter 3: Testing XML and Database
Introduction
Establishing and closing a database connection
Using SQL queries programmatically
Using a database checkpoint
Using an XML checkpoint
Chapter 4: Method Overriding
Introduction
Overriding a Test Object method
Registering a method to all classes
Using method overriding to support object subtypes
Adding a new method to a class
Chapter 5: Object Identification
Introduction
Setting mandatory and assistive properties for a class
Using Descriptive Programming inline
Using the Description object
Using child objects
Using native properties for object identification
Identifying an object based on its parent
Chapter 6: Event and Exception Handling
Introduction
Catching errors inside a function or subroutine
Creating and using a recovery scenario
Using a global dictionary for recovery
Chapter 7: Using Classes
Introduction
Implementing a class
Implementing a simple search class
Implementing a generic Login class
Implementing function pointers
Implementing a generic Iterator
Chapter 8: Utility and Reserved Objects
Introduction
Using global variables (Environment)
Customizing mouse operations (DeviceReplay)
Managing processes (SystemUtil)
Measuring time (MercuryTimers)
Resolving file locations (PathFinder)
Loading shared object repositories (RepositoriesCollection)
Loading and creating XML documents (XMLUtil)
Drawing a rectangle on the screen with Win32 API methods (Extern)
Verifying binary file contents (FileCompare)
Implementing a custom reserved object
Using remote objects
Utility statements
Chapter 9: Windows Script Host
Introduction
Reading a key from the Windows system registry
Writing a key to the Windows system registry
Deleting a key from the Windows system registry
Running a process using the Windows system shell
Chapter 10: Frameworks
Introduction to test automation frameworks
Designing a test automation framework
Building a test controller
Building a reusable component (action)
Building an event handler
Building a test reporter

What You Will Learn

  • Use code design patterns in test automation to improve maintenance
  • Identify objects using Object Repository as well as with descriptive programming to achieve object identification at runtime
  • Build an event handler to handle unexpected dialogs
  • Use the objects and methods of the Windows Script Host (WSH)
  • Build an automation framework that works for you
  • Unleash the power of API and SOA testing
  • Use and build UFT reserved objects

Authors

Table of Contents

Chapter 1: Data-driven Tests
Introduction
Creating a DataTable parameter
Retrieving data from a DataTable
Storing data in a DataTable
Importing an Excel file to a test
Exporting a DataTable
Parameterizing Test Object properties
Defining test cases using a DataTable
Storing data in the Environment object
Retrieving data from the Environment object
Reading values from an INI file
Using a configuration file to manage test environments
Using a global dictionary for fast shared data access
Using a global dictionary for fast shared code access
Chapter 2: Testing Web Pages
Introduction
Checking whether page links are broken
Deleting cookies
Managing multiple browser windows
Handling pop-up dialogs
Downloading a file using XMLHttp
Checking whether a website is up
Uploading a file using FTP
Identifying elements based on anchors
Synchronizing a test with a web page loading
Accessing web elements through DOM
Chapter 3: Testing XML and Database
Introduction
Establishing and closing a database connection
Using SQL queries programmatically
Using a database checkpoint
Using an XML checkpoint
Chapter 4: Method Overriding
Introduction
Overriding a Test Object method
Registering a method to all classes
Using method overriding to support object subtypes
Adding a new method to a class
Chapter 5: Object Identification
Introduction
Setting mandatory and assistive properties for a class
Using Descriptive Programming inline
Using the Description object
Using child objects
Using native properties for object identification
Identifying an object based on its parent
Chapter 6: Event and Exception Handling
Introduction
Catching errors inside a function or subroutine
Creating and using a recovery scenario
Using a global dictionary for recovery
Chapter 7: Using Classes
Introduction
Implementing a class
Implementing a simple search class
Implementing a generic Login class
Implementing function pointers
Implementing a generic Iterator
Chapter 8: Utility and Reserved Objects
Introduction
Using global variables (Environment)
Customizing mouse operations (DeviceReplay)
Managing processes (SystemUtil)
Measuring time (MercuryTimers)
Resolving file locations (PathFinder)
Loading shared object repositories (RepositoriesCollection)
Loading and creating XML documents (XMLUtil)
Drawing a rectangle on the screen with Win32 API methods (Extern)
Verifying binary file contents (FileCompare)
Implementing a custom reserved object
Using remote objects
Utility statements
Chapter 9: Windows Script Host
Introduction
Reading a key from the Windows system registry
Writing a key to the Windows system registry
Deleting a key from the Windows system registry
Running a process using the Windows system shell
Chapter 10: Frameworks
Introduction to test automation frameworks
Designing a test automation framework
Building a test controller
Building a reusable component (action)
Building an event handler
Building a test reporter

Book Details

ISBN 139781849688406
Paperback272 pages
Read More
From 2 reviews

Read More Reviews

Recommended for You

Selenium WebDriver Practical Guide Book Cover
Selenium WebDriver Practical Guide
$ 26.99
$ 10.00
Performance Testing with JMeter 2.9 Book Cover
Performance Testing with JMeter 2.9
$ 23.99
$ 10.00
Designing and Implementing Test Automation Frameworks with QTP Book Cover
Designing and Implementing Test Automation Frameworks with QTP
$ 23.99
$ 10.00
Selenium Design Patterns and Best Practices Book Cover
Selenium Design Patterns and Best Practices
$ 19.99
$ 10.00
Web Services Testing with soapUI Book Cover
Web Services Testing with soapUI
$ 29.99
$ 10.00
Learning Selenium Testing Tools - Third Edition Book Cover
Learning Selenium Testing Tools - Third Edition
$ 26.99
$ 10.00