Free Sample
+ Collection

Advanced UFT 12 for Test Engineers Cookbook

Cookbook
Meir Bar-Tal, Jonathon Lee Wright

Over 60 practical recipes to help you accomplish automation tasks using UFT 12 and VBScript
$21.60
$44.99
RRP $26.99
RRP $44.99
eBook
Print + eBook

Want this title & more?

$21.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849688406
Paperback272 pages

About This Book

  • Automate tests easily and efficiently with the help of this practical, extensive, and fast guide
  • Use advanced coding and error handling methods to become a master of efficiency
  • Full of screenshots, in-depth explanations, clear step-by-step instructions, and practical examples and tips for tackling automation tasks with ease

Who This Book Is For

This advanced cookbook is designed for software testers and engineers with previous automation experience and teaches UFT (QTP) developers advanced programming approaches. Knowledge of software testing and basic coding (with VBScript in particular) and familiarity with programming concepts are prerequisites.

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

In Detail

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.

Authors

Read More