oracle functional testing for web applications …ocom/documents...contents vi vi ``` functional...

430
Oracle® Functional Testing for Web Applications Functional Testing User's Guide Version 8.50 January 2009

Upload: others

Post on 29-Jun-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Oracle® Functional Testing for Web Applications Functional Testing User's Guide

Version 8.50

January 2009

Page 2: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Oracle Functional Testing for Web Applications Functional Testing User's Guide Version 8.50

Copyright © 1997, 2009 Oracle and/or its affiliates. All rights reserved.

The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited.

The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose.

If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable:

U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software--Restricted Rights (June 1987). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.

The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs.

The Programs may provide links to Web sites and access to content, products, and services from third parties. Oracle is not responsible for the availability of, or any content provided on, third-party Web sites. You bear all risks associated with the use of such content. If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party. Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services. Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party.

Oracle, JD Edwards, and PeopleSoft are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Page 3: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

Contents iiiiiiiiiiii

Contents

Preface xv

About This Guide.......................................................................................... xv Related Documentation ............................................................................... xvii

Oracle Application Testing Suite Manuals.......................................... xvii Electronic Documentation................................................................... xviii

Using Help ................................................................................................... xix Conventions ................................................................................................... xx Obtaining Technical Support ........................................................................ xx

C h aC h aC h aC h a p t e r 1p t e r 1p t e r 1p t e r 1 Introduction 1

Feature Highlights .......................................................................................... 1 Automatic Test Generation ............................................................................. 3 Visual Scripts.................................................................................................... 4 Application Programming Interface ............................................................... 5 The Data Bank Wizard ................................................................................... 5 Specialized Web Server Testing...................................................................... 5 Real Time Visual Test Results Analysis .......................................................... 6 System Requirements....................................................................................... 6

C h a p t e r 2C h a p t e r 2C h a p t e r 2C h a p t e r 2 Basics 9

Installing and Starting Oracle Application Testing Suite............................... 9 Main Window Features ................................................................................ 10

Overview of the Menu Options ............................................................. 11 Visual Script Pane................................................................................... 19 Browser Pane .......................................................................................... 22 Test Scriptlet Editing Pane .................................................................... 23 Playback Results Pane ............................................................................ 24

Page 4: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

iviviviv `̀̀̀ Functional Testing User's Guide

Status Bar ................................................................................................ 24 Java Console............................................................................................ 25

Using Workspaces......................................................................................... 25 Adding a New Workspace ..................................................................... 26 Opening a Workspace ............................................................................ 27 Deleting a Workspace............................................................................. 28

Configuring the Mail Server ......................................................................... 28 C h a p t e r 3C h a p t e r 3C h a p t e r 3C h a p t e r 3 Recording and Playing Back Visual Scripts and Jobs 31

Recording Visual Scripts ............................................................................... 32 Recording Visual Scripts Manually ....................................................... 32 Recording a Page Snapshot .................................................................... 34 Recording Visual Scripts Using e-Spider .............................................. 36 Recording DHTML Event Handlers .................................................. 39 Recording Manual Navigation .............................................................. 41 Recording from an External Window.................................................... 42 Recording Anchor Transitions............................................................... 42 Recording Pages with META Refresh Tags ........................................ 43 Recording Auto Pages............................................................................ 43 Recording Sites that Require User Authentication................................ 44 Recording Flash/ActiveX....................................................................... 45 Recording Web Services......................................................................... 46 Using the Web Services Wizard ............................................................ 47 Recording Using a Proxy....................................................................... 61 Saving Visual Scripts .............................................................................. 61

Playing Back Visual Scripts ........................................................................... 62 Playing Back the Entire Visual Script .................................................... 63 Playing Back a Specific Page.................................................................. 63 Playing Back with Recorded Delay........................................................ 64 Playing Back Visual Scripts Multiple Times......................................... 65 Playing Back with Data Banks ............................................................... 67 Playing Back a Specific Data Bank Record ........................................... 70 Playing Back Visual Scripts on a Different URL.................................. 72 Viewing Playback Results....................................................................... 73

Page 5: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

Contents vvvv

Creating and Using Jobs ............................................................................... 74 Creating a New Job ................................................................................ 74 Opening an Existing Job........................................................................ 75 Editing Job Properties............................................................................ 75 Saving Jobs.............................................................................................. 82 Running a Job......................................................................................... 82 Deleting Jobs .......................................................................................... 82 Renaming Jobs........................................................................................ 83

Handling Unexpected Windows During Recording/Playback................... 83 Setting Recording Options ............................................................................ 84

General Options...................................................................................... 84 Visual Script Options.............................................................................. 87 Event Recording Options....................................................................... 89 Object Identification Options ................................................................ 91 Proxy Options......................................................................................... 92

Setting Playback Options .............................................................................. 97 General Options...................................................................................... 97 Script Options......................................................................................... 99 Event Playback Options .......................................................................101 Error Recovery Options .......................................................................104

Setting Advanced Options...........................................................................106 Siebel Support Options.........................................................................106 Web Services Options ..........................................................................108 WinForms Plug-ins Options ...............................................................110 Java Applet Options..............................................................................114 Java Agent Options...............................................................................115 Custom Scripts Options .......................................................................117

Defining Exclusions to Playback Comparisons ..........................................118 Content Options ...................................................................................119 URL Parameter Options .....................................................................122 URL Parameter Values Options..........................................................123 URL Subpaths Options .......................................................................125 Exclusion Tester ...................................................................................126 Excluding a Range of HTML Source ................................................127

Page 6: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

vivivivi `̀̀̀ Functional Testing User's Guide

C h a p t e r 4C h a p t e r 4C h a p t e r 4C h a p t e r 4 Working with Visual Scripts 129

Viewing Visual Scripts .................................................................................129 Changing the Visual Script Pane Width ..............................................129 Expanding and Collapsing the Visual Script .......................................130 Overview of Visual Script Nodes .........................................................131 Exporting Visual Scripts.......................................................................133

Editing Visual Scripts ..................................................................................134 Copying Pages ......................................................................................134 Moving Pages.......................................................................................134 Appending a Page.................................................................................134 Inserting Pages .....................................................................................135 Deleting Pages ......................................................................................136 Adding Comments ...............................................................................137 Deleting Visual Scripts .........................................................................138

Working with Default Tests........................................................................139 Modifying Default Tests for All Pages................................................139 Modifying Default Tests for a Specific Page.......................................140 Turning Off Default Tests for a Specific Node ..................................140 Turning Off Existence Tests for a Specific Node ...............................141

Adding Custom Variables............................................................................142 Data Bank Variables .............................................................................143 Expression Variables.............................................................................144 HTML DOM Path Variables ............................................................145 XML Path Variables ............................................................................146 Adding Variables ..................................................................................147

Running Resource Validation......................................................................148 Running Resource Validation Manually..............................................148 Exporting Resource Validation Results ...............................................149 Setting the Resource Validation Playback Option ...............................150 Turning Off Validation Tests for a Node............................................152 Setting Resource Validation Options ...................................................153 XML Schema Validation .....................................................................154

Working with Visual Script Properties .......................................................155 Viewing Visual Script Node Properties................................................155 Basic Node Properties ..........................................................................156 Address Node Properties......................................................................157

Page 7: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

Contents viiviiviivii

Cookies Properties ................................................................................160 Event Properties ...................................................................................161 WinForms Attributes Tab ...................................................................169 Form Element Properties.....................................................................171 Form Element Test Properties.............................................................172 Form Node Properties..........................................................................174 HTML Node Properties .....................................................................175 Image Node Properties.........................................................................176 Java Applet Properties ..........................................................................177 Link Node Properties...........................................................................178 Object Properties ..................................................................................180 Page Node Properties...........................................................................181 Parameter Properties ............................................................................182 Script Node Properties .........................................................................183 Server Response Test Properties ..........................................................184 Soap Properties .....................................................................................186 Test Scriptlet Properties .......................................................................187 Text Matching Test Properties ............................................................188

Using the Settings Manager........................................................................189 Changing Settings.................................................................................190 Changing Settings Across Multiple Visual Scripts..............................192 Selecting a Profile .................................................................................193 Creating Profiles ...................................................................................194

C h a p t e r 5C h a p t e r 5C h a p t e r 5C h a p t e r 5 Using Test Cases 197

Using Text Matching Tests ........................................................................198 Adding a Text Matching Test Case.....................................................200 Using a Text Matching Test Case to Verify a Data-Driven Test .......201 Editing Text Matching Test Cases......................................................207 Adding Text Matching Test Cases to the Library ..............................207 Using Text Matching Test Cases from the Library............................208 Deleting Text Matching Test Cases from the Library........................208 Deleting Text Matching Test Cases from the Script...........................208

Using Server Response Tests ......................................................................209 Adding a Server Response Test Case...................................................210 Editing Server Response Test Cases ....................................................211 Deleting Server Response Test Cases from the Script.........................211

Page 8: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

viiiviiiviiiviii `̀̀̀ Functional Testing User's Guide

Using Form Element Test Cases ................................................................212 Adding a Form Element Test Case .....................................................214 Form Element Test Case Expressions .................................................215

Using Test Scriptlets ...................................................................................216 Using the Table Test Wizard......................................................................218

Selecting the Page to Test.....................................................................218 Selecting a Web Page Table.................................................................218 Specifying Test Details .........................................................................219

Using the WinForms Test Wizard.............................................................222 Selecting the Object to Test..................................................................222 Selecting a WinForm Object ...............................................................223 Specifying Test Details .........................................................................223 Specifying the Type of Test ..................................................................225

Using the Siebel Test Wizard .....................................................................226 Selecting the Object to Test..................................................................226 Selecting a Siebel Object.......................................................................226 Specifying Test Details .........................................................................227 Specifying the Type of Test ..................................................................229

C h a p t e r 6C h a p t e r 6C h a p t e r 6C h a p t e r 6 Working with Test Results 231

Locating and Viewing Test Results.............................................................231 Locating Failures in Visual Scripts ......................................................232 Viewing HTML Differences...............................................................232 Viewing JavaScript/VBScript Differences............................................233

Accepting and Discarding Tested Pages ....................................................234 Accepting Tested Pages........................................................................234 Discarding Tested Pages......................................................................234

Ignoring Specific Failures and Test Cases..................................................235 Ignoring Specific Failures on Playback ...............................................235 Ignoring a Specific Test Case on Playback..........................................235

Using the Results Log.................................................................................236 Analyzing Results Log Timelines ........................................................237 Setting Results Log Options ................................................................239 Showing and Hiding the Results log Pane ..........................................240 Selecting a Visual Script Page from the Results Log...........................240 Viewing Resource Validation Results from the Results Log ...............241 Appending to the Results Log .............................................................241

Page 9: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

Contents ixixixix

Exporting the Results Log ...................................................................242 Saving Results Log Files......................................................................242 Overwriting Results Logs ....................................................................242 Clearing the Results Log Window.......................................................243 Viewing Saved Results Logs in Oracle Functional Testing for Web Applications ..........................................................................................243 Exporting Saved Results Logs .............................................................244 Viewing Saved Results Logs in a Browser ...........................................245 Deleting Results Logs ..........................................................................245

Using Results Reports .................................................................................246 Setting Results Report Options............................................................247 Changing Results Report Settings .......................................................248

C h a p t e r 7C h a p t e r 7C h a p t e r 7C h a p t e r 7 Using e-Spider 251

Main Window Features ..............................................................................252 File Menu .............................................................................................252 Edit Menu ............................................................................................253 Run Menu ............................................................................................253 Tools Menu ..........................................................................................253 Help Menu...........................................................................................254 Address Line.........................................................................................254 Site Map Tree.......................................................................................254 Status Bar ..............................................................................................255

Setting Maximum Navigation Depth .........................................................255 Working with e-Spider ................................................................................255

Starting e-Spider ...................................................................................255 Pausing and Resuming e-Spider ..........................................................256 Stopping e-Spider .................................................................................256 Appending Pages to the Tree ...............................................................256 Deleting Pages from the Tree ..............................................................257 Excluding URLs in e-Spider...............................................................258 Modifying an Excluded URL .............................................................259 Ignoring a Page in the Tree..................................................................259 Ignoring All But the Current Page in the Tree ...................................259 Generating a Visual Script from e-Spider ............................................260

Working with Map Files.............................................................................261 Saving Map Files..................................................................................261

Page 10: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

xxxx `̀̀̀ Functional Testing User's Guide

Creating a New Map File.....................................................................261 Opening an Existing Map File ............................................................261 Exporting the Site Map Tree ...............................................................262

C h a p t e r 8C h a p t e r 8C h a p t e r 8C h a p t e r 8 Using Data Banks 263

Using the Data Bank Wizard......................................................................263 Data Bank Variables Tab......................................................................264 Data Binding Tab.................................................................................266 Auto Map and Auto Bind ....................................................................267

Working with Data Banks...........................................................................268 Creating a Data Bank File....................................................................268 Recording a Visual Script to Use with a Data Bank............................269 Mapping Variables to Visual Script Parameters ..................................269 Using Internal Variables.......................................................................272 Binding External Variables to Data Bank Fields.................................278 Playing Back a Range of Data Bank Records......................................281 Playing Back a Specific Data Bank Record .........................................282 Generating Data Bank Data.................................................................284 Using Data Banks with Java Applet Events ........................................288 The Difference Between Play and Iterate Using Data Banks .............293

C h a p t e r 9C h a p t e r 9C h a p t e r 9C h a p t e r 9 Using Admin Options 295

Using the Test Library Manager................................................................296 Test Library Options............................................................................296 Adding Text Matching Tests Case to the Library ..............................297 Removing Text Matching Test Cases from the Library .....................297

Using the Dialog Manager .........................................................................298 Overview of the Tool Buttons ..............................................................298 Overview of the Dialog List .................................................................299 Overview of the Dialog Information....................................................300 Overview of the Control Options .........................................................301 Starting the Dialog Manager ...............................................................302 Capturing Dialog Information .............................................................302 Specifying Dialog Information.............................................................303 Using Action Options ..........................................................................303

Page 11: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

Contents xixixixi

Editing Existing Dialog Information ..................................................307 Changing Dialog Evaluation Priority ..................................................307

Using the Authentication Manager ............................................................308 Adding a Record...................................................................................309 Modifying a Record .............................................................................309 Removing a Record ..............................................................................310

Working with Workspaces, Scripts, and Logs ...........................................310 Using the Workspace Manager ...........................................................310 Deleting Workspaces............................................................................311 Deleting Visual Scripts .........................................................................312 Deleting Logs .......................................................................................313

C h a p t e r 1 0C h a p t e r 1 0C h a p t e r 1 0C h a p t e r 1 0 Using the Application Programming Interface 315

Overview of Testing Extensibility ...............................................................316 Extensibility Levels Overview..............................................................317 Level 1: Visual Scripts ..........................................................................318 Level 2: User-Defined Test Cases & Data Banks ..............................319 Extending Visual Script Capabilities with Programming....................321 Level 3: Test Scriptlets .........................................................................321 Level 4: External Programs .................................................................322

Visual Script Programming .........................................................................325 Test Scriptlets .......................................................................................325

About Visual Script Navigation...................................................................326 About Thick Client and Thin Client...........................................................327 Working with Document Objects ...............................................................327

About the Document Object Hierarchy ..............................................328 About Document Object Methods ......................................................329 About Document Object Properties ....................................................330 About Dynamic HTML Events .........................................................331

How the API Accesses Web Page Objects.................................................332 Getting the Document Object..............................................................332 Finding HTML Elements ..................................................................334 Setting Properties Using the Object Model ........................................336

Getting Data Bank Values ...........................................................................337 Setting Up Data Bank Files .................................................................337

Page 12: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

xiixiixiixii `̀̀̀ Functional Testing User's Guide

Setting Up Visual Script Variables .......................................................338 Getting Data Bank Values Using the API...........................................339 How Oracle Functional Testing for Web Applications Gets Data Bank Records .................................................................................................340 Setting Data Bank Values Using the API............................................340

Using Test Scriptlets ...................................................................................341 Web Page Scripting vs. Test Scriptlets ................................................343 Variables and Error Handling .............................................................344 Editing Test Scriptlets..........................................................................344

Debugging Test Scriptlets ...........................................................................345 Debugging with the Microsoft Script Debugger ................................345 Debugging with the Microsoft Development Environment ...............347

External Program Control...........................................................................351 Webanlst.Exe COM Server.................................................................352 RSWMint.Exe COM Server ..............................................................352 RswIProgsLib Type Library................................................................352 ATSUtilities Type Library...................................................................353 Referencing the Object .........................................................................353 Defining Object Variables ....................................................................354 Assigning the Object Reference ...........................................................355 Opening Workspaces ...........................................................................355 Playing Back a Visual Script.................................................................355 Monitoring Script Events ....................................................................355 Closing Oracle Functional Testing for Web Applications..................356 Releasing the Object Variables .............................................................356 About Minimum Oracle Functional Testing for Web Applications..357 About Full Oracle Functional Testing for Web Applications ............357

A p p e n d i x AA p p e n d i x AA p p e n d i x AA p p e n d i x A Internet Status Codes 359

Server Status Codes......................................................................................359 Internet Codes..............................................................................................363

Additional Information.........................................................................370

Page 13: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

Contents xiiixiiixiiixiii

A p p e n d i x BA p p e n d i x BA p p e n d i x BA p p e n d i x B HTML and DHTML Resources 371

Web Resources.............................................................................................371 Elements Defined by HTML.....................................................................372 Objects Defined by Dynamic HTML .......................................................373 Collections Exposed by Dynamic HTML.................................................375 Properties in Dynamic HTML ..................................................................375 Methods in Dynamic HTML....................................................................380 Events in Dynamic HTML........................................................................382

A p p e n d i x CA p p e n d i x CA p p e n d i x CA p p e n d i x C Regular Expressions 383

MetaCharacters............................................................................................383 A p p e n d i x DA p p e n d i x DA p p e n d i x DA p p e n d i x D Oracle Application Testing Suite File Types 389

Index 393

Page 14: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Contents

xivxivxivxiv `̀̀̀ Functional Testing User's Guide

[This page intentionally left blank]

Page 15: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

xvxvxvxv

Preface Welcome to the Oracle Functional Testing for Web Applications User Guide. This guide explains how to use the features and options of Oracle Functional Testing for Web Applications for testing Web pages or applications.

This guide is intended for Web test engineers who will be developing Oracle Functional Testing for Web Applications Visual Scripts for regression and performance (load and scalability) testing of a Web site or application. The guide does require an understanding of software or Web application testing concepts. Test engineers using Oracle Functional Testing for Web Applications should be familiar with the concepts of regression testing, load testing, scalability testing, and operational monitoring.

The record/playback paradigm of Oracle Functional Testing for Web Applications does not require any programming experience to develop Visual Scripts for testing. However, the advanced programmability features available in Oracle Functional Testing for Web Applications do require experience with programming languages such as VBScript. The programming sections of this manual assume that you understand programming concepts in VBScript.

About This Guide

This guide contains the following chapters and appendixes:

Chapter Chapter Chapter Chapter 1 1 1 1 – Introduction Introduction Introduction Introduction: provides an overview of the major features of Oracle Functional Testing for Web Applications.

Chapter 2 Chapter 2 Chapter 2 Chapter 2 – Oracle Functional Testing for Web Applications Basics Oracle Functional Testing for Web Applications Basics Oracle Functional Testing for Web Applications Basics Oracle Functional Testing for Web Applications Basics: provides descriptions of the Oracle Functional Testing for Web Applications main window features and menu options.

Page 16: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Preface

xvixvixvixvi Functional Testing User's Guide

Chapter 3 Chapter 3 Chapter 3 Chapter 3 – Recording and Playing Back Visual Scripts and Jobs Recording and Playing Back Visual Scripts and Jobs Recording and Playing Back Visual Scripts and Jobs Recording and Playing Back Visual Scripts and Jobs: explains how to record and play back Visual Scripts.

Chapter 4 Chapter 4 Chapter 4 Chapter 4 – Working with Visual Scripts Working with Visual Scripts Working with Visual Scripts Working with Visual Scripts: explains how to view and edit Visual Scripts, modify default tests, run Resource Validation, and work with script node properties.

Chapter 5 Chapter 5 Chapter 5 Chapter 5 – Using Test Cases Using Test Cases Using Test Cases Using Test Cases: explains how use built-in test cases and how to create your own programmatic tests.

Chapter 6 Chapter 6 Chapter 6 Chapter 6 – Working with Test Results Working with Test Results Working with Test Results Working with Test Results: explains how to locate and view playback differences and how to accept or discard differences. It also explains how to use the Results Log and set error recovery options.

Chapter 7 Chapter 7 Chapter 7 Chapter 7 – Using e Using e Using e Using e----SpiderSpiderSpiderSpider: explains how to use e-Spider to map web pages or applications automatically. It also explains how to generate a Visual Script from an e-Spider map.

Chapter 8 Chapter 8 Chapter 8 Chapter 8 – Using Data Banks Using Data Banks Using Data Banks Using Data Banks: explains how to create and use external data sources with Visual Scripts.

Chapter 9 Chapter 9 Chapter 9 Chapter 9 – Using Admin Options Using Admin Options Using Admin Options Using Admin Options: explains how to manage the Test Library, set up unexpected dialog box handling, and how to define user names and passwords for specific URLs. It also explains how to create and delete Workspaces, and how to delete Visual Scripts and Results Logs.

Chapter 10 Chapter 10 Chapter 10 Chapter 10 – Using the Programming Interface Using the Programming Interface Using the Programming Interface Using the Programming Interface: explains how to extend your testing capabilities using the Application Programming Interface with standard programming languages, such as VBScript, Visual Basic, Java, and C++ to extend the capabilities of Visual Scripts.

Appendix A Appendix A Appendix A Appendix A – Internet Status Codes Internet Status Codes Internet Status Codes Internet Status Codes: lists the status codes and Internet error codes that can be returned from a server.

Appendix B Appendix B Appendix B Appendix B – H H H HTML and DHTML ResourcesTML and DHTML ResourcesTML and DHTML ResourcesTML and DHTML Resources: lists the HTML elements and DHTML objects, collections, and properties that can be used when creating Web pages. The lists are provided as a convenient resource when using the Application Programming Interface (API) to create Test Scriptlets for Visual Scripts.

Appendix C Appendix C Appendix C Appendix C – Regular Expressions Regular Expressions Regular Expressions Regular Expressions: provides a reference for Regular Expression syntax.

Page 17: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Preface

Preface xviixviixviixvii

Appendix DAppendix DAppendix DAppendix D – Oracle Application Testing Suite File types Oracle Application Testing Suite File types Oracle Application Testing Suite File types Oracle Application Testing Suite File types: lists the file types and extensions used by the Oracle Application Testing Suite applications.

In addition to this User Guide, the Oracle Functional Testing for Web Applications documentation also includes the Oracle Functional Testing for Web Applications Application Programming Interface Reference manual, which provides detailed programming reference information.

Related Documentation

The Oracle Application Testing Suite includes a complete set of electronic manuals and online help.

Oracle Application Testing Suite Manuals

The Oracle Application Testing Suite includes the following manuals:

Oracle Application Testing Suite Getting Started Guide – introduces the software tools in the Oracle Application Testing Suite and provides step-by-step tutorials for Oracle Functional Testing for Web Applications, Job Scheduler, and Oracle Load Testing for Web Applications (which includes ServerStats).

Oracle Functional Testing for Web Applications Functional Testing User’s Guide – explains how to use the features and options of Oracle Functional Testing for Web Applications to create Visual Scripts for regression/performance testing and monitoring of Web sites or applications. This guide also includes reference information for using the Oracle Functional Testing for Web Applications Programming Interface for expanding Visual Script capabilities using Test Scriptlets or external programs.

Oracle Functional Testing for Web Applications Job Scheduler User’s Guide – explains how to use the features and options of Job Scheduler to schedule and play back multiple Visual Scripts for regression testing of Web sites or applications. Job Scheduler uses the Visual Scripts developed by Oracle Functional Testing for Web Applications.

Oracle Functional Testing for Web Applications Navigation Editor User’s Guide – explains how to use the features and options of the Navigation Editor to you modify the navigation paths used by of Oracle Load

Page 18: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Preface

xviiixviiixviiixviii Functional Testing User's Guide

Testing for Web Applications Thin Client to play back the sequence of pages in the Visual Script.

Oracle Functional Testing for Web Applications Application Programming Interface Reference – provides reference information for using the Oracle Functional Testing for Web Applications Programming Interface for expanding Visual Script capabilities using Test Scriptlets or external programs.

Oracle Functional Testing for Web Applications Result Objects Reference – explains how to use the Application Programming Interface to access Oracle Functional Testing for Web Applications Result Objects generated after playback of Visual Scripts.

Oracle Load Testing for Web Applications Load Testing User’s Guide – explains how to use the features and options of Oracle Load Testing for Web Applications to simulate multiple users accessing a Web site or application for performance and scalability testing. Oracle Load Testing for Web Applications uses the Visual Scripts developed by Oracle Functional Testing for Web Applications.

Oracle Test Manager for Web Applications Test Manager User’s Guide –explains how to use the features and options of Oracle Test Manager for Web Applications to organize and manage your overall testing process. It provides a single unified platform for sharing information among team members.

Electronic Documentation

The Oracle Application Testing Suite download from our Web site automatically installs an Adobe Portable Document Format (PDF) version of the Oracle Application Testing Suite Getting Started Guide. This document requires the Adobe® Acrobat® Reader™, version 4.x (or higher), to open and view the .PDF file. You can download the free Acrobat Reader from the Adobe Web site: http://www.adobe.com/products/acrobat/readstep2.html.

The Oracle Application Testing Suite Getting Started Guide PDF file is an option on the Oracle Application Testing Suite StartStartStartStart menu.

Page 19: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Preface

Preface xixxixxixxix

The installation also includes a readme.htm file that contains release notes and the latest updates to the product documentation. The readme.htm file opens in Microsoft® Internet Explorer when you select the Release NotesRelease NotesRelease NotesRelease Notes option on the Oracle Application Testing Suite StartStartStartStart menu.

The full Oracle Application Testing Suite documentation set is provided on the product CD-ROM in Adobe Portable Document Format (PDF). You can use the Acrobat Reader, version 4.x (or higher), to view, search, and print the documentation set. See the Adobe Web site, http://www.adobe.com, for additional information about Acrobat Reader.

If you downloaded the product from our Web site and wish to receive electronic versions of the User Guides in .PDF format, go to http://oracle.com/support/index.html. You’ll need the Acrobat Reader v4 (or higher) to open and view the documents.

Using Help

Oracle Load Testing for Web Applications provides a comprehensive online help system. The help topics include step-by-step “how to” instructions for common tasks and a complete reference.

You can press the F1 key at any open dialog box for an explanation of the options. You can select Help Help Help Help ���� Contents Contents Contents Contents to open the online help contents and index.

Page 20: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Preface

xxxxxxxx Functional Testing User's Guide

Conventions

This guide uses the following typographical conventions to identify specific items:

ConventionConventionConventionConvention DescriptionDescriptionDescriptionDescription

Bold Sans SerifBold Sans SerifBold Sans SerifBold Sans Serif Menu options and dialog box text.

Sans Serif Underlined Web page hyperlinks.

Sans Serif File names, Visual Script nodes, dialog box option selections.

Fixed-Pitch type Program code.

Fixed-Pitch Italic type User-specified program code parameters.

���� Arrow between menu options. Select each option in sequence.

Icon. An Event procedure in the Visual Basic programming language.

Icon. A Method procedure in the Visual Basic programming language.

Icon. An Object Property in the Visual Basic programming language.

Obtaining Technical Support

If you have questions about Oracle Application Testing Suite, first look in this guide, the online Help, and the release notes delivered with the software.

You can also check our Web site for the latest information about upgrades and other issues at http://www.oracle.com/support/index.html.

Page 21: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

1111

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 1111 Introduction

Oracle Functional Testing for Web Applications is a flexible, easy-to-use solution for automated functional and regression testing of your Web applications and Web Services. It provides the fastest way to create automated scripts that emulate complex Web transactions. Oracle Functional Testing for Web Applications then enables you to use these scripts for automated functional and regression testing.

Feature Highlights

Oracle Functional Testing for Web Applications offers the following advantages for Web-based application testing:

♦ Visual Script Technology/Automatic Test GenerationVisual Script Technology/Automatic Test GenerationVisual Script Technology/Automatic Test GenerationVisual Script Technology/Automatic Test Generation – you can record and test your entire application in minutes with reusable, object-oriented Visual Scripts. Recorded Visual Scripts automatically capture and test Anchors, Elements, Forms, Frames, HTML, Images, Image Maps, Links, ActiveX controls, Java Applets, VBScript, and JavaScript. Visual Scripts require no programming.

♦ .NET Web Applications.NET Web Applications.NET Web Applications.NET Web Applications – you can record and test ASP.NET Applications and WebForms, XML Web Services, .NET Windows Forms Plug-in Support, and Visual Studio Integration.

♦ Siebel 7 Performance TestSiebel 7 Performance TestSiebel 7 Performance TestSiebel 7 Performance Testing and Monitoringing and Monitoringing and Monitoringing and Monitoring – you can quickly and easily verify that your Siebel deployment will function as designed and that their Siebel environment will scale to support the activities of the enterprise.

♦ Broad Extensibility with Standard LanguagesBroad Extensibility with Standard LanguagesBroad Extensibility with Standard LanguagesBroad Extensibility with Standard Languages -Visual Scripts can be extended though Test Scriptlets and external tests with your custom code written in VBScript, C++, or Java.

Page 22: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Feature Highlights

2222 Functional Testing User's Guide

♦ HTTPs and SSL SupportHTTPs and SSL SupportHTTPs and SSL SupportHTTPs and SSL Support – supports all popular protocols as well as certificates.

♦ InInInIn----place Graphical Test Results and Automatic Replace Graphical Test Results and Automatic Replace Graphical Test Results and Automatic Replace Graphical Test Results and Automatic Re----baselinibaselinibaselinibaseliningngngng - test script failures and content differences are indicated by color-coded flags within the Visual Scripts, enabling rapid diagnosis of application errors. Errors are captured in detailed HTML reports that provide complete playback results. Users can easily update scripts as their applications change rather than having to re-record.

♦ Data Bank WizardData Bank WizardData Bank WizardData Bank Wizard – create data-driven tests without programming. A single Visual Script can be used over and over with varying input and response data using values from and external data source.

♦ Test Case InsertionTest Case InsertionTest Case InsertionTest Case Insertion – test cases can be added, with a point-and-click interface, to verify server response times, form elements, and presence or absence of specific text.

♦ BuiltBuiltBuiltBuilt----in Application Server Supportin Application Server Supportin Application Server Supportin Application Server Support - automatically manages dynamic session variables for BroadVision, ColdFusion, Microsoft ASP, WebLogic, ATG Dynamo, WebObjects, and other popular platforms.

♦ High Throughput Resource ValidationHigh Throughput Resource ValidationHigh Throughput Resource ValidationHigh Throughput Resource Validation – automatically collects and verifies all referenced Web resources that include links and images.

♦ Test Management and Defect TrackingTest Management and Defect TrackingTest Management and Defect TrackingTest Management and Defect Tracking – Oracle Functional Testing for Web Applications is now integrated with Oracle Test Manager for Web Applications Web test case management, which allows users to document and manage all their Oracle Functional Testing for Web Applications and manual test scripts and create test plans, automatically execute scripts from their test plan, and store detailed functional test results. Oracle Test Manager for Web Applications also provides integrated defect tracking and test requirements management.

Page 23: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Automatic Test Generation

Chapter 1: Introduction 3333

Automatic Test Generation

Oracle Functional Testing for Web Applications maximizes your productivity by virtually eliminating the need for programming. A Visual Script is recorded to capture your interaction with the Web application-under-test. A series of default test cases are automatically generated and added to the Visual Script. The default tests are designed for Anchors, Elements, Forms, Frames, HTML, Images, Image Maps, Links, ActiveX controls, Java Applets, VBScript, and JavaScript. Custom test cases can be added to the Visual Scripts to suit your specialized requirements.

In addition, you can add text matching test cases to detect the presence or absence of complex phrases embedded inside the HTML of the pages. These user-defined test cases can be stored in the Test Case Librarian for quick and simple re-use across all visual scripts.

Oracle Functional Testing for Web Applications provides full testing flexibility and extensibility using the Application Programming Interface. You can access the Application Programming Interface using VBScript Test Scriptlets and external program control. The Application Programming Interface allows you to embed your own testing logic at strategic points in the recorded script to suit your specialized testing needs. The Application Programming Interface supports many programming environments, including Microsoft Visual C++, Microsoft Visual Basic, and VBScript.

Page 24: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Visual Scripts

4444 Functional Testing User's Guide

Visual Scripts

Visual ScriptsVisual ScriptsVisual ScriptsVisual Scripts offer the fastest and easiest way to define tests for Web applications. Visual Scripts capture the interaction of the user with the Web application under test. These scripts serve as your baseline and can be replayed against new versions of your Web application to detect functional, regression, scalability, and post-deployment defects.

Visual Scripts offer you the power and flexibility to address all the testing challenges you face in your organization.

♦ You build a suite of Visual Scripts that serve as the baseline for regression and functional testing of your entire application.

♦ A subset of the Visual Scripts that depict different profiles of usages of your application can be re-used for load testing and scalability testing.

♦ All of the functional testing scripts that depict correct behavior of your Web application can be re-used after deployment to monitor your application 24 hours a day, 7 days a week.

Page 25: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Application Programming Interface

Chapter 1: Introduction 5555

Application Programming Interface

As powerful as Visual Scripts are, there may be circumstances where Web testing requires specialized capabilities to achieve specific test objectives. Some examples are communicating with external programs or databases, performing tests that use custom algorithms to verify page content, and performing conditional navigation of a Web site based upon dynamically changing data.

Oracle Functional Testing for Web Applications provides testing flexibility and extensibility through the Application Programming Interface (API). The API can be used with standard programming languages, such as Visual Basic, VBScript, JavaScript, Java, and C++ to extend the capabilities of Visual Scripts. Oracle Functional Testing for Web Applications provides two ways to extend Visual Script testing capabilities using the API: Test Scriptlets and external program control.

The Data Bank Wizard

The Data Bank Wizard allows you to quickly and efficiently create automated data-driven tests. Data Banks are used to hold unlimited amounts of input data that can be automatically fed into your Web application. Oracle Functional Testing for Web Applications determines the set of parameters defined by each page of the Web application in the Visual Script. Users can map these parameters to values in Data Bank files using the Data Bank Wizard.

During playback, the parameters in the Web page are filled with values from the Data Bank file. Data Bank files can be easily created or modified using any simple text editor, spreadsheet, word processor, or database application.

Oracle Functional Testing for Web Applications can also be used to automatically generate a Data Bank file from a Visual Script. Users can create sophisticated unattended regression tests to thoroughly exercise a Web application by using varied input data from Data Bank files.

Specialized Web Server Testing

A key component of any Web-based solution is the portion of the application residing on the Web server that is used to support the Web

Page 26: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Real Time Visual Test Results Analysis

6666 Functional Testing User's Guide

client. It is important that the structure and content of each response from Web servers remain accurate for each of the many different types of requests originating from a Web client application. Oracle Functional Testing for Web Applications has been designed to test the Web server accurately for expected results, responsiveness, and all unexpected error conditions.

Oracle Functional Testing for Web Applications based testing is independent of the type of Web server1 and the operating system2 on which the Web server is running.

Real Time Visual Test Results Analysis

Oracle Functional Testing for Web Applications presents the contents of each Web page and the test cases graphically using an intuitive tree format in the Visual Script. This unique approach allows errors and problems encountered during playback to be displayed using simple color-coded flags in the Visual Script.

Test results are displayed dynamically in the Visual Script tree as the script is being played back. In addition, Oracle Functional Testing for Web Applications shows a summary of the details of the playback in an output log window as a list of playback events. Users can double-click on any error event in the output log to advance quickly and efficiently to the corresponding page in the script. Errors encountered upon Visual Script playback may either be rejected, ignored using a special mask feature, or accepted to create a modified baseline script.

System Requirements

Oracle Functional Testing for Web Applications has the following system requirements:

♦ Operating System: Windows XP, Windows Vista, Windows 2003, Windows 2000 (SP4)

1 Includes ASP-based, Cold Fusion-based, Net Dynamics-based, ISAP-based, NSAPI-based, APACHE, NTSE, and other custom servers. 2 Includes all UNIX and Microsoft Windows platforms.

Page 27: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

System Requirements

Chapter 1: Introduction 7777

♦ Memory: Minimum 512 MB

♦ System: x86 32bit processor, 1.5 GHz or faster

♦ Disk Space: 1 GB minimum

♦ Browser: Internet Explorer 6.0 or higher

Oracle Load Testing for Web Applications has the following system requirements:

♦ Operating System: Windows XP, Windows Vista, Windows 2003, Windows 2000 (SP4)

♦ Memory: Minimum 1 GB

♦ System: x86 32bit processor, 1.5 GHz or faster

♦ Disk Space: 1 GB minimum

♦ Browser: Internet Explorer 6.0 or higher, Firefox 2.0 or higher

♦ Database: Microsoft SQL Server or Microsoft Access (Access not recommended for production usage)

♦ Application Server: JBoss 4.0.2 (downloadable from http://www.jboss.org/jbossas/downloads)

NoteNoteNoteNote: These are minimum requirements only and actual requirements for the Oracle Load Testing for Web Applications Server will vary depending on the size and configuration of your load test. If you are running larger load tests, of greater than 1000 Virtual Users, you should consider deploying Oracle Load Testing for Web Applications on a faster server class machine with a minimum of 2GB RAM recommended.

NoteNoteNoteNote: The amount of memory required on the Oracle Load Testing for Web Applications Agent systems may increase based on the number of Virtual Users that will be assigned to run on each Agent. For more information, visit the QA/Testing Technology Center on Oracle Technology Network or contact your Oracle representative.

Oracle Test Manager for Web Applications has the following system requirements:

Page 28: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

System Requirements

8888 Functional Testing User's Guide

♦ Operating System: Windows XP, Windows Vista, Windows 2003, Windows 2000 (SP4)

♦ Memory: Minimum 1 GB

♦ System: x86 32bit processor, 1.5 GHz or faster

♦ Disk Space: 1 GB minimum

♦ Browser (for Web client): Microsoft Internet Explorer 6.0 or higher, Firefox 2.0 or higher

♦ Database: Microsoft SQL Server or Microsoft Access (Access not recommended for production usage)

♦ Application Server: JBoss 4.0.2 (downloadable from http://www.jboss.org/jbossas/downloads)

NoteNoteNoteNote: These are minimum requirements only and actual requirements for Oracle Test Manager for Web Applications will vary depending on the quantity of test assets stored and number of concurrent users accessing the application. If you have a large quantity of test cases, requirements or issues stored and/or are deploying Oracle Test Manager for Web Applications for a team greater than 10 users, you should consider deploying Oracle Test Manager for Web Applications on a faster server class machine with a minimum of 2GB RAM recommended.

Page 29: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

9999

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 2222 Basics

This chapter explains how to use the main features of Oracle Functional Testing for Web Applications. It explains how to install and start the program and provides a description of the features of the main window.

Installing and Starting Oracle Application Testing Suite

There are two ways that you can install Oracle Application Testing Suite:

1.1.1.1. From the Web site:

http://www.oracle.com/

♦ Download the product (oats###.exe) from the Web site and save it to a temporary directory on your hard disk.

♦ Run oats###.exe and follow the setup instructions to install Oracle Application Testing Suite.

2.2.2.2. From the CD:

♦ Insert the Oracle Application Testing Suite CD into your computer’s CD-ROM drive.

♦ In Windows, click Start Start Start Start ���� Run Run Run Run and browse to the drive letter that corresponds to the CD-ROM drive.

♦ Run setup.exe located in the root directory of the CD-ROM.

3.3.3.3. Follow the setup instructions to install the Oracle Application Testing Suite.

4.4.4.4. When the installation is complete, click Start Start Start Start ���� Programs Programs Programs Programs ���� Oracle Oracle Oracle Oracle Application Testing Suite Application Testing Suite Application Testing Suite Application Testing Suite ���� Oracle Functional Testing for Web Oracle Functional Testing for Web Oracle Functional Testing for Web Oracle Functional Testing for Web

Page 30: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

ApplicationsApplicationsApplicationsApplications to start Oracle Functional Testing for Web Applications.

Main Window Features

The Oracle Functional Testing for Web Applications main window is where you perform the majority of your Visual Script development activities. The main window consists of the menu bar, toolbar, and three panes: the Visual Script pane, Browser pane, and Playback Results Log pane, which are all fully scrollable.

U

V

RL or File location

10101010 Functional Testing User's Guide

The Title bar of the window shows the program name followed by the current Workspace and Visual Script name.

Directly above the Web Browser pane is a combo box for entering the URL or file location of the Web page(s) to test. The bottom of the main window includes a status line.

isual Script Pane

Browser Pane

Results Pane

Status Line

Page 31: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

Chapter 2: Basics 11111111

Overview of the Menu Options

The Oracle Functional Testing for Web Applications menu has the following options:

The following sections explain each of the menu options and show the associated toolbar buttons.

File Menu These menu options let you work with Visual Script files, workspaces, and output logs. The following options are available:

New ScriptNew ScriptNew ScriptNew Script – creates a new Visual Script.

Open Open Open Open – opens an existing Visual Script or Job for playback or modification. Select which type of file to open using the selector list in the dialog box.

Close (typeClose (typeClose (typeClose (type)))) – closes the currently open Visual Script or Job.

Open WorkspaceOpen WorkspaceOpen WorkspaceOpen Workspace – opens a different workspace for storing test scripts and output log information. You create and delete workspaces using the options on the AdminAdminAdminAdmin menu.

Save (type) Save (type) Save (type) Save (type) – saves any changes to the currently open Visual Script or Job. If the script or job has not been saved before, Oracle Functional Testing for Web Applications asks for a filename.

Save (type) AsSave (type) AsSave (type) AsSave (type) As – saves the currently open Visual Script or Job using a different filename.

Save Output Log AsSave Output Log AsSave Output Log AsSave Output Log As – saves the current Playback Results Log to a file.

Save Web Page AsSave Web Page AsSave Web Page AsSave Web Page As – saves the Web page in the Browser pane to a file.

Export Script AsExport Script AsExport Script AsExport Script As – exports the currently open Visual Script to an ASCII text file. The Visual Script hierarchy is written to the text file the same way as it is expanded or collapsed in the Visual Script pane.

Export Output Log AsExport Output Log AsExport Output Log AsExport Output Log As – exports the contents of the Results log pane to an ASCII text file. You can also export saved Results log files using ResultsResultsResultsResults ���� View Results LogView Results LogView Results LogView Results Log.

Page 32: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

12121212 Functional Testing User's Guide

JobJobJobJob – opens a sub menu with the following options:

New JobNew JobNew JobNew Job – creates a new Visual Script Job. You can append multiple Visual Scripts to the job.

Append Existing ScriptAppend Existing ScriptAppend Existing ScriptAppend Existing Script – opens a dialog box for selecting the Visual Script to append to the current Job.

ExitExitExitExit – exits Oracle Functional Testing for Web Applications.

[Latest files list] - shows the last four opened Visual Scripts.

Edit Menu These menu options let you edit Visual Scripts, expand and collapse the script tree, clear the output log window, and work with the Data Bank Wizard. The following options are available:

Reset Browser StateReset Browser StateReset Browser StateReset Browser State – clears settings from a previous recording and playback. Selecting this option resets Oracle Functional Testing for Web Applications to a clean start-up state. The default browser window name is reset to none, session cookies are cleared, user authentication is cleared, and any external browser windows that may have been opened are closed.

Use this option before loading the page where you want to start recording into the browser pane. This ensures that the new Visual Script that you record will not be affected by any left-over settings.

Script CommentsScript CommentsScript CommentsScript Comments – opens a dialog box for inserting comments about Visual Script development and modification.

Data Bank WizardData Bank WizardData Bank WizardData Bank Wizard – opens the Data Bank Wizard dialog box.

PropertiesPropertiesPropertiesProperties – opens the properties dialog box for the currently selected node in the Visual Script tree.

Page 33: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

Chapter 2: Basics 13131313

View Menu These options let you change the view and size of the panes of the Oracle Functional Testing for Web Applications main window. The following options are available:

Clear Results WindowClear Results WindowClear Results WindowClear Results Window – removes the current information from the Results Log window.

Resize Visual Script ViewResize Visual Script ViewResize Visual Script ViewResize Visual Script View – changes the relative widths of the Visual Script pane and the Browser pane of the Oracle Functional Testing for Web Applications main window to make one or the other more visible.

Resize Results WindowResize Results WindowResize Results WindowResize Results Window – shows or hides the playback Results log window.

Expand SExpand SExpand SExpand Scriptcriptcriptcript – expands the entire Visual Script tree.

Collapse ScriptCollapse ScriptCollapse ScriptCollapse Script – collapses the entire Visual Script tree.

Run Menu These options let you record and play back Visual Scripts, generate Netscape-specific baselines, and run resource validation. The following options are available:

RecordRecordRecordRecord – provides options for starting and stopping manual recording of Visual Scripts and generating Netscape-specific baselines. The following submenu options are available:

Start Start Start Start – starts recording Visual Scripts.

Stop Stop Stop Stop – stops recording Visual Scripts when in record mode.

Start Windows Event Recorder Start Windows Event Recorder Start Windows Event Recorder Start Windows Event Recorder – starts Windows Event Recording mode. Use this mode to record Window Event objects and/or x,y coordinate values for mouse actions within Web page objects (i.e. ActiveX controls). Window events are recorded to the Address node properties.

Stop Windows Event Recorder Stop Windows Event Recorder Stop Windows Event Recorder Stop Windows Event Recorder – stops Windows Event Recorder mode.

Page SnapshotPage SnapshotPage SnapshotPage Snapshot – records the state (mouse click events, user input data, etc.) of the current page in the browser to the Visual Script. This option is only active if the state of the page has changed since

Page 34: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

14141414 Functional Testing User's Guide

it was recorded to the Visual Script. For example, if a user clicks on the page (but not a link to another page), enters text into form fields, or performs other actions that do not cause a transition to a new page, the state of the page changes. However, the changed state is not automatically recorded as part of the Visual Script. The Page Page Page Page SnapshotSnapshotSnapshotSnapshot option lets you manually record the current state of the page as part of the Visual Script.

Navigate ManuallyNavigate ManuallyNavigate ManuallyNavigate Manually – opens a dialog box for manually specifying the page URL, target frame, post data and header information for the next page to record to the Visual Script.

Current PageCurrent PageCurrent PageCurrent Page – appends the current page to the Visual Script.

Web Services ScriptWeb Services ScriptWeb Services ScriptWeb Services Script – opens the Web Services Wizard for specifying the Web services to record.

PlaybackPlaybackPlaybackPlayback – provides options for starting and stopping playback of the currently open Visual Script. The following submenu options are available:

Start Start Start Start – starts playback of the Visual Script.

Stop Stop Stop Stop – stops playback of the Visual Script.

Current PageCurrent PageCurrent PageCurrent Page – plays back the currently selected page in the Visual Script.

Up to Current PageUp to Current PageUp to Current PageUp to Current Page – plays back the Visual Script from the beginning up to the currently selected page in the Visual Script tree.

From Current PageFrom Current PageFrom Current PageFrom Current Page – plays back the Visual Script from the current page to the end of the Visual Script.

Iterate Iterate Iterate Iterate – plays back a Visual Script repeatedly, with or without a Data Bank.

Resource ValidationResource ValidationResource ValidationResource Validation – runs the resource validation test for the currently open Visual Script.

Tests Menu These options let you insert and modify test cases in the Visual Script. The following options are available:

Page 35: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

Chapter 2: Basics 15151515

Insert Text Matching TestInsert Text Matching TestInsert Text Matching TestInsert Text Matching Test – inserts a test case to match the presence or absence of a specific text string in a Web page into the Visual Script.

Insert Server Response TestInsert Server Response TestInsert Server Response TestInsert Server Response Test – inserts a test case specifying the minimum and maximum server response time for a page into the Visual Script.

Insert Form Element TestInsert Form Element TestInsert Form Element TestInsert Form Element Test – inserts a test that performs the specified alphanumeric comparison on Form element properties and attributes.

InsertInsertInsertInsert Table Test Table Test Table Test Table Test – opens the Table Test Wizard for defining a custom test on a Web page table object. The Table Test Wizard lets you select the table object directly from the Web page by highlighting it with the mouse. The wizard also lets you specify the table object property to test and the type of test to perform.

Insert WinForms TestInsert WinForms TestInsert WinForms TestInsert WinForms Test – opens the WinForms Test Wizard for defining a custom test on a WinForms object. The wizard also lets you specify the element object property to test and the type of test to perform. Chapter 5 explains how to use the WinForms Test Wizard.

Insert Siebel TestInsert Siebel TestInsert Siebel TestInsert Siebel Test – opens the Siebel Test Wizard for defining a custom test on a Siebel application object. The wizard also lets you specify the Siebel object property to test and the type of test to perform. Chapter 5 explains how to use the Siebel Test Wizard.

Insert Test ScriptletInsert Test ScriptletInsert Test ScriptletInsert Test Scriptlet – opens a sub menu with the following options:

Before PageBefore PageBefore PageBefore Page – opens the Test Scriptlet pane for writing code to use as an extended test for a Visual Script. The code executes before the page of a Visual Script plays back. Test Scriptlets Before are custom VBScript code snippets that can be used to access and evaluate the Web page source, Document Object Model, and page navigation before the page plays back in the Visual Script. The VBScript that you create is stored as an internal part of the Visual Script.

After PageAfter PageAfter PageAfter Page – opens the Test Scriptlet pane for writing code to use as an extended test for a Visual Script. The code executes after the page plays back in the Visual Script. The VBScript that you create is stored as an internal part of the Visual Script.

Page 36: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

16161616 Functional Testing User's Guide

Browser Menu These options let you navigate Web pages in the Oracle Functional Testing for Web Applications Browser. The following options are available:

Go BackGo BackGo BackGo Back – goes back to the previous Web page.

Go ForwardGo ForwardGo ForwardGo Forward – goes forward to the next Web page.

Go HomeGo HomeGo HomeGo Home – goes to the URL specified in the RSW.INI file for the home page.

StStStStopopopop – stops loading the currently selected Web page.

Show Applet ResourceShow Applet ResourceShow Applet ResourceShow Applet Resource – opens a window listing the Java Applet resources recorded to each page of the Visual Script.

Show Java ConsoleShow Java ConsoleShow Java ConsoleShow Java Console – opens the Java console window. This option only appears if you installed the Oracle Application Testing Suite with Java support. The Microsoft VM - Java console enabled setting on the AdvancedAdvancedAdvancedAdvanced tab of the Control Panel Internet Properties must also be selected.

Show Plugin Java ConsoleShow Plugin Java ConsoleShow Plugin Java ConsoleShow Plugin Java Console - enables the Sun Java Plugin console window. The window does not open immediately when you select the menu option. The window opens automatically when Oracle Functional Testing for Web Applications records or plays back a page with a Java applet. This option is only available if Sun Plugin Applet SupportSun Plugin Applet SupportSun Plugin Applet SupportSun Plugin Applet Support is enabled in OptionsOptionsOptionsOptions ���� New SNew SNew SNew Scripts cripts cripts cripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script (under Advanced - Java Applet options).

Search the World Wide WebSearch the World Wide WebSearch the World Wide WebSearch the World Wide Web – goes to the Search URL specified in the Global Settings Manager.

Results Menu These options let you locate failures in the Visual Script and accept or discard tested versions of Visual Script pages. The following options are available:

View Results LogView Results LogView Results LogView Results Log – opens a dialog box for viewing or exporting Results log files in the current workspace.

View Results ReView Results ReView Results ReView Results Reportportportport – opens an HTML report showing the details of the last Visual Script playback results. Use the Results Report options in Options Options Options Options ���� New Scripts New Scripts New Scripts New Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script (under Results options) to specify results to include in the reports.

Page 37: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

Chapter 2: Basics 17171717

Find Next FailureFind Next FailureFind Next FailureFind Next Failure – jumps to the next failure indicated in the Visual Script. You can also press the F3 key.

Find Previous FailureFind Previous FailureFind Previous FailureFind Previous Failure – jumps to the previous failure indicated in the Visual Script. You can also press the Shift-F3 keys.

Accept All Tested PagesAccept All Tested PagesAccept All Tested PagesAccept All Tested Pages – accepts all changes detected in the Web pages by the Visual Script as the new baseline for testing.

Discard All Tested PagesDiscard All Tested PagesDiscard All Tested PagesDiscard All Tested Pages – discards all changed Visual Script pages and retains all of the recorded pages as the baseline for testing.

Disable Failing Default TestsDisable Failing Default TestsDisable Failing Default TestsDisable Failing Default Tests – disables all default tests that failed during playback of the Visual Script. Use the Content Tests options in Options Options Options Options ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script (under Functional Tests options) to enable or disable individual default tests at the global level.

Options Menu These selections let you set the options for Visual Scripts. The following options are available:

Current Script (Current Script (Current Script (Current Script (script namescript namescript namescript name)))) – opens the Oracle Functional Testing for Web Applications options dialog box for setting options for only the current Visual Script.

New Script (Global)New Script (Global)New Script (Global)New Script (Global) – opens the Oracle Functional Testing for Web Applications options dialog box for setting options for globally for all new Visual Scripts.

BrowserBrowserBrowserBrowser – opens the Control Panel Internet Properties dialog box.

Settings ManagerSettings ManagerSettings ManagerSettings Manager – opens a submenu for opening advanced options for Oracle Functional Testing for Web Applications system, global, workspace, script, and page level settings. The default settings provide for most testing situations. The default settings should be changed only with advice from Customer Support. The following options are available:

Global Global Global Global – opens the Settings Manager at the global settings level. Global level settings affect all Visual Scripts.

Workspace Workspace Workspace Workspace – opens the Settings Manager at the workspace settings level. Workspace level settings affect only Visual Scripts in the current Workspace.

Page 38: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

18181818 Functional Testing User's Guide

Script Script Script Script – opens the Settings Manager at the script settings level. Script level settings affect only the currently open Visual Script.

Page Page Page Page – opens the Settings Manager at the page settings level. Page level settings affect only the currently selected page in the Visual Script.

Tools Menu These options let you open other tools in the Oracle Application Testing Suite. The available options will depend upon the software you have installed on your system. The following options may appear on the Tools menu:

Web Services Web Services Web Services Web Services – opens a dialog box for specifying the Web services to record.

eeee----SpiderSpiderSpiderSpider – opens the e-Spider window, which allows you to map your site or Web application (only visible if e-Spider is enabled in Settings Manager).

Job SchedulerJob SchedulerJob SchedulerJob Scheduler – starts the Job Scheduler application for running multiple Visual Scripts as a single job.

Oracle Load Testing for Web ApplicationsOracle Load Testing for Web ApplicationsOracle Load Testing for Web ApplicationsOracle Load Testing for Web Applications – starts the Oracle Load Testing for Web Applications for performing load and stress testing on Web applications.

Navigation EditorNavigation EditorNavigation EditorNavigation Editor – opens the Navigation Editor for modifying the navigation paths used by the Oracle Load Testing for Web Applications Thin Client to play back the sequence of pages in the Visual Script.

Configure Mail SeConfigure Mail SeConfigure Mail SeConfigure Mail Serverrverrverrver – opens the Mail Server Configuration dialog box for specifying the e-Mail server type and sender and recipient addresses.

Admin Menu These options let you perform administrative tasks on your test library, workspaces, scripts, and logs. The following options are available:

Workspace ManagerWorkspace ManagerWorkspace ManagerWorkspace Manager – opens a dialog box for managing Workspaces. You can open existing Workspaces, create new Workspaces, and remove workspaces.

Script ManagerScript ManagerScript ManagerScript Manager – opens a dialog box for selecting the Visual Scripts to delete or rename.

Page 39: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

Chapter 2: Basics 19191919

Result Log ManagerResult Log ManagerResult Log ManagerResult Log Manager – opens a dialog box for selecting the playback results log files to delete or rename.

Job ManagerJob ManagerJob ManagerJob Manager – opens a dialog box for selecting the job files to delete or rename.

Dialog ManagerDialog ManagerDialog ManagerDialog Manager – opens a window for specifying actions to take to handle unexpected dialog boxes during playback of a Visual Script.

Authentication ManagerAuthentication ManagerAuthentication ManagerAuthentication Manager – opens a window for specifying user name and password information for use during playback of Visual Scripts.

TTTTest Library Managerest Library Managerest Library Managerest Library Manager – opens a dialog box for adding, removing, or modifying Text Matching test cases.

Help Menu These options let you access the Oracle Functional Testing for Web Applications online help, provide information about obtaining Technical Support, and show the Oracle Functional Testing for Web Applications serial number and current license.

Visual Script Pane

The Visual Script pane shows the tree hierarchy of recorded Web sites and pages. When you record Web pages (either manually or using the e-Spider), Oracle Functional Testing for Web Applications creates the Visual Script tree for you.

Page 40: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

20202020

C

TS

Visual T

Visual Wqa

TSs♦

P

Collapsed Page

age Hierarchy

Expanded Page

Functional Testing User's Guide

lick to expand a branch or to collapse a branch.

he Visual Script tree will include any test cases you insert into the Visual cript. Each item in the tree is identified by its icon and a text description.

Script Icons he Visual Script uses additional icons in the tree to represent the following:

- Job node. - Visual Script node - Visual Script Page node.

- Yellow flag: skip test.

- Red flag: test failure.

- Red and yellow flags: ignore test failure.

Script Shortcut Menu hen working with Visual Scripts, you can use the shortcut menu as a

uick way to access various menu options. Right-clicking the mouse when Visual Script node is selected opens the shortcut menu.

he available options will vary depending upon which type of Visual cript node is selected. The following are examples of the available hortcut menu options: Toggle the default existence test for Visual Script nodes; Expand and collapse Visual Script nodes; Load the selected page into the browser pane; Modify default tests; Accept or discard tested pages generated by Visual Script playback;

Page 41: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

Chapter 2: Basics

♦ Modify test case options and Test Scriptlets; ♦ View Visual Script node properties; ♦ Add custom variables; ♦ Validate the XML page result against a schema file. Menu items that are dimmed do not apply to the currently selected Visual Script node.

Visual Script View You can toggle the Visual Script pane width using the View View View View ���� Resize Resize Resize Resize Visual Script View Visual Script View Visual Script View Visual Script View option or by dragging the border between the Browser pane and the Visual Script pane.

Job Scheduler Jobs Oracle Functional Testing for Web Applications lets you create Job Scheduler jobs in the Visual Script Pane. A job is a group of Visual Scripts in a particular order, error notification information, and severity mappings.

USm

Job Node

V

isual Script Nodes

21212121

se the JobJobJobJob option on the FileFileFileFile menu to open Jobs or append Visual cripts to Jobs. Use the options on the Job node right-click shortcut enu to edit notification and severity mapping properties.

Page 42: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

22222222 F

Chapter 3 explains how to use the Job notification and severity mapping properties.

Browser Pane

The browser pane contains a seamlessly integrated Web browser that you use to select the Web pages to test. It provides full navigation and Web access.

Enter URL or File Location

Web Page in Browser

Drop-Down History List

unctional Testing User's Guide

Page 43: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

Enter the full path and file name of the URL or local file, or drop down the list to select from recently accessed Web pages.

Test Scriptlet Editing Pane

Oracle Functional Testing for Web Applications provides the ability to extend the capabilities of your Visual Scripts programmatically using Test Scriptlets. Test Scriptlets use the Visual Basic Scripting Edition (VBScript) scripting language syntax. When you add a Test Scriptlet to a Visual Script, the Oracle Functional Testing for Web Applications browser pane changes to a script-editing pane where you can define your own VBScript code.

The following illustration shows the script-editing pane with a VBScript code snippet:

Test Scriptlet in Script-Editing Pane

T

est Case in Visual Script

Chapter 2: Basics 23232323

The Application Programming Interface (API) provides several methods and properties for accessing the HTML source of Web pages recorded to a Visual Script. You can use Test Scriptlets when your testing requires specialized capabilities to achieve specific test objectives. Chapter 10 of this manual and the Oracle Functional Testing for Web Applications Application Programming Interface Reference explain how to use the API to create custom tests using your own VBScript code.

Page 44: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

24242424 Functional Testing User's Guide

Playback Results Pane

The Playback Results pane shows a summary of the Visual Script test playback.

Drag to Adjust Width

Playback Results SummaryDouble-Click to View Page

Double-Click to View Validation

You can adjust the widths of the individual columns by dragging the dividers.

Icons in the Visual Script show the location of any specific failures of default tests or test cases. Resource Validation test results are listed in a separate window after playback of the script.

You can turn on and off the display of the Playback Results pane using the View View View View ���� Resize R Resize R Resize R Resize Results Windowesults Windowesults Windowesults Window option.

Status Bar

The status bar provides status and current progress information. The mode determines the information that appears in the status bar.

ProgressVisual Script Status

Mode (PLAY/EDIT/REC) Elapsed Time

Browser StatusBrowser

The status bar panes from left to right are as follows:

Mode - shows the current Oracle Functional Testing for Web Applications mode, PLAY-Playback, EDIT-Edit, REC-record.

Browser - shows the Visual Script browser type (Internet Explorer).

Visual Script Status - shows the current Visual Script page during playback and Record modes.

Page 45: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Workspaces

Chapter 2: Basics 25252525

Browser Status - shows the current Browser during playback and Record modes.

Elapsed Time - the amount of time required to access a page during playback and record modes.

Progress Bar - a graphic representation of the elapsed time.

Java Console

The Java Console displays error information for Java applets.

You can use the Java console to view more detailed messages than are displayed in the Browser Status pane of the Status Bar.

Select BrowserBrowserBrowserBrowser ���� Show Java ConsoleShow Java ConsoleShow Java ConsoleShow Java Console to open the window. The Show Java Show Java Show Java Show Java ConsoleConsoleConsoleConsole menu option only appears if you installed the Oracle Application Testing Suite with Java support.

The Microsoft VM - Java console enabled (requires restart) setting on the AdvancedAdvancedAdvancedAdvanced tab of the Control Panel Internet Properties must also be selected before the window will open.

Using Workspaces

Workspaces store project related Visual Script files and Results log files. You can use Workspaces to organize your various testing projects. Oracle Functional Testing for Web Applications lets you create multiple Workspaces.

Page 46: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Workspaces

26262626 Functional Testing User's Guide

The Workspace is a user-specified subdirectory of the installation directory (C:\OracleATS\OFT is the default). Oracle Functional Testing for Web Applications automatically appends an exclamation point to the directory name to identify the directory as a Workspace directory.

When you record and save Visual Scripts, or play back a Visual Script and save the log file, Oracle Functional Testing for Web Applications stores the script or log file in the currently open Workspace.

The following sections explain how to add, open, and delete Workspaces.

Adding a New Workspace

When starting a new testing project, you should create a project-specific Workspace to store related files.

To add a new Workspace:

1.1.1.1. Select AdminAdminAdminAdmin ���� Workspace ManagerWorkspace ManagerWorkspace ManagerWorkspace Manager. Oracle Functional Testing for Web Applications opens a dialog box for managing Workspaces.

The Workspace ManagerWorkspace ManagerWorkspace ManagerWorkspace Manager dialog box also lists the existing Workspaces and highlights the currently open Workspace.

2.2.2.2. Click NewNewNewNew. A new Workspace is added to the Existing Workspaces list.

3.3.3.3. Type a name for thee Workspace and press Enter.

Page 47: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Workspaces

Chapter 2: Basics 27272727

NoteNoteNoteNote: The new Workspace does not automatically become the currently open Workspace. You must specifically open the new Workspace to use it to store project files.

4.4.4.4. Click CloseCloseCloseClose when finished.

Opening a Workspace

Oracle Functional Testing for Web Applications automatically opens the last open Workspace when you start Oracle Functional Testing for Web Applications.

To open a different Workspace:

1.1.1.1. Select FileFileFileFile ���� Open WorkspaceOpen WorkspaceOpen WorkspaceOpen Workspace. Oracle Functional Testing for Web Applications opens a dialog box for selecting the Workspace to open.

NoteNoteNoteNote: If you have an unsaved Visual Script, Oracle Functional Testing for Web Applications asks if you want to save the file before opening the Workspace ManagerWorkspace ManagerWorkspace ManagerWorkspace Manager dialog box. Click YesYesYesYes to save the file, NoNoNoNo to discard the unsaved file, or CancelCancelCancelCancel to cancel opening a new workspace.

2.2.2.2. Select the Workspace to open.

3.3.3.3. Click OKOKOKOK. The opened workspace name appears in the title bar of Oracle Functional Testing for Web Applications.

Page 48: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Configuring the Mail Server

28282828 Functional Testing User's Guide

Deleting a Workspace

Oracle Functional Testing for Web Applications lets you delete a Workspace and all project files in the Workspace.

To delete a Workspace:

1.1.1.1. Select AdminAdminAdminAdmin ���� Workspace ManagerWorkspace ManagerWorkspace ManagerWorkspace Manager.

2.2.2.2. Select the Workspace to delete in the Existing Workspaces list.

CAUTIONCAUTIONCAUTIONCAUTION: Deleting a Workspace has the potential of erasing a large amount of data including Visual Script files, results logs, and Oracle Load Testing for Web Applications scenarios and profiles. Be sure you really want to do this before proceeding.

NoteNoteNoteNote: You cannot delete the currently open Workspace. The DeleteDeleteDeleteDelete, RenameRenameRenameRename and OpenOpenOpenOpen buttons are disabled when the currently open Workspace is selected.

3.3.3.3. Click DeleteDeleteDeleteDelete.

4.4.4.4. Click CloseCloseCloseClose when finished.

Configuring the Mail Server

The mail server configuration specifies the e-mail information for Job playback notification.

1.1.1.1. Select ToolsToolsToolsTools ���� Configure Mail Server. Configure Mail Server. Configure Mail Server. Configure Mail Server.

Page 49: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Configuring the Mail Server

Chapter 2: Basics 29292929

2.2.2.2. Select the type of server to use for error handling notifications.

3.3.3.3. For SMTP servers, enter the following server information.

♦ EEEE----Mail SenMail SenMail SenMail Senderderderder – specifies the email address from which error notification messages will be sent.

♦ Outgoing Mail Server (SMTP)Outgoing Mail Server (SMTP)Outgoing Mail Server (SMTP)Outgoing Mail Server (SMTP) – specifies the name of the outgoing SMTP mail server.

For MAPI servers, enter the following server information:

♦ ProfileProfileProfileProfile – specifies the email profile for a MAPI mail server. Use the BrowseBrowseBrowseBrowse button to select a previously configured MAPI profile.

4.4.4.4. To test the connection to the server, enter an email address in the Test Test Test Test EEEE----mail recipient mail recipient mail recipient mail recipient field and click Test ETest ETest ETest E----mailmailmailmail.

Click OKOKOKOK.

Page 50: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Configuring the Mail Server

30303030 Functional Testing User's Guide

[This page intentionally left blank]

Page 51: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

31313131

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 3333 Recording and Playing Back Visual Scripts and Jobs

Visual Scripts offer the fastest and easiest way to define tests for Web applications. When you record Visual Scripts, you capture the interaction of the user with the Web application under test. These scripts serve as your baseline and can be replayed against new versions of your Web application to detect functional, regression, scalability, and post-deployment defects.

Oracle Functional Testing for Web Applications can combine multiple Visual Scripts into a single “job” that can be play back the scripts in sequence. Jobs can be used to build modular test configurations using various combinations of Visual Scripts. Job scripts created in Oracle Functional Testing for Web Applications can also be used with scheduling capabilities of Job Scheduler to play back the job and Visual Scripts at specific times.

A subset of the Visual Scripts that depict different profiles of usages of your application can be re-used for load and scalability testing of your application.

All of the functional testing scripts that depict correct behavior of your Web application can be re-used after deployment to monitor your application 24 hours a day, 7 days a week.

Since Web applications may sometimes require that you have separate baselines for different browsers, Oracle Functional Testing for Web Applications offers you the flexibility to create baseline Visual Scripts for both Internet Explorer and Netscape Navigator. You can switch between the two baselines at the touch of a button.

This chapter explains how to record and playback Visual Scripts and Jobs.

Page 52: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

32323232 Functional Testing User's Guide

Recording Visual Scripts

Basic recording of Visual Scripts is simple. Load the first page, press a button in Oracle Functional Testing for Web Applications, and navigate your Web site or application as a normal user. When finished, stop recording. You can also use the e-Spider to create a Visual Script that maps an entire site or application without having to navigate the pages manually.

For Jobs, you create a new Job using the FileFileFileFile menu and then append existing Visual Scripts to the Job.

Oracle Functional Testing for Web Applications also provides the capability to add test cases and map external data sources (Data Banks) to your Visual Scripts.

Recording Visual Scripts Manually

The most basic procedure for recording Visual Scripts is manual recording. Manual recording lets you determine the sequence of actions and the pages to include in the Visual Script.

To record Visual Scripts manually:

1.1.1.1. Select EditEditEditEdit ���� Reset To Original StateReset To Original StateReset To Original StateReset To Original State to clear any session cookies or user login information that may be currently saved by the browser. This is only necessary if there has been previous user activity in the browser that may have saved settings. For example, if you previously logged into a Web application and the settings are not cleared, the Web application may not redisplay the login page.

2.2.2.2. Type or select the full URL or path and file name of the first page into the address line of the Browser pane of Oracle Functional Testing for Web Applications. (If typed, press Enter.)

Page 53: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts an

3.3.3.3. Select RunRunRunRun ���� RecordRecordRecordRecord ���� StartStartStartStart or c

4.4.4.4. Navigate the Web page or appli♦ Follow links. ♦ Submit form data, etc. As you navigate the site or appliWeb Applications adds page nonode automatically captures AnHTML, Images, Image Maps, Applets, VBScript, and JavaScr

Type URL or File Location

S

elect from History List

d Jobs 33333333

lick the toolbar button.

cation in the Browser pane.

cation, Oracle Functional Testing for des to the Visual Script. Each page chors, Elements, Forms, Frames, Links, ActiveX controls, Java ipt for testing upon playback.

Page 54: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

34343434 Functional Testing User's Guide

5.5.5.5. Select RunRunRunRun ���� RecordRecordRecordRecord ���� StopStopStopStop or click the toolbar button when finished.

Once the Visual Script is recorded, you can customize the script in a variety of ways. See Working with Visual Scripts in Chapter 4 for additional details about customizing Visual Scripts.

NotesNotesNotesNotes: When recording frames-based Web pages, be sure to follow links starting from the base frame. This provides Oracle Functional Testing for Web Applications with a reference point from which to start navigating frames during playback.

It is important that the first page recorded to the Visual Script is not loaded into the browser pane by an action that occurred on a previous page (for example, Back/Forward browser buttons, link navigation, or form submission). If the recording of the first page of the Visual Script is dependent upon the context of navigation to the page, the Visual Script playback may not work correctly.

Recording a Page Snapshot

Oracle Functional Testing for Web Applications automatically records page nodes to the Visual Script each time the browser transitions from one

Page Nodes in Visual Script Pane

Page 55: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 35353535

page to the next. The pages are recorded in their default state as the page loads into the browser.

In some instances, you may want to manually record the current state of a page to the Visual Script (i.e. make a snapshot of the page) to capture changes to the page after it was loaded and recorded. For example, if a user clicks on the page (but not a link to another page), enters text into form fields, or performs other actions that do not cause a transition to a new page, the state of the page changes. However, the changed state is not automatically recorded as part of the Visual Script. You can manually record the current state of the page (including user clicks and data entered into forms, etc.) to the Visual Script by taking a Page Snapshot.

Page Snapshots are also used for recording events in Java applets.

The Page SnapshotPage SnapshotPage SnapshotPage Snapshot option is only active if the state of the page has changed since the page was recorded to the Visual Script or an applet event was triggered.

To record a Page Snapshot:

1.1.1.1. Select RunRunRunRun ���� RecordRecordRecordRecord ���� StartStartStartStart or click the toolbar button to start recording.

2.2.2.2. Navigate to a page that provides for user interaction, for example, a form page or a Java applet. However, you can make a snapshot of any page with state changes).

3.3.3.3. Click on the page or enter data into a form (without submitting the form data), or click on an option in a Java applet to trigger an event.

4.4.4.4. Select RunRunRunRun ���� RecordRecordRecordRecord ���� Page SnapshotPage SnapshotPage SnapshotPage Snapshot or click the toolbar button to record the current state of the page to the Visual Script.

NoteNoteNoteNote: You can also use the F7 hotkey to record a page snapshot.

5.5.5.5. Submit the form data or continue navigating the Web site, applet or application to record additional pages to the Visual Script.

6.6.6.6. Select RunRunRunRun ���� RecordRecordRecordRecord ���� StopStopStopStop or click the toolbar button when finished recording.

Page 56: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

36363636 Functional Testing User's Guide

Recording Visual Scripts Using e-Spider

e-Spider provides a convenient way to record a Visual Script without manual navigation. e-Spider automatically follows page links to map a site or application. You can then generate a Visual Script from the e-Spider map.

NoteNoteNoteNote: If you have a very large site or application, it is not advisable to try to spider the entire site from the home page due to time and system resource issues. A more efficient approach is to identify related sections of your site or application and create a set of modular Visual Scripts by first manually loading a specific page in a section and then starting e-Spider.

To record Visual Scripts with the e-Spider:

1.1.1.1. Type or select the full URL or path and file name of the first page where you want to start spidering into the address line of the Browser pane of Oracle Functional Testing for Web Applications.

2.2.2.2. Select Tools Tools Tools Tools ���� eeee----SpiderSpiderSpiderSpider or click the toolbar button. The e-Spider opens in a new window:

3.3.3.3. Click the Start Spider button.

Page 57: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 37373737

4.4.4.4. Wait for the e-Spider to finish. e-Spider builds a map of the site or application as a tree hierarchy.

e-Spider also generates a report and shows it in the Oracle Functional Testing for Web Applications browser.

5.5.5.5. Make any edits to the e-Spider tree as necessary (i.e. append form results pages, ignore pages, etc).

Appending Form Pages to the e-Spider Map e-Spider does not navigate below pages that contain forms. Pages with forms are shown with an “F” icon ( ) next to the page node. e-Spider provides an interactive capability so that you can navigate to pages with forms, fill in the form, navigate to the pages below, and then add the generated “results” page to the e-Spider map.

6.6.6.6. Double-click the page with a form in the e-Spider map. The page appears in the Oracle Functional Testing for Web Applications Browser pane.

7.7.7.7. Enter the form data and click the “Submit” button.

NoteNoteNoteNote: The Web page “Submit” button can have any user-defined image or text label, such as “Register”, “Search”, or “Finished”.

8.8.8.8. When the “Results” page appears in the Oracle Functional Testing for Web Applications Browser pane, click the Append Page to Tree button in e-Spider to add the Results page to the e-Spider tree. The icon appears next to the page with the form in the e-Spider map.

9.9.9.9. Repeat steps 6-8 for each form page in the e-Spider tree.

Page 58: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

38383838 Functional Testing User's Guide

NoteNoteNoteNote: See Using e-Spider in Chapter 7 for additional details about using e-Spider options to modify the tree.

Saving the Map File and Generating the Visual Script 10.10.10.10. Select File File File File ���� Save Site Map AsSave Site Map AsSave Site Map AsSave Site Map As or click the toolbar button in e-Spider

to save the site map to a file. This is useful if you need to make any change to the tree in the future.

11.11.11.11. Click the Generate Script button to create a Oracle Functional Testing for Web Applications Visual Script from the e-Spider tree. The Visual Script appears in the left pane of Oracle Functional Testing for Web Applications.

e-Spider generates a report subsequent to each spidering session. The report appears in the browser pane of Oracle Functional Testing for Web Applications. The report is stored as an HTML file in the Spider folder of the installation directory. The report contains summary information about start/stop time, links, levels, and forms.

12.12.12.12. Close the e-Spider window.

Generated Visual Script

Page 59: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 39393939

Form input data appears under the Visual Script Parameters node of the “Results” page returned by the Web application processing the form:

NoteNoteNoteNote: See Working with Visual Scripts in Chapter 4 for additional details about Visual Scripts.

Recording DHTML Event Handlers

You can define how Oracle Functional Testing for Web Applications identifies and captures Dynamic HTML (DHTML) event handlers before recording Visual Scripts for Web pages that use the event handlers.

To define how Oracle Functional Testing for Web Applications identifies DHTML event handlers:

1.1.1.1. Start Oracle Functional Testing for Web Applications.

2.2.2.2. Analyze your Web page or application source to determine which HTML tags use which DHTML event handlers (for example, OnMouseOver, OnMouseOut, etc.).

3.3.3.3. Select OptionsOptionsOptionsOptions ���� New Scripts or Current ScNew Scripts or Current ScNew Scripts or Current ScNew Scripts or Current Scriptriptriptript.

4.4.4.4. Select Event RecordingEvent RecordingEvent RecordingEvent Recording in the Recording options. Oracle Functional Testing for Web Applications opens a window for specifying which event handlers are use with which HTML tags. Initially the Events to Events to Events to Events to RecordRecordRecordRecord tree is empty.

Page 60: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

40404040 Functional Testing User's Guide

5.5.5.5. Select an HTML tag in the Element tagElement tagElement tagElement tag list.

6.6.6.6. Select a DHTML event handler in the Event nameEvent nameEvent nameEvent name list.

7.7.7.7. Click Add EventAdd EventAdd EventAdd Event.

8.8.8.8. Repeat steps 6-7 to add multiple event handlers to the selected HTML tag.

9.9.9.9. Repeat steps 5-8 to add multiple HTML tag/event handler definitions to the Events to RecordEvents to RecordEvents to RecordEvents to Record list.

10.10.10.10. Click OKOKOKOK.

11.11.11.11. Record and playback the Visual Script.

Page 61: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 41414141

Recording Manual Navigation

Certain JavaScript, VBScript, CGI, or ASP applications may require manual navigation when recording Visual Scripts in the built-in browser pane, which is Internet Explorer compatible, to pass the correct post data to the page or application. In this case, you can use manual navigation rather than page clicks to record the Visual Script.

To record manual navigation:

1.1.1.1. Select RunRunRunRun ���� RecordRecordRecordRecord ���� StartStartStartStart or click the toolbar button to start recording.

2.2.2.2. Select RunRunRunRun ���� RecordRecordRecordRecord ���� Navigate ManuallyNavigate ManuallyNavigate ManuallyNavigate Manually. Oracle Functional Testing for Web Applications opens a dialog box for setting the navigation information:

3.3.3.3. Type the following navigation information and click OKOKOKOK.

URLURLURLURL – the Uniform Resource Locator of the page to which to navigate.

Target FrameTarget FrameTarget FrameTarget Frame – the name of the frame if navigating to a frames based page. This is the value of a Target= attribute of the frame set.

PostDataPostDataPostDataPostData – any name/value pair data to include as Post data for the page. Specify as name=value&name=value,&name=value, etc.

HeadersHeadersHeadersHeaders – any additional HTTP headers to send to the server. The headers are in addition to standard browser headers.

Page 62: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

42424242 Functional Testing User's Guide

Recording from an External Window

Oracle Functional Testing for Web Applications provides the ability to record Visual Scripts using an external browser window. You should start recording in an external window if your application generates an external window and carries forward one or more cookies.

To record from an external window:

1.1.1.1. Start Oracle Functional Testing for Web Applications and type the following URL in the Address field: c:\OracleATS\OFT\newwin.htm.

2.2.2.2. Select RunRunRunRun ���� RecordRecordRecordRecord ���� StartStartStartStart or click the toolbar button to start recording.

3.3.3.3. Type the URL of your Web application in the Address line and press Enter.

4.4.4.4. Navigate the site to record pages.

5.5.5.5. Close the external window.

6.6.6.6. Select RunRunRunRun ���� RecordRecordRecordRecord ���� StopStopStopStop or click the toolbar button when finished.

The recorded Visual Script will carry forward the cookies and play back correctly.

Recording Anchor Transitions

Oracle Functional Testing for Web Applications, by default, automatically records clicks on links that go to Anchor tags within the same Web page when recording Visual Scripts. For example, the following HTML shows the structure of a link to an Anchor tag: <A HREF="#Section1">See Section 1</A> <P>Some Additional HTML</P> <H1><A NAME="Section1">Section 1</A></H1> The click event on the See Section 1 link will be recorded and will be executed on playback of the Visual Script.

You can override the default recording behavior and have Oracle Functional Testing for Web Applications not record clicks to Anchor tags.

Page 63: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 43434343

To record anchor transitions:

1.1.1.1. Select Options Options Options Options ���� Settings Manager Settings Manager Settings Manager Settings Manager ���� Globa Globa Globa Globallll.

2.2.2.2. Expand the WebAnalyst branch and set the following setting:

3.3.3.3. Double-click IgnoreAnchorTransitions and select True.

4.4.4.4. Click OKOKOKOK.

NoteNoteNoteNote: If IgnoreAnchorTransitions does not appear in the WebAnalyst branch, type Ignore in the FilteredFilteredFilteredFiltered field.

Recording Pages with META Refresh Tags

Web applications that have redirection in some of the pages are automatically handled during record and playback.

If a Visual Script is being recorded and a page is encountered that has a META Refresh tag with a refresh time under 10 seconds, this page will be skipped and will not be recorded.

If a page is encountered that has a META Refresh tag and a refresh time over 10 seconds, the page will be recorded in the Visual Script.

Recording Auto Pages

An Auto page is a page that is recorded without any action on the part of the user. For example, certain applications will have the user wait for the completion of a long server-side transaction and display automatically one or more “Please wait...” pages to let the user know that the transaction is in progress and has not completed. If the page was displayed three times, the page is recorded three times in the Visual Script.

Since the same number of these “Please wait…” pages may not appear when the script is played back, you should create a Test Scriptlet After test on the first Auto page to check for the expected HTML in the “transaction completed” page. The following is an example of a Test Scriptlet After test that handles Auto pages. 'determine if server has returned requested page 'if not, replay current page 'if so, skip to next Visual Script page after 'last Auto page (in example case, page 4)

Page 64: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

44444444 Functional Testing User's Guide

If FindInHtml("<TITLE>Table of Contents") Then play.GotoPage(4) Else play.GotoPage(1) 'the current page End If This code checks for the text string <TITLE>Table of Contents in the HTML source of the page returned by the server. If the string is not in the source, the code replays the current page. Oracle Functional Testing for Web Applications loops on the current page (which should be the first Auto page) until the server returns a page with the <TITLE>Table of Contents string in the HTML source. Playback then continues with the Visual Script page after the last Auto page. In the above example, the next page after the last Auto page is page four of the Visual Script.

Recording Sites that Require User Authentication

For security purposes, many Web applications restrict entry by requiring users to enter a username and password pair into a popup dialog box.

NoteNoteNoteNote: If you record a Visual Script with a login Web page (not a popup dialog box), which may not reappear when you revisit the site due a session cookie, Oracle Functional Testing for Web Applications recognizes the cookie and skips the login page during playback. Oracle Functional Testing for Web Applications logs a message indicating the login page was skipped and playback continues with the next page.

To automate the user name and passwords during recording and playback of a Visual Script, you can use the Oracle Functional Testing for Web Applications Authentication Manager. The Authentication Manager lets you specify username and password combinations for multiple URLs. You can also map the usernames and passwords to a Data Bank file. When Oracle Functional Testing for Web Applications encounters a URL that needs authentication via a popup dialog box, it automatically fills in the username and password in the dialog box that is displayed. Select AdminAdminAdminAdmin ���� Authentication ManagerAuthentication ManagerAuthentication ManagerAuthentication Manager to add URLs, usernames, and passwords to the Authentication Manager. See the Using Admin Options in Chapter 9 for additional information about using the Authentication Manager.

Page 65: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 45454545

Alternatively, navigating to the URL will cause the browser to display a dialog box wherein the user must type in a username and password. To bypass the popup box that prompts for the username and password, prefix the username and password to the URL before navigating as shown below:

http://<username>:<password>@<URL>

As an example, if you wish to bypass the username/password pair prompt for a site called www.oracle.com using guest/guest as the username and password pair, the URL would look as follows:

http://guest:[email protected] The same technique can be applied for 'Spidering' sites that require authentication.

Using a Proxy Server with Authentication in Oracle Load Testing for Web Applications

You can use a Proxy server with user authentication in Oracle Load Testing for Web Applications.

In Oracle Functional Testing for Web Applications, open the Authentication Manager and add ProxyAuth (case-sensitive) to the URLURLURLURL field. Add the username and password to the User NameUser NameUser NameUser Name and PasswordPasswordPasswordPassword fields.

If the Proxy server authenticates using NTLM instead of basic, include the domain with the username. For example in the User NameUser NameUser NameUser Name field, enter domain\userID.

Recording Flash/ActiveX

Oracle Functional Testing for Web Applications recognizes Flash/ActiveX objects in Web pages and automatically records a new page to the Visual Script when you click on link in a Flash/ActiveX object. The automatic Oracle Functional Testing for Web Applications Flash/ActiveX object recorder has limitations in that it only records the x,y coordinates of clicks on the screen for the objects. Before playing back Visual Scripts containing Flash objects, make sure the Oracle Functional Testing for Web Applications window and browser pane are the same size as when the Visual Script was recorded.

Page 66: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

46464646 Functional Testing User's Guide

You may also need to resize the Oracle Functional Testing for Web Applications results log pane so that it does not appear on top of a part of the Flash object where mouse clicks occurred.

Oracle Functional Testing for Web Applications also includes a Windows Event recording mode that you can use to record actions on Flash/ActiveX objects. The Window Event Recorder records events on Windows objects rather than DHTML events.

To Record Window Events:

1.1.1.1. Start Oracle Functional Testing for Web Applications recording.

2.2.2.2. While recording a Visual Script, select Run Run Run Run ���� Record Record Record Record ���� Start Start Start Start WWWWindows Event Recorderindows Event Recorderindows Event Recorderindows Event Recorder, or click the toolbar button, to enable the Window Event Recorder mode.

3.3.3.3. Navigate the Web site.

4.4.4.4. Select Run Run Run Run ���� Record Record Record Record ���� Stop Windows Event RecorderStop Windows Event RecorderStop Windows Event RecorderStop Windows Event Recorder, or click the toolbar button, to disable the Window Event Recorder mode.

5.5.5.5. Stop Oracle Functional Testing for Web Applications recording.

The Start and Stop Event Recorder options are only available while Oracle Functional Testing for Web Applications is in record mode. The Windows Events are recorded to the Address node properties.

Recording Web Services

The Web Services Wizard provides a convenient way to record Visual Scripts for XML Web Services.

To record Web Services:

1.1.1.1. Start Oracle Functional Testing for Web Applications.

2.2.2.2. Select File File File File ���� New Script New Script New Script New Script.

3.3.3.3. Select Run Run Run Run ���� Record Record Record Record ���� Web Services Script Web Services Script Web Services Script Web Services Script.

4.4.4.4. Select the source option and click NextNextNextNext.

5.5.5.5. Follow the Web Services Wizard (based on step 4 selection) to select the source and click NextNextNextNext to get to the Select Method screen.

Page 67: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 47474747

6.6.6.6. Add or remove the methods to record to the Selected Methods Selected Methods Selected Methods Selected Methods list using the >> and << buttons.

7.7.7.7. [Optional] Test the methods in the Selected MethodsSelected MethodsSelected MethodsSelected Methods list.

8.8.8.8. [Optional] Change method arguments to a value or a Data Bank variable. See the Editing Methods later in this section for details.

9.9.9.9. Click NextNextNextNext when finished with any edit.

10.10.10.10. Click FinishFinishFinishFinish to generate the Visual Script.

When building a Web Services script, it is often necessary to use the result of one method call as the input for a subsequent method call.

1.1.1.1. Playback the Web Services Script.

2.2.2.2. Expand the Frame node.

3.3.3.3. Right-click on an XML value and select Create Custom VariableCreate Custom VariableCreate Custom VariableCreate Custom Variable.

4.4.4.4. Type a descriptive name for the variable and click OKOKOKOK.

5.5.5.5. Expand the Parameters node for a subsequent page in the Oracle Functional Testing for Web Applications script.

6.6.6.6. Right-click a parameter and select Selection PropertiesSelection PropertiesSelection PropertiesSelection Properties.

7.7.7.7. Select the Custom Variable you defined from the Mapped to VariableMapped to VariableMapped to VariableMapped to Variable list.

8.8.8.8. Click OKOKOKOK. The node for the parameter will include a check mark and the variable name in the form <{{varName}}>. When you playback the Web Services Script, the value from the first method will be passed to the subsequent method via the custom variable.

See Adding Custom Variables in Chapter 4 for more information about using custom variables.

Using the Web Services Wizard

Select Run Run Run Run ���� Record Record Record Record ���� Web Services Script Web Services Script Web Services Script Web Services Script to open the wizard. The Welcome screen of the Web Services Wizard introduces the Wizard. Click NextNextNextNext to continue.

Page 68: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

48484848 Functional Testing User's Guide

Selecting the Source The Select Source screen of the Web Services Wizard lets you select the source of your Web Services script.

The following options are available:

♦ Select methods from a web service definition (WSDL)Select methods from a web service definition (WSDL)Select methods from a web service definition (WSDL)Select methods from a web service definition (WSDL) – select this option if you want to specify the URL or file name of an existing Web Services Definition (WSDL) file to use. When you click Next,Next,Next,Next, the wizard opens a page for entering or browsing to the definition file.

♦ Capture web service requests from a client applicationCapture web service requests from a client applicationCapture web service requests from a client applicationCapture web service requests from a client application – select this option if you want to record the Visual Script by capturing the SOAP/HTTP traffic from you client application. When you click Next,Next,Next,Next, the wizard opens a page for starting/stopping the proxy recorder. While the proxy recorder is running you can capture the HTTP traffic by navigating your application.

♦ Build a script from previous template or one or more filesBuild a script from previous template or one or more filesBuild a script from previous template or one or more filesBuild a script from previous template or one or more files – select this option if you want to import SOAP/HTTP requests from previously added template or import one or more files.

Select an option and click NextNextNextNext to continue. The page that opens depends upon which option is selected.

Page 69: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 49494949

Entering a WSDL Address The Enter WSDL Address screen of the Web Services Wizard appears if you selected Select methods from a web service definition (WSDL)Select methods from a web service definition (WSDL)Select methods from a web service definition (WSDL)Select methods from a web service definition (WSDL) from the Select Source screen.

The Enter WSDL Address screen lets you specify the URL or file name of an existing Web Services Definition (WSDL) file to use.

The following options are available:

♦ Enter the URL or file name of the Web Services Definition file (WSDL)Enter the URL or file name of the Web Services Definition file (WSDL)Enter the URL or file name of the Web Services Definition file (WSDL)Enter the URL or file name of the Web Services Definition file (WSDL) – type the path and name of the file or select a file using BrowseBrowseBrowseBrowse.

♦ BrowseBrowseBrowseBrowse – opens a file selection dialog box for navigating to a stored file.

Click NextNextNextNext to continue to the Select Methods page of the Web Services Wizard.

Capturing SOAP/HTTP Traffic The Capture SOAP/HTTP screen of the Web Services Wizard appears if you selected Capture web service requests from a client applicationCapture web service requests from a client applicationCapture web service requests from a client applicationCapture web service requests from a client application from the Select Source screen.

Page 70: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

50505050 Functional Testing User's Guide

The Capture SOAP/HTTP screen records the Visual Script by capturing the SOAP/HTTP traffic from your client application.

The following options are available:

♦ Capture/StopCapture/StopCapture/StopCapture/Stop – starts/stops the proxy recorder. While the proxy recorder is running, you can capture the HTTP traffic by navigating your application. Click Capture,Capture,Capture,Capture, then open your client application and navigate or perform actions that generate the HTTP traffic you want to record. When finished, click StopStopStopStop in the Web Services Wizard.

♦ Launch one or more client applicationLaunch one or more client applicationLaunch one or more client applicationLaunch one or more client applications […]s […]s […]s […] - select a client application to launch for generating Web Services traffic. When finished, close the application and click StopStopStopStop.

Click NextNextNextNext to continue to the Select Methods page of the Web Services Wizard.

Selecting Methods The Select Methods screen of the Web Services Wizard appears if you selected Build a script from previous template or one or more filesBuild a script from previous template or one or more filesBuild a script from previous template or one or more filesBuild a script from previous template or one or more files from the Select Source screen or after you specified a definition file or captured requests from a client application.

Page 71: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 51515151

The Select Methods screen lets you select the methods to use in the Visual Script.

Expand the captured/available requests and select methods using the >>>>>>>> and <<<<<<<< buttons. Use the edit options to specify the method arguments.

The following options are available:

Available MethodsAvailable MethodsAvailable MethodsAvailable Methods – shows the Available Methods. Expand a request to show the available methods. You can add methods to the script by moving them to the Selected Methods list.

Import a SOAP/HTTP requestImport a SOAP/HTTP requestImport a SOAP/HTTP requestImport a SOAP/HTTP request – opens a dialog box for importing SOAP/HTTP request files.

DeleteDeleteDeleteDelete – deletes the selected methods from the Available Methods tree.

Delete AllDelete AllDelete AllDelete All - deletes all methods from the Available Methods tree.

Methods must be removed from the Selected Methods list before they can be deleted from the Available Methods. If methods are used in the Selected Methods list and you try to delete methods from the Available Methods, an error message appears indicating the methods must be removed from the Selected Methods before they can be deleted.

Page 72: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

52525252 Functional Testing User's Guide

Selected MethodsSelected MethodsSelected MethodsSelected Methods – lists the methods that have been added to the script.

New MethodNew MethodNew MethodNew Method – adds a new method to the Selected Methods list. Use the Edit option to define the method arguments.

Test the selected methodTest the selected methodTest the selected methodTest the selected method – runs the method and returns the last XML response.

Edit the selected methodEdit the selected methodEdit the selected methodEdit the selected method – opens a utility application for editing the selected method arguments.

Move method upMove method upMove method upMove method up – moves the selected method up one position in the Selected Method list.

Move method downMove method downMove method downMove method down – moves the selected method down one position in the Selected Method list.

Use the following buttons to add methods to, or remove methods from, the Selected Methods list:

Add the selected method to the scriptAdd the selected method to the scriptAdd the selected method to the scriptAdd the selected method to the script – adds the selected method to the Selected Methods list.

Remove the selected method from the scriptRemove the selected method from the scriptRemove the selected method from the scriptRemove the selected method from the script – removes the selected method from the Selected Methods list.

Click NextNextNextNext when done and then click FinishFinishFinishFinish to close the wizard.

Editing Methods The Web Services Method Editor lets you view and change data values used with Web Services XML request and methods.

To edit methods in the method editor:

1.1.1.1. Use the Web Services Wizard to select the method to use in a script.

2.2.2.2. Select a method in the Selected MethodsSelected MethodsSelected MethodsSelected Methods list of the Web Services Wizard.

Page 73: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 53535353

3.3.3.3. Click the Edit button. The method opens in the Method Editor.

4.4.4.4. Double-click the value for each method name in the right pane to edit the data in the field.

Page 74: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

54545454 Functional Testing User's Guide

5.5.5.5. Press Enter when finished.

You can also select a value and use Edit Edit Edit Edit ���� Edit Text Edit Text Edit Text Edit Text to open the data value in the Edit Value window.

Edit the value and click the Save toolbar button. Use the window Close button to close the Edit Value window and return to the Method Editor.

6.6.6.6. To edit the HTTP Request header information, click the HTTP HTTP HTTP HTTP RequestRequestRequestRequest tab to view the request header.

Page 75: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 55555555

7.7.7.7. Edit the Request header values as required for your application and save the changes using the toolbar button or one of the SaveSaveSaveSave options on the FileFileFileFile menu. Unsaved changes will be lost if you click a tab for a different view.

8.8.8.8. To edit the HTTP Request body information, click the Request BodyRequest BodyRequest BodyRequest Body tab to view the request body.

Page 76: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

56565656 Functional Testing User's Guide

9.9.9.9. Edit the Request body values as required for your application and save the changes using the toolbar button or one of the SaveSaveSaveSave options on the FileFileFileFile menu. Unsaved changes will be lost if you click a tab for a different view.

10.10.10.10. To edit the raw XML, click the Inner XMLInner XMLInner XMLInner XML tab to view the raw XML format.

Page 77: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 57575757

11.11.11.11. Edit the XML values as required for your application and save the changes using the toolbar button or one of the SaveSaveSaveSave options on the FileFileFileFile menu. Unsaved changes will be lost if you click a tab for a different view.

12.12.12.12. Use the Test options to test your changes.

13.13.13.13. Use the Configure option toolbar button to specify WS-Security and WS-Addressing options.

14.14.14.14. Select File File File File ���� Exit Exit Exit Exit when finished.

Testing Methods You can test methods to verify the correct response data is returned. Click the Test Test Test Test method toolbar button in either the Select Methods screen of the Web Services Wizard or the Method Editor window. The results appear in the HTTP Test window.

Page 78: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

58585858 Functional Testing User's Guide

The top pane of the HTTP Test window shows the XML request. The bottom pane shows the result returned from the request.

Setting Web Services Security and Addressing Options You can specify Web Services Security and Addressing option using the Configure option in the Web Services Method Editor.

1.1.1.1. Record a Web Services Script.

2.2.2.2. Select a Method and open the Web Services Method Editor.

3.3.3.3. Click the Configure toolbar button or select File File File File ���� Configure Configure Configure Configure.

For Web Services Security:

♦ Select Use WSUse WSUse WSUse WS----SecuritySecuritySecuritySecurity and specify the Username Token information.

For Web Services Addressing:

♦ Select Use WSUse WSUse WSUse WS----AddressingAddressingAddressingAddressing and specify the addressing information.

Page 79: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 59595959

The Web Services Extensions dialog box has the following options:

The following options are available:

WSWSWSWS----SecuritySecuritySecuritySecurity – specifies the Web Services Security settings:

♦ NoneNoneNoneNone – when selected, Web Services Security elements are not included in the XML request.

♦ Use WSUse WSUse WSUse WS----SecuritySecuritySecuritySecurity – when selected, Web Services Security elements will be included in the XML request. Specify the Username Token settings.

♦ Username TokenUsername TokenUsername TokenUsername Token – specifies the Username token profile to use for Web Services security. Enter the username and password information and select the security options.

� UsernameUsernameUsernameUsername – specifies the user name to use for the Username Token in the XML request.

� PasswordPasswordPasswordPassword – specifies the password to use for the Username Token in the XML request.

� Confirm PasswordConfirm PasswordConfirm PasswordConfirm Password – confirms the password.

Page 80: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

60606060 Functional Testing User's Guide

� Add Created HeaderAdd Created HeaderAdd Created HeaderAdd Created Header – when selected, a creation timestamp is included in the Username Token of the XML request for use in setting the server cache limit of used nonces.

� Add NonceAdd NonceAdd NonceAdd Nonce – when selected, a cryptographically random nonce value is included in the Username Token of the XML request to provide a countermeasure for replay attacks.

� Plaintext passwordPlaintext passwordPlaintext passwordPlaintext password – when selected, the password in the XML request is included as plain text. The URI attribute for the <wsse:Password> element is set to #PasswordText. When cleared, the password is encrypted. The URI attribute for the <wsse:Password> element is set to #PasswordDigest.

� Add TimestampAdd TimestampAdd TimestampAdd Timestamp – when selected, a timestamp value is included in the Web Services security element of the XML request. The timestamp includes both Created and Expires elements.

WSWSWSWS----AddressingAddressingAddressingAddressing –––– specifies the Web Services Addressing settings:

♦ NoneNoneNoneNone –––– when selected, Web Services Addressing elements are not included in the XML request.

♦ Use WSUse WSUse WSUse WS----AddressingAddressingAddressingAddressing –––– when selected, Web Services Addressing elements will be included in the XML request. Specify the settings.

� Message IDMessage IDMessage IDMessage ID –––– specifies the Web Services Addressing message identification. The optional message ID is a URI that uniquely identifies the message. You can use the New GUID button to generate a unique ID.

New GUIDNew GUIDNew GUIDNew GUID –––– generates a new unique message ID.

� RelatesRelatesRelatesRelates----ToToToTo –––– specifies the Web Services Addressing RelatesTo property.

� WSWSWSWS----Addressing VersionAddressing VersionAddressing VersionAddressing Version –––– specifies the Address element for the message ID.

Page 81: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Recording Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 61616161

Recording Using a Proxy

To record using a proxy:

1.1.1.1. Set the Proxy Configuration options (see Proxy Options in the Setting Recording Options section of this chapter).

2.2.2.2. Start the proxy recorder using the toolbar button.

3.3.3.3. Start recording in Oracle Functional Testing for Web Applications. Proxy recording results vary depending upon the Proxy configuration settings.

4.4.4.4. Navigate Web pages.

5.5.5.5. Stop the proxy recorder using the toolbar button.

Saving Visual Scripts

Once you have recorded a Visual Script, you can save the script to a file.

To save a Visual Script:

1.1.1.1. Select FileFileFileFile ���� Save ScriptSave ScriptSave ScriptSave Script or click the toolbar button. or: Select FileFileFileFile ���� Save Script AsSave Script AsSave Script AsSave Script As.

2.2.2.2. Enter a name and click SaveSaveSaveSave.

NoteNoteNoteNote: Oracle Functional Testing for Web Applications saves Visual Script files to the current Workspace as the default location. The Workspace is a user-specified subdirectory of the installation directory (C:\OracleATS\OFT is the default).

Page 82: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

62626262 Functional Testing User's Guide

Playing Back Visual Scripts

When you play back a Visual Script, Oracle Functional Testing for Web Applications compares the current version of your Web site or application against the baseline recorded in the Visual Script. Test failures and HTML differences are indicated by red flags annotated within the Visual Scripts during playback.

You can playback Visual Scripts as they were recorded or you can customize the script in a variety of ways. For example: ♦ Add test cases ♦ Modify default tests ♦ Append pages ♦ Ignore specific test cases ♦ Connect Data Banks ♦ Ignore specific failures ♦ Add custom programmatic tests

You can also set the global and script-specific playback options. See Working with Visual Scripts in Chapter 4 for additional details about customizing Visual Scripts.

Oracle Functional Testing for Web Applications uses a heuristic program to determine and exclude machine-generated components of Web page source that can change dynamically (i.e. session IDs) when visiting a site. The machine-generated components will not be tested and will not cause red flags to be generated in the Visual Script during playback.

You can specify exclusions to the heuristic comparison between master pages and tested pages on Visual Script playback. You can specify those parts of Web page source that change from one session to another and exclude them from the Visual Script playback comparison. The specified exclusions will not be tested and will not cause red flags to be generated during playback. This is useful for masking specific parts of URLs, HTML elements and attributes, and scripts.

Page 83: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 63636363

Playing Back the Entire Visual Script

To play back a Visual Script:

1.1.1.1. Select OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

2.2.2.2. Set the Playback options: ♦ General ♦ Script ♦ Event Playback ♦ Error Recovery

3.3.3.3. Click OKOKOKOK.

4.4.4.4. Select RunRunRunRun ���� PlaybackPlaybackPlaybackPlayback ���� SSSStarttarttarttart or click the toolbar button.

The Playback Results pane shows a summary of the Visual Script test playback.

NoteNoteNoteNote: It is important that you do not close any new browser windows opened by Oracle Functional Testing for Web Applications until playback is finished.

Playing Back a Specific Page

To play back a specific page in the Visual Script:

1.1.1.1. Select the page to play back in the Visual Script.

2.2.2.2. Select RunRunRunRun ���� PlaybackPlaybackPlaybackPlayback ���� Current PageCurrent PageCurrent PageCurrent Page or click the toolbar button.

Page 84: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

6666

Playing Back with Recorded Delay

Visual Scripts record the actual amount of time a user spends on a page before going to another page. This “think time” delay is recorded in the Duration node under the Address node for the page. The default Visual Script playback mechanism ignores the recorded delay.

To play back Visual Script using the recorded delay, check the Play with Play with Play with Play with think time delay between pagesthink time delay between pagesthink time delay between pagesthink time delay between pages check box in the Playback options, as follows:

1.1.1.1. Select OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

2.2.2.2. Select ScriptScriptScriptScript in the Playback options.

Sprd

Smdt

elect to lay with ecorded elay

pecify aximum elay ime

4444 Functional Testing User's Guide

3.3.3.3. Select the Play with think time delay between pagesPlay with think time delay between pagesPlay with think time delay between pagesPlay with think time delay between pages check box.

4.4.4.4. Specify a maximum amount of recorded delay to allow during playback in the Maximum delay (seconds)Maximum delay (seconds)Maximum delay (seconds)Maximum delay (seconds) box.

5.5.5.5. Click OKOKOKOK.

6.6.6.6. Play back the Visual Script.

Page 85: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 65656565

Playing Back Visual Scripts Multiple Times

Oracle Functional Testing for Web Applications lets you play back Visual Scripts multiple times (iterations). To play back with iterations:

1.1.1.1. Select RunRunRunRun ���� PlaybackPlaybackPlaybackPlayback ���� IterateIterateIterateIterate or click the toolbar button.

2.2.2.2. Set the Iteration options as follows:

Data BanksData BanksData BanksData Banks – Data Banks are external files that store data that can be passed to parameters in a Web page or application recorded in a Visual Script. To play back iterations from a Data Bank, you must first use the Data Bank Wizard to map variables and bind Data Bank fields to the Visual Script parameters. See Using Data Banks in Chapter 8 for details about using the Data Bank Wizard.

♦ Playback without Data BankPlayback without Data BankPlayback without Data BankPlayback without Data Bank – playback of the Visual Script uses the recorded data values as the parameters in the Web page or application.

♦ Playback with Data BankPlayback with Data BankPlayback with Data BankPlayback with Data Bank – playback of the Visual Script uses data values from a Data Bank as the parameters in the Web pages or application.

Page 86: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

66666666 Functional Testing User's Guide

Playback without Data BankPlayback without Data BankPlayback without Data BankPlayback without Data Bank – playback of the Visual Script uses the recorded data values as the parameters in the Web page or application. Even if you have used the Data Bank Wizard to add variables and bound the variables to Data Bank fields, the values from the Data Bank file are not used.

♦ Number of IterationsNumber of IterationsNumber of IterationsNumber of Iterations – the number of times Oracle Functional Testing for Web Applications plays back the entire Visual Script (all pages).

♦ Delay Between IterationsDelay Between IterationsDelay Between IterationsDelay Between Iterations – the amount of time Oracle Functional Testing for Web Applications waits after completing a full iteration before starting the next iteration.

Playback with Data BankPlayback with Data BankPlayback with Data BankPlayback with Data Bank – Visual Script playback uses data from a Data Bank file as the parameters in the Web pages or application.

♦ Use All RecordsUse All RecordsUse All RecordsUse All Records – each playback of the entire Visual Script (all pages) advances to the next record in the Data Bank file and uses the data as the parameter(s) in the Visual Script. This is useful if you want to play back the Visual Script using all records or a range of records in the Data Bank file.

♦ Use Current Record OnlyUse Current Record OnlyUse Current Record OnlyUse Current Record Only – playback of the entire Visual Script (all pages) uses only the data from the current record in the Data Bank file. This feature is useful when you want to debug a problem with a particular record in the Data Bank file.

♦ FilenameFilenameFilenameFilename – the name of Data Bank file being used.

♦ Current Record NumberCurrent Record NumberCurrent Record NumberCurrent Record Number – the current record from the Data Bank file. Data from this record will be passed to the parameters if Use Use Use Use Current Record OnlyCurrent Record OnlyCurrent Record OnlyCurrent Record Only is selected.

♦ Start at RecordStart at RecordStart at RecordStart at Record – the first Data Bank record to use for playback iterations. Enter a number or “First” for the first record.

♦ End at RecordEnd at RecordEnd at RecordEnd at Record – the last Data Bank record to use for playback iterations. Enter a number or “Last” if you are unsure of the last record number in the Data Bank file.

♦ Iterate Over RangeIterate Over RangeIterate Over RangeIterate Over Range – the number of times Oracle Functional Testing for Web Applications iterates the entire Visual Script (all pages) using all of the specified records for each iteration. If you

Page 87: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 67676767

have a Data Bank file with 5 records and Iterate over the range 2 times, Oracle Functional Testing for Web Applications plays back the entire Visual Script (all pages) a total of 10 times - twice for each record.

♦ Record Record Record Record –––– shows the record number and the data in the Data Bank record when using the arrow buttons to set the Start at RecordStart at RecordStart at RecordStart at Record and End at RecordEnd at RecordEnd at RecordEnd at Record values.

3.3.3.3. Click OKOKOKOK to start playback with iterations.

Playing Back with Data Banks

Oracle Functional Testing for Web Applications let you pass external data from a Data Bank to forms on playback of a Visual Script. To play back using external data from a Data Bank, you must first create a Data Bank file and then use the Data Bank Wizard to map variables and bind Data Bank fields to the Visual Script parameters. See Using Data Banks in Chapter 8 for details about creating Data Bank files and using the Data Bank Wizard.

To pass external data to forms on playback:

1.1.1.1. Record a Web page with a form.

2.2.2.2. Enter data into the form and click the “Submit” button.

3.3.3.3. Wait for the “Results” page to load in the Browser pane.

4.4.4.4. Stop Recording.

5.5.5.5. Select the “Results” page in the Visual Script.

6.6.6.6. Select EditEditEditEdit ���� Data Bank WizardData Bank WizardData Bank WizardData Bank Wizard or click the toolbar button.

Page 88: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

68686868 Functional Testing User's Guide

7.7.7.7. Select the VariablesVariablesVariablesVariables tab and map variables to the Visual Script parameters.

8.8.8.8. Select the Data BindingData BindingData BindingData Binding tab and select a Data Bank file.

Select variables to map to script parameters

Click to map all variables to script parameters

Select variables to bind to Data Bank fields

Click to bind all variables to Data Bank fields

Page 89: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 69696969

9.9.9.9. Bind Data Bank fields to the variables.

10.10.10.10. Click OKOKOKOK.

11.11.11.11. Select RunRunRunRun ���� Playback Playback Playback Playback ���� Iterate Iterate Iterate Iterate.

12.12.12.12. Select Playback with Data BankPlayback with Data BankPlayback with Data BankPlayback with Data Bank.

13.13.13.13. Select Use All RecordsUse All RecordsUse All RecordsUse All Records.

14.14.14.14. Specify the range of Data Bank records to use during playback of the script in the Start at RecordStart at RecordStart at RecordStart at Record and End at RecordEnd at RecordEnd at RecordEnd at Record fields. You can enter First and Last, respectively, to iterate playback through the entire Data Bank.

15.15.15.15. Set the number of iterations through the Data Bank in the Iterate over Iterate over Iterate over Iterate over RangeRangeRangeRange field.

16.16.16.16. Click OKOKOKOK.

17.17.17.17. Oracle Functional Testing for Web Applications plays back the entire Visual Script (all pages) using all of the specified records for each iteration. If you have a Data Bank with 5 records and iterate over the range 2 times, Oracle Functional Testing for Web Applications plays back the Visual Script (all pages) a total of 10 times - twice for each record.

Set to Play back Data Bank

Set Which Data Bank Records

Set # of Iterations Through Range

Page 90: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

70707070 Functional Testing User's Guide

Playing Back a Specific Data Bank Record

To play back a specific Data Bank record:

1.1.1.1. Map Visual Script Parameters to variables.

2.2.2.2. Bind variables to fields in a Data Bank file.

3.3.3.3. Select EditEditEditEdit ���� Data Bank WizardData Bank WizardData Bank WizardData Bank Wizard or click the toolbar button.

4.4.4.4. Click Goto RecordGoto RecordGoto RecordGoto Record.

5.5.5.5. Enter a record number and click OKOKOKOK.

6.6.6.6. Click OKOKOKOK to close the Data Bank Wizard.

7.7.7.7. Select RunRunRunRun ���� Playback Playback Playback Playback ���� Iterate Iterate Iterate Iterate.

8.8.8.8. Select Playback with Data BanksPlayback with Data BanksPlayback with Data BanksPlayback with Data Banks.

Click to specify Data Bank record

Page 91: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

Chapter 3: Recording

9.9.9.9.

10101010

11111111

12121212

Set to Playback Data Bank

Current Record Only

and Playing Back Visual Scripts and Jobs 71717171

Select Use Current Record OnlyUse Current Record OnlyUse Current Record OnlyUse Current Record Only.

.... Set the number of iterations for the record in the Iterate Over RecordIterate Over RecordIterate Over RecordIterate Over Record field.

.... Click OKOKOKOK.

.... Oracle Functional Testing for Web Applications plays back the entire Visual Script (all pages) using the specified record for each iteration.

Set # of Iterations Over Record

Specific Record

Page 92: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

72727272 Functional Testing User's Guide

Playing Back Visual Scripts on a Different URL

Frequently it is necessary to play back a Visual Script using another URL that is different from the URL that was used when the script was originally recorded. This occurs when you have a staging server or a test server (located under one URL) and a production web server (located under another URL) where the application is actually deployed.

In this context, the structure of the web pages is generally the same throughout the application, the main difference being the URL for each page of the Visual Script.

To convert a script for playback against the new URL:

1.1.1.1. Expand the first page in the Visual Script.

2.2.2.2. Locate the Address node and click the right-mouse button.

3.3.3.3. Select PropertiesPropertiesPropertiesProperties.

4.4.4.4. Edit the URL by changing the original URL to the new URL.

5.5.5.5. Click on OKOKOKOK in the properties dialog box.

6.6.6.6. Play back the script.

7.7.7.7. After playback is complete, review the red flags; select Results Results Results Results ���� Accept All Tested PagesAccept All Tested PagesAccept All Tested PagesAccept All Tested Pages.

8.8.8.8. Save the Visual Script to a new name.

9.9.9.9. The new script can now be used to play back against the new URL.

Page 93: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Playing Back Visual Scripts

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 73737373

Viewing Playback Results

The Playback Results pane shows a summary of the Visual Script playback.

Playback Results SummaryDouble-Click to View Page

Double-Click to View Validation

Double-click the corresponding Test #Test #Test #Test # to view a page in the Browser pane.

Resource Validation test results are listed in a separate window after playback of the script. Double click the Resource Validation Test #Test #Test #Test # to open the Resource Validation window.

You can turn on and off the display of the Playback Results pane using the View View View View ���� Resize Results Window Resize Results Window Resize Results Window Resize Results Window option.

Flags in the Visual Script show the location of any differences between the baseline page (master) and the tested page. Failures of default tests or test cases are also indicated by flags in the Visual Script.

See Working with Visual Scripts in Chapter 4 for a complete list of the flags and icons used in Visual Scripts.

Script Differences are Indicated by Flags on the Script Nodes

Page 94: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Creating and Using Jobs

74747474 Functional Testing User's Guide

Creating and Using Jobs

Oracle Functional Testing for Web Applications lets you create Job Scheduler-compatible jobs using the menus and the Visual Script view. A job is a group of Visual Scripts in a particular order, any associated Visual Basic code, error notification information, and severity mappings.

The Oracle Functional Testing for Web Applications Job features let you do the following:

♦ Group together Visual Scripts developed using Oracle Functional Testing for Web Applications to create Jobs.

♦ Use email notification for error handling when problems occur with Web pages.

♦ Define the log message format.

♦ Add Visual Basic code that executes on certain job and script events.

NNNNoteoteoteote: Visual Scripts are in read-only mode in the Job tree and cannot be edited while open in a Job. Open Visual Scripts directly in the Visual Script pane to edit individual scripts.

Creating a New Job

To create a new Job:

1.1.1.1. Select File File File File ���� Job Job Job Job ���� New Job New Job New Job New Job. Oracle Functional Testing for Web Applications opens a message if any existing Job or Visual Script is open that has not been saved.

2.2.2.2. Save or clear any unsaved Job or Visual Script if necessary. Oracle Functional Testing for Web Applications adds a Job icon the Visual Script pane.

3.3.3.3. Append existing Visual Scripts to the Job.

4.4.4.4. Set the Job properties.

5.5.5.5. Save the Job.

Appending Existing Visual Scripts To append an existing Visual Script to a Job:

Page 95: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Creating and Using Jobs

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 75757575

1.1.1.1. Select File File File File ���� Job Job Job Job ���� Append Existing Script Append Existing Script Append Existing Script Append Existing Script.

2.2.2.2. Select the Visual Script to append and click OpenOpenOpenOpen.

Rearranging Visual Scripts in a Job To rearrange Visual Scripts in a Job:

1.1.1.1. Expand or Collapse the Visual Scripts in the Job tree as needed to view the page or script levels to rearrange.

2.2.2.2. Click-and-drag Visual Script names to rearrange the order.

Opening an Existing Job

To open an existing Oracle Functional Testing for Web Applications Job:

1.1.1.1. Select File File File File ���� Open Open Open Open.

2.2.2.2. Select Oracle Functional Testing for Web Applications Job(*.mjb) from the Files of typeFiles of typeFiles of typeFiles of type selector list.

3.3.3.3. Select the job file to open and click OpenOpenOpenOpen.

Editing Job Properties

The Job properties define the Data Bank usage, error notification information, and severity mappings.

To open the Job properties:

♦ Right-click on the Job icon in the Visual Script view and select Job Job Job Job PropertiesPropertiesPropertiesProperties.

The tabs in the Job Properties dialog box let you do the following:

♦ Change Data Bank settings

♦ Change the severity mapping

♦ Specify log messages

♦ Specify e-mail details

♦ Reset default settings

Page 96: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Creating and Using Jobs

76767676 Functional Testing User's Guide

Changing Data Bank Settings To set Data Bank settings for Visual Scripts in a Job:

1.1.1.1. Open the Job properties and click the ScriptsScriptsScriptsScripts tab.

The Scripts tab has the following columns:

♦ ScriptsScriptsScriptsScripts – list the names of the Visual Scripts in the Job.

♦ Data BankData BankData BankData Bank – specify the Data usage for each Visual Script in the Job.

2.2.2.2. Click the drop down in the Data BankData BankData BankData Bank column and select the Data Bank setting you want to assign for specific Visual Scripts.

3.3.3.3. Specify settings for additional Visual Scripts.

4.4.4.4. Click OKOKOKOK when finished or set properties on other tabs.

Page 97: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Creating and Using Jobs

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 77777777

Changing the Severity Mapping The severity mapping determines the outcome result of the Visual Scripts in the job when an error occurs. Each possible visual script error is assigned a severity of pass, warning, fail, or error. When the error occurs, this result is assigned to the script.

To change the severity mapping:

1.1.1.1. Open the Job properties and click the Severity MappiSeverity MappiSeverity MappiSeverity Mappingngngng tab.

The Severity Mapping tab has the following columns:

♦ Playback ResultPlayback ResultPlayback ResultPlayback Result – list the various playback results that can occur.

♦ SeveritySeveritySeveritySeverity – specify the usage for each Visual Script in the Job.

2.2.2.2. Click the drop down in the SeveritySeveritySeveritySeverity column and select the severity that you want to assign to the play outcome.

3.3.3.3. Click OKOKOKOK when finished or set properties on other tabs.

Page 98: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Creating and Using Jobs

78787878 Functional Testing User's Guide

The severity settings are as follows:

Unexpected error – an unexpected error occurred.

Successful playback – script playback was successful.

Playback timed out – script playback timed out.

Playback stopped by user – script playback was stopped by the user.

Playback stopped programmatically – playback was stopped programmatically by the user.

Script stopped on page error – the script stopped because there was a page error and the script was set to stop on errors.

Internal error – an internal error occurred.

Stopped on browser dialog – a browser dialog that was not dismissed stopped playback.

Navigation failed – navigation to the next page failed.

Test failed – a text matching or server response test failed.

Browser window not found – playback failed because a browser window could not be found.

Unexpected page – the page is not the one expected by the tester.

Text matching test failed – the text matching test failed.

Server response test failed – the server response test failed.

Scriptlet failed – the scriptlet failed.

Custom test failed – the custom test failed.

Streaming media test failed – a streaming media test failed.

External Callout test failed – the external callout test failed.

Default Failures only – Oracle Functional Testing for Web Applications produced a warning.

Table test failed – a custom table test failed.

Custom Object Test Failed – a custom object test failed.

Custom Variable Test Failed – a custom variable test failed.

Page 99: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Creating and Using Jobs

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 79797979

Winforms Test failed – a Windows Forms test failed.

Specifying Log Messages The LoggingLoggingLoggingLogging tab of Job properties is where you specify the message to write to the results log pane if an error occurs during playback of the Visual Scripts in the Job.

To specify the log message:

1.1.1.1. Open the Job properties and click the LoggingLoggingLoggingLogging tab.

2.2.2.2. Select the Enable loggingEnable loggingEnable loggingEnable logging checkbox.

3.3.3.3. Define or edit the Log message.

4.4.4.4. Click OKOKOKOK when finished or set properties on other tabs.

The Logging tab has the following options:

Enable LoggingEnable LoggingEnable LoggingEnable Logging – when selected logging is enabled. Edit the Log Message Log Message Log Message Log Message FormatFormatFormatFormat with any custom text and log variables.

Log Message FormatLog Message FormatLog Message FormatLog Message Format – Any text entered into this edit box will appear in the log message. You can use the default message or modify the message. The following is an example message:

Page 100: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Creating and Using Jobs

80808080 Functional Testing User's Guide

Error was encountered at: %Time Current Databank:%curRecord Error Description: %errDescription You can insert the following variables to pass details from the script playback to the log message.

Variable Description

%Time Returns the time the error occurred.

%curWorkspace Returns the name of the workspace in which the script is located.

%curScript Returns the name of the current Visual Script.

%curPage Returns the index of the current page of the Visual Script.

%curRecord Returns the number of the current Data Bank record being used for playback of the Visual Script.

%errNumber Returns the number of the error that occurred during playback of the Visual Script.

%errDescription Returns a description of the error that occurred during playback of the Visual Script.

%job Returns the name of the Job Scheduler job.

Specifying E-mail Details The EEEE----mailmailmailmail tab is where you specify where to send the email and what information to include if an error occurs during playback of the Visual Script.

NoteNoteNoteNote: The mail server must be configured before notifications will be sent.

To specify e-mail details:

1.1.1.1. Open the Job properties and click the EEEE----mailmailmailmail tab.

2.2.2.2. Select the Enable EEnable EEnable EEnable E----mail Notification mail Notification mail Notification mail Notification checkbox.

Page 101: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Creating and Using Jobs

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 81818181

3.3.3.3. Specify the e-mail Notification options.

4.4.4.4. Click OKOKOKOK when finished or set properties on other tabs.

The EEEE----mailmailmailmail tab has the following options:

On Job FinishedOn Job FinishedOn Job FinishedOn Job Finished – specifies what information to send with the error notification.

♦ Send HTML SummarySend HTML SummarySend HTML SummarySend HTML Summary – specifies whether or not to include the HTML summary with the email notification.

♦ Send Text LogSend Text LogSend Text LogSend Text Log – specifies whether or not to include a text file version of the log with the e-mail notification.

AddressAddressAddressAddress – specifies the address to which to send the message. Separate multiple addresses either with a comma or semicolon.

SubjectSubjectSubjectSubject – specifies the text to appear in the subject line of the e-mail message.

EEEE----mail Setupmail Setupmail Setupmail Setup – displays the Mail Server Configuration dialog box for setting up the mail server.

Page 102: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Creating and Using Jobs

82828282 Functional Testing User's Guide

Saving Jobs

To save an Oracle Functional Testing for Web Applications Job:

1.1.1.1. Select File File File File ���� Save Job or Save Job As Save Job or Save Job As Save Job or Save Job As Save Job or Save Job As.

2.2.2.2. Specify the filename and click SaveSaveSaveSave.

If you have unsaved Visual Scripts appended to the Job as new Scripts, a Save As dialog box will appear for each unsaved Visual Script in the Job.

3.3.3.3. Enter a filename for each (in succession) unsaved Visual Script and click SaveSaveSaveSave.

Running a Job

To run a Job:

1.1.1.1. Create or open a Job.

2.2.2.2. Select OpOpOpOptionstionstionstions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

3.3.3.3. Set the Playback options: ♦ General ♦ Script ♦ Event Playback ♦ Error Recovery

4.4.4.4. Click OKOKOKOK.

5.5.5.5. Select RunRunRunRun ���� PlaybackPlaybackPlaybackPlayback ���� StartStartStartStart or click the toolbar button.

Oracle Functional Testing for Web Applications plays back the Visual Scripts in the order listed in the Job.

The Results pane shows a summary of the Visual Script test playback.

NoteNoteNoteNote: It is important that you do not close any new browser windows opened by Oracle Functional Testing for Web Applications until playback is finished.

Deleting Jobs

You can delete Jobs using the Job Manager.

Page 103: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Handling Unexpected Windows During Recording/Playback

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 83838383

To delete a job:

1.1.1.1. Select Admin Admin Admin Admin ���� Job Manager Job Manager Job Manager Job Manager.

2.2.2.2. If necessary, select the Workspace.

3.3.3.3. Select the Job to delete.

4.4.4.4. Click DeleteDeleteDeleteDelete.

5.5.5.5. Click YesYesYesYes to confirm the deletion or click NoNoNoNo to cancel.

Renaming Jobs

You can rename Jobs using the Job Manager.

1.1.1.1. Select Admin Admin Admin Admin ���� Job Manager Job Manager Job Manager Job Manager.

2.2.2.2. If necessary, select the Workspace.

3.3.3.3. Select the Job to rename.

4.4.4.4. Type the new name and press Enter.

Handling Unexpected Windows During Recording/Playback

From time-to-time Web applications will display popup message boxes or windows unexpectedly. Examples of this would include JavaScript alerts,

Page 104: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

84848484 Functional Testing User's Guide

VBScript message boxes, prompts, confirm dialog boxes, various security warnings, and other dialog boxes that are posted by the browser control.

Oracle Functional Testing for Web Applications provides the capability to automatically dismiss dialog boxes that appear during playback of a Visual Script. The automatic dismissal feature can be turned on and off using the Automatically dismiss dialogs during plaAutomatically dismiss dialogs during plaAutomatically dismiss dialogs during plaAutomatically dismiss dialogs during playbackybackybackyback check box in the General section of the Playback options (Options Options Options Options ���� New Scripts New Scripts New Scripts New Scripts or Current Script).Current Script).Current Script).Current Script).

If you encounter popup boxes or windows during recording, you must dismiss them manually. If you encounter dialog boxes that are generated from inside of VBScript functions, you can detect them using the Oracle Functional Testing for Web Applications Dialog Manager and add them to the list of unexpected windows.

If unexpected dialog boxes are encountered on play back that are not automatically dismissed, you can specify information about the dialog box using the Oracle Functional Testing for Web Applications Dialog Manager. Once you add the dialog box to the Dialog Manager, all Visual Scripts will be able to recognize and automatically dismiss the dialog box or window on subsequent play back of the Visual Script. Select AdminAdminAdminAdmin ���� Dialog ManagerDialog ManagerDialog ManagerDialog Manager in Oracle Functional Testing for Web Applications to open the settings.

The Dialog Manager contains dialog box-specific information, such as Windows class and caption, default action, etc. The Dialog Manager comes with a pre-specified number of standard dialog boxes that it recognizes. You can add information about other dialog boxes to recognize and dismiss automatically during playback. See Using Admin Options in Chapter 9 for more information about using the Dialog Manager.

Setting Recording Options

The Recording options let you specify the global and script-specific recording options for Visual Scripts. Selecting Options Options Options Options ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current Script Current Script Current Script Current Script opens the options. Set the options in the recording sections.

General Options

The General section sets recording options that apply to all Visual Scripts.

Page 105: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 85858585

Select GeneralGeneralGeneralGeneral in the Recording section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options:

The General section has the following options:

Script RecordingScript RecordingScript RecordingScript Recording – specifies the default recording options, as follows:

♦ Record all list selections by indexRecord all list selections by indexRecord all list selections by indexRecord all list selections by index – when selected, Oracle Functional Testing for Web Applications selects options in a <SELECT> list of a Web page using the zero-based index of the <OPTION> tags (for example Value[0], Value[1], etc.) and ignores the text of the option. When cleared, Oracle Functional Testing for Web Applications selects list items using the value of the option in the HTML source (for example, the text “List Value” within the HTML: <OPTION Value=”List Value”). The default is cleared.

♦ Generate transformed script for Oracle Load Testing for Web Generate transformed script for Oracle Load Testing for Web Generate transformed script for Oracle Load Testing for Web Generate transformed script for Oracle Load Testing for Web ApplicationsApplicationsApplicationsApplications – when selected, Oracle Functional Testing for Web Applications generates the navigation information and files required for playing back the Visual Script in Oracle Load Testing for Web Applications. When cleared, Oracle Functional Testing for Web Applications does not generate the navigation and files for playing back

Page 106: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

86868686 Functional Testing User's Guide

the Visual Script in Oracle Load Testing for Web Applications. The default is selected.

� Create debug file for Oracle Load Testing for Web ApplicationsCreate debug file for Oracle Load Testing for Web ApplicationsCreate debug file for Oracle Load Testing for Web ApplicationsCreate debug file for Oracle Load Testing for Web Applications – when selected, Oracle Functional Testing for Web Applications generates a log (.vlg) file of a newly recorded and saved Visual Script for debugging purposes. You can use this log file with the Virtual User Display component in Oracle Load Testing for Web Applications to perform side-by-side comparison between pages returned during the Oracle Load Testing for Web Applications session and pages recorded to an Oracle Functional Testing for Web Applications Visual Script.

♦ Regenerate load script after each playbackRegenerate load script after each playbackRegenerate load script after each playbackRegenerate load script after each playback – when selected, Oracle Functional Testing for Web Applications regenerates the navigation information and files required for playing back in Oracle Load Testing for Web Applications each time the Visual Script is played back in Oracle Functional Testing for Web Applications. When cleared, Oracle Functional Testing for Web Applications does not regenerate the navigation and files for playing back in Oracle Load Testing for Web Applications. The default is selected.

♦ Record parameter set events for form entryRecord parameter set events for form entryRecord parameter set events for form entryRecord parameter set events for form entry – when selected, Oracle Functional Testing for Web Applications records setParameter events (in addition to and after click events) for Web page form data entry actions. The setParameter events are included in the Actions sequence in the Address node properties. When cleared, Oracle Functional Testing for Web Applications does not record the setParameter events.

♦ Hide passwordsHide passwordsHide passwordsHide passwords – when selected, Oracle Functional Testing for Web Applications hides passwords using a string of asterisk (*) characters in the Visual Script, the parameters properties dialog box, the Data Bank dialog box, and the playback results report. This setting is applied to newly recorded Visual Scripts. Changing this setting on existing Visual Scripts does not affect playback and does not hide/unhide passwords. When cleared, passwords are displayed as plain text in all places. The default is cleared.

♦ Browser timeoutBrowser timeoutBrowser timeoutBrowser timeout – sets the amount of time the browser will wait for a response from the server before a timeout occurs.

Page 107: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 87878787

HTML HTML HTML HTML CaptureCaptureCaptureCapture – specifies how Oracle Functional Testing for Web Applications captures the HTML source of a Web page in the Visual Script. You can view the captured HTML source in the Visual Script by selecting an HTML node of a Visual Script page and selecting EEEEditditditdit ���� PropertiesPropertiesPropertiesProperties.

♦ Capture originalCapture originalCapture originalCapture original – when selected, Oracle Functional Testing for Web Applications captures the HTML source as sent by the server to the client browser. This is the standard setting.

♦ Capture proCapture proCapture proCapture processedcessedcessedcessed – when selected, Oracle Functional Testing for Web Applications captures the HTML source in structured form after the client browser processes the HTML.

Visual Script Options

These options specify which elements are recorded and displayed in Visual Scripts.

Select Visual ScriptVisual ScriptVisual ScriptVisual Script in the Recording section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options:

Page 108: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

88888888 Functional Testing User's Guide

The Visual Script options let you set the following:

RecordRecordRecordRecord – specifies elements (page content) to include or exclude while recording:

♦ All All All All – when selected, all script elements are included in the Visual Script recording. When cleared, none are included.

♦ HHHHTMLTMLTMLTML – when selected, the HTML is recorded to the Visual Script. When cleared, the HTML is not recorded to the Visual Script.

♦ LinksLinksLinksLinks – when selected, the page links are recorded to the Visual Script. When cleared, the page links are not recorded to the Visual Script.

♦ ImagesImagesImagesImages – when selected, the page images are recorded to the Visual Script. When cleared, the page images are not recorded to the Visual Script.

♦ ScriptsScriptsScriptsScripts – when selected, scripts (JavaScript/VBScript) are recorded to the Visual Script. When cleared, scripts (JavaScript/VBScript) are not recorded to the Visual Script.

♦ AnchorsAnchorsAnchorsAnchors – when selected, page anchor tags are recorded to the Visual Script. When cleared, page anchor tags are not recorded to the Visual Script.

♦ ElementsElementsElementsElements – when selected, Form elements are recorded to the Visual Script. When cleared, Form elements are not recorded to the Visual Script.

♦ XMLXMLXMLXML – when selected, XML is recorded to the Visual Script. When cleared, XML is not recorded to the Visual Script.

View View View View – specifies elements to display or hide in the Visual Script, after recording:

♦ All All All All – when selected, all script elements are included in the Visual Script tree view. When cleared, none are included.

♦ HTMLHTMLHTMLHTML – when selected, the HTML node is included to the Visual Script tree view. When cleared, the HTML is not displayed in the tree view.

Page 109: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 89898989

♦ LinksLinksLinksLinks – when selected, the page links collection is included in the Visual Script tree view. When cleared, the page links collection is not included in the tree view.

♦ ImagesImagesImagesImages – when selected, the page images collection is included in Visual Script tree view. When cleared, the page images collection is not included in the tree view.

♦ ScriptsScriptsScriptsScripts – when selected, scripts (JavaScript/VBScript) collection is included in Visual Script tree view. When cleared, scripts (JavaScript/VBScript) collection is not included in the tree view.

♦ AnchorsAnchorsAnchorsAnchors – when selected, page anchor tags collection is included in Visual Script tree view. When cleared, page anchor tags collection is not included in the tree view.

♦ ElementsElementsElementsElements – when selected, Form elements collection is included in Visual Script tree view. When cleared, Form elements collection is not included in the tree view.

♦ XMLXMLXMLXML – when selected, XML is included in the Visual Script tree view. When cleared, XML is not displayed in tree view.

Save, close, and reload the Visual Script in Oracle Functional Testing for Web Applications to see the changes.

Event Recording Options

The Event Recording options specify which DHTML events to record for specific page objects. For example, you can specify that Oracle Functional Testing for Web Applications Visual Scripts automatically record OnClick, OnMouseOver, or other events handlers used with Anchor (A) tags in the page HTML source. The Event Recording options let you select specific HTML tags and then associate one or more event handlers with the tags when recording Visual Scripts.

Page 110: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

90909090 Functional Testing User's Guide

Select Event RecordingEvent RecordingEvent RecordingEvent Recording in the Recording section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options:

The object recording options let you set the following:

Events to RecordEvents to RecordEvents to RecordEvents to Record – lists the HTML tags and the associated DHTML event handlers that you specify. You customize the Event to RecordEvent to RecordEvent to RecordEvent to Record list as required for your Web application. Each HTML tag can have more than one DHTML event handler associated with it. You can enable and disable event recording for specific tags and event handlers by selecting or clearing the check box next to the name.

Select and Event to AddSelect and Event to AddSelect and Event to AddSelect and Event to Add – specify HTML tag and event, as follows:

♦ Element tagElement tagElement tagElement tag – provides a list of the HTML tags. Select a tag and then select the event handler name.

♦ Event nameEvent nameEvent nameEvent name – provides a list of the DHTML event handlers for the selected HTML tag. Select an event handler and then click Add EventAdd EventAdd EventAdd Event.

♦ Add EventAdd EventAdd EventAdd Event – adds the currently selected event handler to the currently selected HTML tag. When you add event handlers to tags, the tag

Page 111: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 91919191

name and event name appear in the Events to RecordEvents to RecordEvents to RecordEvents to Record list. You can add multiple event handlers to the currently selected HTML tag. Select another event handler name and click AdAdAdAdd Eventd Eventd Eventd Event again.

Automatically record events when event handlers executeAutomatically record events when event handlers executeAutomatically record events when event handlers executeAutomatically record events when event handlers execute – when selected, Oracle Functional Testing for Web Applications automatically records events when the handler executes even if the tag and event are not defined in the Events to RecordEvents to RecordEvents to RecordEvents to Record list. When cleared, Oracle Functional Testing for Web Applications only records events defined in the Events to RecordEvents to RecordEvents to RecordEvents to Record list.

You should define Event Recording options before loading Web pages and recording Visual Scripts.

Object Identification Options

The Object Identification options let you specify how Oracle Functional Testing for Web Applications identifies page objects and the order of precedence for object attributes.

Select Object IdentificationObject IdentificationObject IdentificationObject Identification in the Recording section of OptionsOptionsOptionsOptions ���� New New New New ScriptsScriptsScriptsScripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options:

Page 112: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

92929292 Functional Testing User's Guide

The object identification options let you specify how Oracle Functional Testing for Web Applications identifies page objects and the order of precedence for object attributes.

Object IdentificationObject IdentificationObject IdentificationObject Identification – when selected, the object and attributes will be used by Oracle Functional Testing for Web Applications to identify objects in a Web page.

DeleteDeleteDeleteDelete – deletes an attribute from the Object Identification tree (window and frame name and index attributes are required and cannot be deleted).

Add an Attribute or a New ObjectAdd an Attribute or a New ObjectAdd an Attribute or a New ObjectAdd an Attribute or a New Object – specifies object tags and attribute to add to the Object Identification tree.

♦ ObjectObjectObjectObject – specifies the name Oracle Functional Testing for Web Applications uses to identify an object. Select an object and then specify one or more attributes that Oracle Functional Testing for Web Applications should use to identify the object during recording.

♦ Object tagObject tagObject tagObject tag – shows the HTML tag name for the object to add to or modify in the Object Identification tree.

♦ AttributeAttributeAttributeAttribute – specifies the attribute to add to the specified object tag. Select an attribute and click the AddAddAddAdd button to add the attribute to the tree (the AddAddAddAdd button only activates if the specified object and attribute does not yet appear in the Object Identification tree). Use the up and down arrow buttons to set the order of precedence for each element tag.

[Arrow buttons] – sets the precedence order for the attributes under each object tag in the Object Identification tree. Select an attribute and click a button to move the attribute up or down in the Object Identification tree.

ResetResetResetReset – resets the Object Identification tree to the last saved version.

DefaultsDefaultsDefaultsDefaults – resets the Object Identification tree to the default values.

Proxy Options

The Proxy options lets you specify how Oracle Functional Testing for Web Applications uses a proxy server when recording Visual Scripts. You can use the proxy to record requests that are not normally handled by Internet Explorer (i.e. an XMLHTTP ActiveX control on a Web site).

Page 113: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 93939393

You can also use the proxy settings to have Oracle Functional Testing for Web Applications record navigations occurring in an external application.

Select ProxyProxyProxyProxy in the Recording section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current Current Current Current ScriptScriptScriptScript to open the options:

The proxy options let you set the following:

Proxy CommandProxy CommandProxy CommandProxy Command – specifies the path, program, and optional arguments for the proxy server. The default command is as follows: C:\OracleATS\OFT\proxy.exe -exclude ;application/*;image/*;video/*;audio/*;text/css; You can edit the command as needed.

Build CommandBuild CommandBuild CommandBuild Command – opens a dialog box for modifying the program arguments, SSL version, Digital certificate, and chain proxy.

Listen on PortListen on PortListen on PortListen on Port – specifies the port number to use for the proxy server. Normally the proxy listens on port 7777 for all HTTP traffic.

Proxy OptionsProxy OptionsProxy OptionsProxy Options – specifies the following proxy options:

Page 114: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

94949494 Functional Testing User's Guide

♦ Record navigations in external applicationsRecord navigations in external applicationsRecord navigations in external applicationsRecord navigations in external applications – when selected, Oracle Functional Testing for Web Applications records navigations occurring in an external application (i.e. the Internet Explorer browser) as part of the Visual Script. When using the Firefox browser to record a proxy script, make sure the browser is closed before starting the proxy recording. The Firefox browser must be closed for the proxy settings to be set automatically in Firefox.

♦ Create separate navigations for redirected requestsCreate separate navigations for redirected requestsCreate separate navigations for redirected requestsCreate separate navigations for redirected requests – when selected, Oracle Functional Testing for Web Applications records a separate navigation for pages that include redirection requests.

♦ Record navigations that return a "404 (Page Not Found)" resultRecord navigations that return a "404 (Page Not Found)" resultRecord navigations that return a "404 (Page Not Found)" resultRecord navigations that return a "404 (Page Not Found)" result – when selected, Oracle Functional Testing for Web Applications records pages containing “404 Page Not Found” error code.

♦ Treat nonTreat nonTreat nonTreat non----browser navbrowser navbrowser navbrowser navigations as regular navigationsigations as regular navigationsigations as regular navigationsigations as regular navigations – when selected, Oracle Functional Testing for Web Applications treats all Non-Browser navigation (such as Proxy, Applet, etc.) as regular navigation. Selecting this option causes Oracle Functional Testing for Web Applications to group together proxy navigations into framesets and groups them onto the correct page.

StatusStatusStatusStatus – the status line shows the status of the proxy (running or not).

StartStartStartStart – starts the proxy server.

StopStopStopStop – stops the proxy server.

Build Proxy Command Options Selecting the Build Command Build Command Build Command Build Command button in the Proxy options opens a dialog box for building the proxy command. The Build Proxy Command dialog box lets you specify Oracle Functional Testing for Web Applications proxy command options.

Page 115: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 95959595

Proxy CommandProxy CommandProxy CommandProxy Command – specifies the path, program, and optional arguments for the proxy server. The default command is as follows: C:\OracleATS\OFT\proxy.exe -exclude ;application/*;image/*;video/*;audio/*;text/css; You can edit the command as needed. The options in the FiltersFiltersFiltersFilters section provide a convenient way to modify the program arguments.

FiltersFiltersFiltersFilters – specifies the filters to include in the proxy command in arguments.

♦ New New New New –––– enters a new content type filter to add to the filter list. Enter the filter

♦ DeleteDeleteDeleteDelete – removes the selected content type from the Filter Out…Filter Out…Filter Out…Filter Out… list and the proxy command.

♦ Rename Rename Rename Rename –––– renames the selected filter text.

♦ [Filters list] – lists the content types to filter. The following content types are filtered by default:

� application/*application/*application/*application/* – when added, the application/* parameter is included in the Proxy Command string.

� image/*image/*image/*image/* – when added, the image/* parameter is included in the Proxy Command string.

Page 116: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Recording Options

96969696 Functional Testing User's Guide

� video/*video/*video/*video/* – when added, the video/* parameter is included in the Proxy Command string.

� audio/*audio/*audio/*audio/* – when added, the audio/* parameter is included in the Proxy Command string.

♦ text/css text/css text/css text/css –––– when added, the text/css is included in the Proxy Command string.

SSL VersionSSL VersionSSL VersionSSL Version – specifies which SSL version to record. When Using a Using a Using a Using a particular SSL version if neededparticular SSL version if neededparticular SSL version if neededparticular SSL version if needed is selected, the -sslversion argument (with the specified type) is added to the Proxy command. The DefaultDefaultDefaultDefault setting clears the Using a particular SSL version if neededUsing a particular SSL version if neededUsing a particular SSL version if neededUsing a particular SSL version if needed checkbox and attempts to automatically determine which SSL authentication scheme to use.

ClientClientClientClient----side Digital Certificate File (.PEM format)side Digital Certificate File (.PEM format)side Digital Certificate File (.PEM format)side Digital Certificate File (.PEM format) – specifies the file name and location of a Client-side digital certificate file. Use the Browse button to locate the file.

Chain ProxyChain ProxyChain ProxyChain Proxy – specifies if the Oracle Functional Testing for Web Applications proxy is chained to the Internet Explorer proxy, as follows:

♦ Chain Oracle Functional Testing for Web Applications Proxy to Another Chain Oracle Functional Testing for Web Applications Proxy to Another Chain Oracle Functional Testing for Web Applications Proxy to Another Chain Oracle Functional Testing for Web Applications Proxy to Another ProxyProxyProxyProxy – when selected, Oracle Functional Testing for Web Applications synchronizes the Oracle Functional Testing for Web Applications proxy and the current Internet Explorer proxy. You can use this option if you currently need to use a proxy with IE to open Web pages and you want to chain your current IE proxy with the Oracle Functional Testing for Web Applications proxy. Specify the address and port.

♦ AddressAddressAddressAddress – specifies the proxy server address.

♦ PortPortPortPort – specifies the port to use for the proxy server.

Page 117: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Playback Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 97979797

Setting Playback Options

The Playback Options dialog box lets you specify the global and script-specific playback options for Visual Scripts. Selecting Options Options Options Options ���� New New New New ScriptsScriptsScriptsScripts or Current Script Current Script Current Script Current Script opens the options. Set the options in the playback sections.

General Options

The General section sets playback options that apply to all Visual Scripts.

The General section has the following options:

Timeout OptionsTimeout OptionsTimeout OptionsTimeout Options – specifies the timeout values for Visual Script playback as follows:

♦ Timeout on page afterTimeout on page afterTimeout on page afterTimeout on page after – sets the maximum amount of time Oracle Functional Testing for Web Applications will wait for a Web page or application to respond.

Page 118: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Playback Options

98989898 Functional Testing User's Guide

♦ Number of retries on a timeoutNumber of retries on a timeoutNumber of retries on a timeoutNumber of retries on a timeout – sets the maximum number of times Oracle Functional Testing for Web Applications will retry a Web page or application after a timeout.

Automatic ActionsAutomatic ActionsAutomatic ActionsAutomatic Actions – specifies the actions that will automatically occur on Visual Script playback as follows:

♦ Automatically dismiss dialogs during playbackAutomatically dismiss dialogs during playbackAutomatically dismiss dialogs during playbackAutomatically dismiss dialogs during playback – when selected, Oracle Functional Testing for Web Applications will automatically dismiss dialog boxes that appear during playback of the Visual Script. Dialog boxes are evaluated and cleared based upon the settings listed in Admin Admin Admin Admin ���� Dialog Manager Dialog Manager Dialog Manager Dialog Manager.

♦ Automatically run resource validation after playbackAutomatically run resource validation after playbackAutomatically run resource validation after playbackAutomatically run resource validation after playback – when selected, Oracle Functional Testing for Web Applications performs the Resource Validation tests after playback of the Visual Script.

♦ Always invoke script debugger on scripting errorsAlways invoke script debugger on scripting errorsAlways invoke script debugger on scripting errorsAlways invoke script debugger on scripting errors – when selected, Oracle Functional Testing for Web Applications opens a debugger window upon detecting an error in a Test Scriptlet.

Page 119: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Playback Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 99999999

Script Options

The Script section is where you set playback options that apply to the Visual Script level.

The Script section has the following options:

Data Banks Data Banks Data Banks Data Banks – play back a Visual Script with or without a Data Bank:

♦ Playback with Data BankPlayback with Data BankPlayback with Data BankPlayback with Data Bank – when selected, Oracle Functional Testing for Web Applications plays back the Visual Script using the data values from the specified Data Bank. When cleared, Oracle Functional Testing for Web Applications plays back the Visual Script using the parameters recorded in the script.

� Use all recordsUse all recordsUse all recordsUse all records – when selected, Oracle Functional Testing for Web Applications plays back the Visual Script for each record in the Data Bank file.

Page 120: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Playback Options

100100100100 Functional Testing User's Guide

� Use current record onlyUse current record onlyUse current record onlyUse current record only – when selected, Oracle Functional Testing for Web Applications plays back the Visual Script using only the current record in the Data Bank file.

♦ Retain Data Bank variables across visual scriptsRetain Data Bank variables across visual scriptsRetain Data Bank variables across visual scriptsRetain Data Bank variables across visual scripts – when selected, Oracle Functional Testing for Web Applications saves Data Bank variables for use across multiple Visual Scripts. If you specify Data Bank variables and bind the variables to fields in a Data Dank file for a specific Visual Script, selecting this option saves those Data Bank variables and field bindings for use with a new Visual Script. You only need to map the saved Data Bank variables to the specific Parameters in the new Visual Script. When cleared, all Data Bank variables, mappings, and field bindings are cleared when you close a Visual Script or create a new Visual Script.

AuAuAuAutomatic Actionstomatic Actionstomatic Actionstomatic Actions – specifies the actions that will automatically occur on Visual Script playback as follows:

♦ Reset browser to original state before playbackReset browser to original state before playbackReset browser to original state before playbackReset browser to original state before playback – when selected, Oracle Functional Testing for Web Applications clears any left-over settings from a previous recording and playback and resets Oracle Functional Testing for Web Applications to a clean start-up state each time a Visual Script is played back. The default browser window name is reset to none, session cookies are cleared, user authentication is cleared, and any external browser windows that may have been opened are closed.

♦ Start new browser session before playbackStart new browser session before playbackStart new browser session before playbackStart new browser session before playback – when selected, Oracle Functional Testing for Web Applications starts a new browser session before starting playback of the Visual Script.

♦ Use distinct cookie Use distinct cookie Use distinct cookie Use distinct cookie directorydirectorydirectorydirectory – when selected, cookies are stored in a separate directory under the installation directory (C:\OracleATS\OFT is the default).

� Delete persistent cookies before playbackDelete persistent cookies before playbackDelete persistent cookies before playbackDelete persistent cookies before playback – when selected, Oracle Functional Testing for Web Applications deletes cookies set by Web applications before playing back the Visual Script.

♦ Skip auto pages in Thin LoadSkip auto pages in Thin LoadSkip auto pages in Thin LoadSkip auto pages in Thin Load – when selected, Visual Script playback in Oracle Load Testing for Web Applications Thin Client mode will skip auto pages that were recorded as part of the Visual Script.

Page 121: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Playback Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 101101101101

♦ Play with think time delay between pagesPlay with think time delay between pagesPlay with think time delay between pagesPlay with think time delay between pages – when selected, Oracle Functional Testing for Web Applications includes any delay or “think time” time (i.e. the time a user took to read a page, locate a link, and then click the link) between pages that occurred when the Visual Script was recorded.

♦ Maximum delay (seconds)Maximum delay (seconds)Maximum delay (seconds)Maximum delay (seconds) – sets the maximum amount of time Oracle Functional Testing for Web Applications will wait between playback of pages in the Visual Script. This option is only available when Play with Play with Play with Play with think time delay between pagesthink time delay between pagesthink time delay between pagesthink time delay between pages is selected. This is useful to reduce long “think time” delays that occurred when the Visual Script was recorded to a specific maximum amount of time during playback.

♦ Do not report new or missing objectsDo not report new or missing objectsDo not report new or missing objectsDo not report new or missing objects – when selected, new objects found in the “tested” version of a web page are not reported as failures after play back of a Visual Script.

Event Playback Options

The Event Playback section specifies delay and failure settings for playback of Dynamic HTML (DHTML) and Java Applet events recorded by Oracle Functional Testing for Web Applications.

The Event Playback section has the following options:

Page 122: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Playback Options

102102102102 Functional Testing User's Guide

Event Playback DelayEvent Playback DelayEvent Playback DelayEvent Playback Delay – sets the type of delay to use for playback of DHTML and Java events.

♦ Use constant delayUse constant delayUse constant delayUse constant delay – when selected, Oracle Functional Testing for Web Applications uses a constant delay time between playback of DHTML and Java events.

� Delay (sec)Delay (sec)Delay (sec)Delay (sec) – sets the amount of time to use as the constant delay. This setting should not be set to 0 to avoid unpredictable playback behavior.

♦ Use recorded delayUse recorded delayUse recorded delayUse recorded delay – when selected, Oracle Functional Testing for Web Applications uses the recorded delay time between playback of DHTML and Java events.

� MinimumMinimumMinimumMinimum – sets the minimum playback delay time in seconds.

� MaximumMaximumMaximumMaximum – sets the maximum playback delay time in seconds.

Playback in highlight modePlayback in highlight modePlayback in highlight modePlayback in highlight mode – when selected, Oracle Functional Testing for Web Applications highlights the playback actions on the page as they occur. When cleared, Oracle Functional Testing for Web Applications does not highlight the playback actions.

Page 123: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Playback Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 103103103103

Event Event Event Event FailureFailureFailureFailure – sets the retry and timeout options in case of a DHTML or Java event playback failure.

♦ Retry event if failedRetry event if failedRetry event if failedRetry event if failed – when selected, Oracle Functional Testing for Web Applications retries the DHTML or Java event until successful or the timeout limit is reached. A DHTML event is successful if the DHTML object is found by Oracle Functional Testing for Web Applications during playback. A Java Applet event is successful if the Java object is found and the object is in the correct state for Oracle Functional Testing for Web Applications to play back the event.

� Timeout (sec)Timeout (sec)Timeout (sec)Timeout (sec) – sets the maximum amount of time to retry failed events before timing out. This setting also sets the playback timeout for transitions between Java nodes of the Visual Script tree.

Page 124: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Playback Options

104104104104 Functional Testing User's Guide

Error Recovery Options

The error recovery options determine how Oracle Functional Testing for Web Applications handles errors that occur during playback of Visual Scripts.

The Error Recovery section has the following options:

TestTestTestTest – the test categories for error recovery:

♦ Default PageDefault PageDefault PageDefault Page – recovery options for pages that failed any of the Oracle Functional Testing for Web Applications default page tests.

♦ Server ResponseServer ResponseServer ResponseServer Response – recovery options for Server Response test case failures.

♦ Text MatchingText MatchingText MatchingText Matching – recovery options for Text Matching test case failures.

♦ Table Table Table Table – recovery options for Table test case failures.

♦ Custom Object Custom Object Custom Object Custom Object – recovery options for Custom Object test case failures.

Page 125: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Playback Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 105105105105

♦ Custom Variable Custom Variable Custom Variable Custom Variable – recovery options for Custom Variable test case failures.

♦ Form ElementForm ElementForm ElementForm Element – recovery options for Form Element test case failures.

♦ WinForms WinForms WinForms WinForms - recovery options for WinForms test failures.

♦ Resource ValidationResource ValidationResource ValidationResource Validation – recovery options for Resource Validation test failures.

♦ Page TimeoutPage TimeoutPage TimeoutPage Timeout – recovery options for a page timeout.

♦ New ContentNew ContentNew ContentNew Content – recovery options for pages that have new content.

♦ Missing ContentMissing ContentMissing ContentMissing Content – recovery options for pages that are missing content.

♦ Browser ErrorsBrowser ErrorsBrowser ErrorsBrowser Errors – recovery options for errors that occur in the Browser.

♦ Severe Content ErrorsSevere Content ErrorsSevere Content ErrorsSevere Content Errors – recovery options for pages that have had a large amount of content changes.

♦ Navigation FailedNavigation FailedNavigation FailedNavigation Failed – recovery options for Web navigation failures.

Error TypeError TypeError TypeError Type – the current setting for each type of test: Fatal or Non-Fatal.

Skip Remaining PagesSkip Remaining PagesSkip Remaining PagesSkip Remaining Pages – the current setting for each type of test:

♦ SkipSkipSkipSkip – playback skips the remaining pages in the Visual Script if an error occurs. If the Visual Script is playing back with iterations, playback continues at the beginning of the Visual Script with the next iteration.

♦ PlayPlayPlayPlay – playback continues with the next page in the Visual Script if an error occurs.

Skip Remaining IterationsSkip Remaining IterationsSkip Remaining IterationsSkip Remaining Iterations – the current setting for each type of test:

♦ SkipSkipSkipSkip – playback halts after the current iteration is finished if an error occurs.

♦ PlayPlayPlayPlay – playback continues the current and subsequent iterations if an error occurs.

Click the left mouse button in the Error TypeError TypeError TypeError Type, Remaining PagesRemaining PagesRemaining PagesRemaining Pages, or Remaining IterationsRemaining IterationsRemaining IterationsRemaining Iterations column of the test to change the settings.

Page 126: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

106106106106 Functional Testing User's Guide

Changing Error Recovery Settings To change the error recovery settings for a specific type of test:

1.1.1.1. Select OptionOptionOptionOption ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script

2.2.2.2. Select the Error RecoveryError RecoveryError RecoveryError Recovery section of the Playback options.

3.3.3.3. Click the left mouse button in the Error TypeError TypeError TypeError Type, Remaining PagesRemaining PagesRemaining PagesRemaining Pages, or Remaining IterationsRemaining IterationsRemaining IterationsRemaining Iterations column of a test to change the settings.

4.4.4.4. Set the Error Type: Fatal or Non-Fatal.

4.4.4.4. Set Remaining Pages: Skip or Play.

5.5.5.5. Set Remaining Iterations: Skip or Play.

6.6.6.6. Click OKOKOKOK.

You can change the settings for each type of test.

Setting Advanced Options

The Advanced options let you enable recording for specific Web application development tools or technologies that Oracle Functional Testing for Web Applications supports. Certain Advanced support options may require separate Oracle Functional Testing for Web Applications licenses to enable the options. Contact Customer Support or your account representative for information about separate licenses.

Siebel Support Options

The Siebel Support options let you specify which pre-defined settings to use for Siebel applications. Oracle Functional Testing for Web Applications requires a specific Siebel license to record Siebel-based applications.

Page 127: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 107107107107

Select Siebel Support Siebel Support Siebel Support Siebel Support in the Advanced section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScrCurrent ScrCurrent ScrCurrent Scriptiptiptipt to open the options:

The Siebel Support section has the following options:

Enable Siebel SupportEnable Siebel SupportEnable Siebel SupportEnable Siebel Support – when selected, Siebel support is enabled.

Advanced OpAdvanced OpAdvanced OpAdvanced Optionstionstionstions

♦ Automatically generate Thin Client scripts for Oracle Load Testing for Automatically generate Thin Client scripts for Oracle Load Testing for Automatically generate Thin Client scripts for Oracle Load Testing for Automatically generate Thin Client scripts for Oracle Load Testing for Web Applications during recordWeb Applications during recordWeb Applications during recordWeb Applications during record – when selected, an Oracle Load Testing for Web Applications Thin Client script is automatically generated during recording.

♦ Generate additional checkpoints against Siebel Protocol for Thin Client Generate additional checkpoints against Siebel Protocol for Thin Client Generate additional checkpoints against Siebel Protocol for Thin Client Generate additional checkpoints against Siebel Protocol for Thin Client scriptsscriptsscriptsscripts – when selected, additional checkpoints are added to the Thin Client scripts.

♦ EnablEnablEnablEnable Siebel CAS recordere Siebel CAS recordere Siebel CAS recordere Siebel CAS recorder – when selected, the Oracle Functional Testing for Web Applications Siebel script recorder is enabled. The CAS recorder is used for recording scripts used for load testing. Siebel load testing scripts are recording in an external browser window using the Oracle Functional Testing for Web Applications proxy recorder.

Page 128: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

108108108108 Functional Testing User's Guide

When this setting is enabled, Oracle Functional Testing for Web Applications automatically starts the Oracle Functional Testing for Web Applications proxy recorder and opens an external browser window when you click the Record button on the Oracle Functional Testing for Web Applications toolbar. Once the external browser opens, you can load your Siebel application and start recording page navigation.

♦ Use Siebel Correlation LibraryUse Siebel Correlation LibraryUse Siebel Correlation LibraryUse Siebel Correlation Library - when selected, Oracle Functional Testing for Web Applications uses the Siebel Correlation Library (Siebel version 7.7 applications or higher) to access test hooks within the Siebel application. The Siebel Correlation library file (ssdtcorr.dll) must be installed in the Oracle Application Testing Suite installation directory (C:\OracleATS\OFT) before the Use Siebel Use Siebel Use Siebel Use Siebel Correlation LibraryCorrelation LibraryCorrelation LibraryCorrelation Library option can be enabled. The Siebel Correlation library file is part of the Siebel application server and is located in siebsrvr\bin\.

♦ Siebel methods to be databankedSiebel methods to be databankedSiebel methods to be databankedSiebel methods to be databanked – specifies which Siebel methods should be automatically data banked by Oracle Functional Testing for Web Applications.

♦ Reset Siebel StateReset Siebel StateReset Siebel StateReset Siebel State – resets the Siebel state.

♦ Apply to Current Script Apply to Current Script Apply to Current Script Apply to Current Script –––– applies Siebel support to the currently loaded Visual Script.

♦ Regenerate Thin Client Script Regenerate Thin Client Script Regenerate Thin Client Script Regenerate Thin Client Script –––– regenerates the Oracle Load Testing for Web Applications Thin Client script for Siebel support.

Web Services Options

The Web Services options let you specify advanced options for Web Services.

Select Web Services Web Services Web Services Web Services in the Advanced section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options:

Page 129: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 109109109109

The Web Services section has the following options:

Web ServicesWeb ServicesWeb ServicesWeb Services –––– specifies the Web Services options.

♦ WSDL ParserWSDL ParserWSDL ParserWSDL Parser –––– specifies which Web Services Definition parser to use. Select the parser program from the list.

NoteNoteNoteNote: The .NET Parser and the Apache Axis Parser require the installation of additional files to be valid. If you select one of these parsers and receive a “Selected WSDL parser is invalid” message, the additional files are not installed. The .NET Parser requires the “Microsoft .NET Framework SDK 2.0” available from http://www.microsoft.com to be installed.

The Apache Axis Parser requires the “Axis 1.4 Final” binary ZIP file (axis-bin-1_4.zip) and “Axis2 Standard Binary Distribution” ZIP file (axis2-1.3-bin.zip) installed. You can download the “Axis 1.4 Final” binary ZIP file from http://ws.apache.org/axis/. You can download the “Axis2 1.3 Standard Binary Distribution” from http://ws.apache.org/axis2/download/1_3/download.cgi. Copy the ZIP files into the OFT subdirectory under the installation directory.

Page 130: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

110110110110 Functional Testing User's Guide

After copying the files to the OFT directory, run the enable-axis.bat batch file.

♦ Custom ParserCustom ParserCustom ParserCustom Parser –––– specifies the location and name of a custom WSDL parser. Select Custom Parser from the WSDL ParserWSDL ParserWSDL ParserWSDL Parser list and type the location and name of the custom parser.

♦ Roll over to another parser… Roll over to another parser… Roll over to another parser… Roll over to another parser… –––– when selected, the Web Services recorder automatically uses another WSDL parser if the selected parser fails.

♦ Enable DIME/MTOM/SwA support… Enable DIME/MTOM/SwA support… Enable DIME/MTOM/SwA support… Enable DIME/MTOM/SwA support… –––– when selected, Direct Internet Message Encapsulation (DIME), SOAP Message Transmission Optimization Mechanism (MTOM), and Security SOAP Messages with Attachments (SwA) support is enabled. DIME/MTOM/SwA support requires the Microsoft Web Service Enhancements (WSE) version 2.0 and 3.0 to be installed. Both versions of the WSE must be installed to support all messaging versions.

WinForms Plug-ins Options

The .NET WinForms options let you enable or disable support for WinForms and configure the WinForms events. Oracle Functional Testing for Web Applications requires a specific license to enable WinForm support.

Select WinForms PlugWinForms PlugWinForms PlugWinForms Plug----ins ins ins ins in the Advanced section of OptionsOptionsOptionsOptions ���� New New New New ScriptsScriptsScriptsScripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options:

Page 131: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 111111111111

The WinForms Plug-ins section has the following options:

WinForms Support WinForms Support WinForms Support WinForms Support –––– enable or disable WinForms support.

♦ Enable WinForms plugEnable WinForms plugEnable WinForms plugEnable WinForms plug----in support in support in support in support –––– when selected, WinForms support is enabled. When cleared, WinForms support is disabled.

♦ Configure Events Configure Events Configure Events Configure Events –––– opens a dialog for specifying which WinForms events to record.

Page 132: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

112112112112 Functional Testing User's Guide

Windows Forms Event Configuration The Event Configuration dialog box lets you specify which WinForms events to record and the properties for those events.

Clicking Configure Events in the WinForms Plug-ins options opens the dialog box:

The configuration options are as follows:

Supported Controls and EventsSupported Controls and EventsSupported Controls and EventsSupported Controls and Events – lists which WinForm controls are supported and which events to record. Expand the control in the tree and select or clear the specific event check box in the tree to enable or disable event collection.

♦ Browse TypeBrowse TypeBrowse TypeBrowse Type – opens a window that shows the events, methods, and properties associated with the selected control.

Page 133: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 113113113113

Properties (name) Properties (name) Properties (name) Properties (name) – shows the properties for the event selected in the Supported Controls and Events Supported Controls and Events Supported Controls and Events Supported Controls and Events pane. The properties include expressions generated for Record and Playback of an event. Oracle Functional Testing for Web Applications generates default expressions that are designed to play back events on the .NET shipped controls as well as certain known third-party controls. However, the default expressions may or may not work properly for custom third party controls. You can edit the default expressions for any event type and the expressions associated with a single event instance.

♦ Record Expressions Record Expressions Record Expressions Record Expressions –––– the data expression used for recording.

� Record Data Record Data Record Data Record Data –––– the expression that gets the value of the Data object when recording the event. When the event is recorded, this expression is fully evaluated and the return value is stored in the Data property.

♦ Playback Expressions Playback Expressions Playback Expressions Playback Expressions –––– the data expressions used for playback.

� Playback Playback Playback Playback –––– This expression is the list of set-properties or method calls that playback the event. The default mechanism is to set the property that changed (such as Text for a TextChanged event) or to call the protected event handler method (such as OnClick for the Click event). Any property or method exposed by the object in question may be called however, even non-public ones.

� Initialize Data Object Initialize Data Object Initialize Data Object Initialize Data Object –––– the expression is used for creating the Data object when the event is played back, in the event that the Data object is a complex object. This expression is typically a call to the Data.Create() method, which may or may not have additional parameters depending on the object type. Other expressions may be included to fill in the properties of the Data object for initialization. These expressions are collapsed at Record time to contain the Recorded data values, so that the expression can be fully evaluated at playback time. The default expression generated by Oracle Functional Testing for Web Applications usually does not need to be edited.

� Initialize EventData ObjectInitialize EventData ObjectInitialize EventData ObjectInitialize EventData Object – the expression used for creating the EventData object when the event is played back. EventData is always a complex object that derives from the .NET

Page 134: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

114114114114 Functional Testing User's Guide

System.EventArgs object. This expression is almost always a call to EventData.Create(), which may or may not have additional expressions to set the properties of the object. The default expression generated by Oracle Functional Testing for Web Applications usually does not need to be edited.

See the WinForms Configuration Expression Syntax topic in the online help for additional information about customizing the Record and Playback expression properties.

DefaultsDefaultsDefaultsDefaults – resets the event rules to the system defaults. A confirmation message appears to cancel or confirm resetting the event rules.

ImportImportImportImport – opens a dialog box for importing an XML file containing additional WinForm rules.

Java Applet Options

These options specify the Java Applet support for Microsoft Java Applets and Sun Plugin Applet.

Select Java AppletsJava AppletsJava AppletsJava Applets in the Advanced section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options:

Page 135: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 115115115115

MicMicMicMicrosoft Java Applet Supportrosoft Java Applet Supportrosoft Java Applet Supportrosoft Java Applet Support – this option specifies if Microsoft Java Applet support is enabled or disabled.

♦ Enable Microsoft Applet Support for (version)Enable Microsoft Applet Support for (version)Enable Microsoft Applet Support for (version)Enable Microsoft Applet Support for (version) – when selected, the Microsoft Java Applet support for the indicated version number is enabled.

Sun Plugin Applet SupportSun Plugin Applet SupportSun Plugin Applet SupportSun Plugin Applet Support – this option specifies if Sun JRE Applet support is enabled or disabled.

Enable Sun JREnable Sun JREnable Sun JREnable Sun JRE Applet Support for (version)E Applet Support for (version)E Applet Support for (version)E Applet Support for (version) – when selected the Sun Plugin Java Applet support for the indicated version is enabled.

Java Agent Options

This option specifies the settings for Oracle Functional Testing for Web Applications Java Agent scripts for use with the Oracle Load Testing for Web Applications application for load testing.

Select Java Agent Java Agent Java Agent Java Agent in the Advanced section of OptiOptiOptiOptionsonsonsons ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options:

Page 136: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

116116116116 Functional Testing User's Guide

This dialog box lets you specify options for the Java Agent.

Java AgentJava AgentJava AgentJava Agent - specifies the Java Agent options.

♦ Create a Java AgenCreate a Java AgenCreate a Java AgenCreate a Java Agent script after saving a scriptt script after saving a scriptt script after saving a scriptt script after saving a script – when selected, Oracle Functional Testing for Web Applications creates a Java Agent script after a Visual Scripts is saved.

♦ Compile Java agent scriptCompile Java agent scriptCompile Java agent scriptCompile Java agent script – when selected, the Java Agent script is automatically compiled.

♦ Create ECreate ECreate ECreate Eclipse compatible project and class path filesclipse compatible project and class path filesclipse compatible project and class path filesclipse compatible project and class path files – when selected, Oracle Functional Testing for Web Applications automatically creates the Eclipse compatible files.

Program LocationsProgram LocationsProgram LocationsProgram Locations - specifies the location of the Java files.

♦ Location of Java compiler (javaLocation of Java compiler (javaLocation of Java compiler (javaLocation of Java compiler (javac)c)c)c) – specifies the location of the compiler executable. The default is: C:\OracleATS\OFT\..\EmpAppServer\jre\bin\javac.exe

♦ Location of the Java archive tool (jar) Location of the Java archive tool (jar) Location of the Java archive tool (jar) Location of the Java archive tool (jar) – specifies the location of the compiler executable. The default is: C:\OracleATS\OFT\..\ EmpAppServer\jre\bin\jar.exe

Page 137: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Advanced Options

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 117117117117

♦ Location of the Java runtime (jar) Location of the Java runtime (jar) Location of the Java runtime (jar) Location of the Java runtime (jar) – specifies the location of the runtime executable. The default is: C:\OracleATS\OFT\..\ EmpAppServer\jre\bin\java.exe

Custom Scripts Options

This dialog box lets you specify additional custom JavaScripts for a Visual Script. The browser treats the Custom JavaScript .js files as part of the document being displayed in the browser control and the scripts will be executed when the document or navigation completes.

Select Custom ScriptsCustom ScriptsCustom ScriptsCustom Scripts in the Advanced section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options.

The Custom Scripts Options dialog box has the following options:

Custom JavaScriptsCustom JavaScriptsCustom JavaScriptsCustom JavaScripts – lists the custom JavaScripts to enable.

♦ NewNewNewNew – opens a dialog box for adding a new Custom JavaScript to the list. The list points to .js files stored on the drive. The default location is C:\OracleATS\OFT\Custom Scripts.

♦ DeleteDeleteDeleteDelete – removes the selected custom script from the list.

Page 138: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

118118118118 Functional Testing User's Guide

♦ EditEditEditEdit – opens the selected custom script in an editor.

Use the up and down arrow buttons to arrange the order of the custom scripts in the list.

To set Custom Scripts options:

1.1.1.1. Create your custom java scripts and save the scripts to a .js file. The default location used by Oracle Functional Testing for Web Applications is C:\OracleATS\OFT\Custom Scripts.

2.2.2.2. Start Oracle Functional Testing for Web Applications.

3.3.3.3. Select OptionOptionOptionOptions s s s ���� New Scripts New Scripts New Scripts New Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

4.4.4.4. Select Custom ScriptsCustom ScriptsCustom ScriptsCustom Scripts in the Advanced options.

5.5.5.5. Click NewNewNewNew and select the custom Java scripts to add as required for your testing.

6.6.6.6. Repeat step 5 as needed for additional custom Java scripts.

7.7.7.7. Use the up and down arrow buttons to arrange the order of the custom scripts in the list.

8.8.8.8. Click OKOKOKOK.

Defining Exclusions to Playback Comparisons

Web applications that use dynamic content may require special considerations when using the record/playback paradigm for testing. Session IDs and other machine-generated HTML source that changes each time a page is accessed will be different in the recorded master version of the page from the version of the page compared on playback.

Oracle Functional Testing for Web Applications uses a heuristic program to determine and exclude machine-generated components of Web page source that can change dynamically (i.e. session IDs) when visiting a site. The machine-generated components will not be tested and will not cause red flags to be generated in the Visual Script during playback. The HTML source excluded from the playback comparison will be shown in purple text when you double-click on any Different HTML node in the Visual Script.

Page 139: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 119119119119

In some cases, you may want to specify which types of content to include in the playback comparison and which types to exclude. You can override specific components of the heuristic comparison between master pages and tested pages on Visual Script playback. You can also specify those parts of Web page source that change from one session to another and exclude them from the Visual Script playback comparison. The specified exclusions will not be tested and will not cause red flags to be generated during playback. This is useful for masking specific parts of URLs, HTML elements and attributes, and scripts.

In cases where HTML source appears to the heuristic program to be machine-generated, but is necessary for page navigation or other testing, Oracle Functional Testing for Web Applications must override the heuristic program for accurate playback comparison. (This may happen if complex alphanumeric naming conventions are used for paths and files in an application.) Oracle Functional Testing for Web Applications lets you override specific content comparison filters that determines machine-generated components of Web page source.

Select ContentContentContentContent in the Comparison Exclusions section (under Functional Tests) of OptionsOptionsOptionsOptions ���� New Scripts New Scripts New Scripts New Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options.

The Comparison Exclusions options have the following sections: ContentContentContentContent, URL ParametersURL ParametersURL ParametersURL Parameters, URL Parameters ValuesURL Parameters ValuesURL Parameters ValuesURL Parameters Values, and URL SubpathsURL SubpathsURL SubpathsURL Subpaths.

Use the NewNewNewNew, EditEditEditEdit, and Delete Delete Delete Delete buttons to customize filter values in specific sections.

Content Options

The ContentContentContentContent section has the following options:

Page 140: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

120120120120 Functional Testing User's Guide

Automatic Contents Comparison Filters Automatic Contents Comparison Filters Automatic Contents Comparison Filters Automatic Contents Comparison Filters – specifies if specific types of machine-generated Web page components should be included or excluded from the playback comparison. These settings are used in cases where HTML source appears to be machine-generated, but is necessary for page navigation or other testing, Oracle Functional Testing for Web Applications must override the defaults heuristic comparison program for accurate playback comparison.

♦ URLsURLsURLsURLs – when selected, parts of URLs that appear to be machine-generated are ignored during the playback comparison.

♦ ElementsElementsElementsElements – when selected, parts of form elements that appear to be machine-generated are ignored during the playback comparison.

♦ ScriptsScriptsScriptsScripts – when selected, parts of script literals that appear to be machine-generated are ignored during the playback comparison.

♦ HTMLsHTMLsHTMLsHTMLs – when selected, parts of HTML that appears to be machine-generated is ignored during the playback comparison.

The Automatic Contents Comparison FiltersAutomatic Contents Comparison FiltersAutomatic Contents Comparison FiltersAutomatic Contents Comparison Filters settings apply globally to the Web page component types. Use the Content Comparison Filters Content Comparison Filters Content Comparison Filters Content Comparison Filters

Page 141: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 121121121121

expressions with these settings to specify the exclusions for comparison filters.

Content Comparison FiltersContent Comparison FiltersContent Comparison FiltersContent Comparison Filters – specifies a Regular Expression used to exclude specific text strings from the Oracle Functional Testing for Web Applications playback comparison.

You can specify multiple expressions. Oracle Functional Testing for Web Applications uses logical OR between expressions. The following is an example of how the expressions can be specified BV_SessionID=[0-9]*.[0-9]*& BV_EngineID=[a-z]*.[0-9]*& VALUE=""[0-9]*"" ([ ])*(language=ETS_VALUE_IS_VALUE)* ([ ])(style=""BORDER-RIGHT: crimson thick double; BORDER-TOP: crimson thick double; BORDER-LEFT: crimson thick double; CURSOR: hand; BORDER-BOTTOM: crimson thick double; BACKGROUND-COLOR: hotpink"")* See Appendix D for information about Regular Expression syntax.

ExclusioExclusioExclusioExclusion Testern Testern Testern Tester – lets you compare two URLs or content strings and generate a Regular Expression. See the Exclusion Tester topic later in this section for additional details.

Page 142: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

122122122122 Functional Testing User's Guide

URL Parameter Options

The URL ParameterURL ParameterURL ParameterURL Parameter section has the following options:

URL Parameters Comparison FiltersURL Parameters Comparison FiltersURL Parameters Comparison FiltersURL Parameters Comparison Filters – specifies URL parameters to exclude from Visual Script playback comparison. The settings can use pattern matching to specify components of the URL to exclude. The pattern matches are performed using the Visual Basic Like operator using the following format:

param1=* param2=* param3=* paramN=*

The following examples show how specific settings affect the playback comparison.

For the following URL: http://www.foo.com/engine123/submit.pl?name1=value1&name2=value2 name*=value*

Page 143: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 123123123123

excludes the URL parameters name1=value1 and name2=value2 from the playback comparison.

For the following URL: <A HREF=/frameset/news.jsp?BV_SessionID=@@@@0166988701.0932590606@@@@&BV_EngineID=calfdfllemjbfdicfmjcfkkdhhm.0&selected=news.htm> BV_EngineID=* BV_SessionID=* excludes the URL parameters BV_SessionID=@@@@0166988701.0932590606@@@@&BV_EngineID=calfdfllemjbfdicfmjcfkkdhhm.0 Exclusion TesterExclusion TesterExclusion TesterExclusion Tester – lets you compare two URLs or content strings and generate a Regular Expression. See the Exclusion Tester topic later in this section for additional details.

URL Parameter Values Options

The URL Parameter ValuesURL Parameter ValuesURL Parameter ValuesURL Parameter Values section has the following options:

Page 144: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

124124124124 Functional Testing User's Guide

URL Parameter Values Comparison FiltersURL Parameter Values Comparison FiltersURL Parameter Values Comparison FiltersURL Parameter Values Comparison Filters – specifies URL parameter values to exclude from Visual Script playback comparison using the following format:

val1* val2* val3* valN*

The following example shows how specific settings affect the playback comparison.

For the following URL: http://www.foo.com/engine123/submit.pl?name1=value1&name2=value2 value* excludes the URL parameters value1 and value2 from the playback comparison.

Exclusion TesterExclusion TesterExclusion TesterExclusion Tester – lets you compare two URLs or content strings and generate a Regular Expression. See the Exclusion Tester topic later in this section for additional details.

Page 145: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 125125125125

URL Subpaths Options

The URL SubpathURL SubpathURL SubpathURL Subpath section has the following options:

URL Subpaths Comparison FiltersURL Subpaths Comparison FiltersURL Subpaths Comparison FiltersURL Subpaths Comparison Filters – specifies URL path values to exclude from Visual Script playback comparison using the following format:

path1* path2* path3* pathN* The following example shows how specific settings affect the playback comparison.

For the following URL: http://www.foo.com/engine123/submit.pl?name1=value1&name2=value2 www*.foo.com engine* excludes the URL path parameters www.foo.com, engine123 and submit.pl from the playback comparison.

Page 146: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

126126126126 Functional Testing User's Guide

Exclusion TesterExclusion TesterExclusion TesterExclusion Tester – lets you compare two URLs or content strings and generate a Regular Expression. See the Exclusion Tester topic later in this section for additional details.

Exclusion Tester

You can use the Exclusion Tester section to test content or URL differences and generate a Regular Expression to use as a filter.

♦ MasterMasterMasterMaster – specifies the string from the Master version of the Visual Script or URL.

♦ TestedTestedTestedTested – specifies the string from the Tested version of the Visual Script or URL. You can also enter any other string to compare against the Master version.

♦ UUUUse automatic comparison filtersse automatic comparison filtersse automatic comparison filtersse automatic comparison filters – when selected, the selected automatic content comparison filters (in the Content section) are used with the Exclusion Tester.

♦ GenerateGenerateGenerateGenerate – generates a Regular Expression pattern based upon the differences between the Master and Tested strings.

♦ TestTestTestTest – tests the specified filter Regular Expression pattern.

After generating a Regular Expression, use the NewNewNewNew button to add it to the filters list.

Page 147: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

Chapter 3: Recording and Playing Back Visual Scripts and Jobs 127127127127

Excluding a Range of HTML Source

Oracle Functional Testing for Web Applications lets you exclude specific segments of HTML source from the Visual Script playback comparison. This method involves inserting <DIV BV_BeginIgnore> and <DIV BV_EndIgnore> elements into the HTML source of the page, before and after the HTML to exclude.

Oracle Functional Testing for Web Applications checks the HTML source for the DIV BV_BeginIgnore and DIV BV_EndIgnore strings line-by-line through the HTML file. If it finds DIV BV_BeginIgnore in a line of HTML it ignores the entire line and all subsequent lines until finding the DIV BV_EndIgnore tag.

When Oracle Functional Testing for Web Applications finds the DIV BV_EndIgnore in a line of HTML, its restarts the playback comparison starting with the next HTML line–not the HTML line containing the DIV BV_EndIgnore element. The closing DIV tags have no affect at all for Oracle Functional Testing for Web Applications but they are required for the browser.

An HTML line can be different things depending upon how the page was formatted in HTML and recorded by Oracle Functional Testing for Web Applications. In Oracle Functional Testing for Web Applications, select Options Options Options Options ���� New Scripts New Scripts New Scripts New Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script. You can specify to record Original HTML or Processed HTML in the GeneralGeneralGeneralGeneral options of the Recording section. Original is as sent by the server. Processed is formatting the browser (IE5 or higher) adds to the text file. Original or Processed could affect HTML line breaks and therefore how the BV_BeginIgnore and BV_EndIgnore flags work.

HTML formatting also affects line breaks. Block-level HTML elements (like <P> and <DIV>) create a new HTML line. Inline elements do not create a new HTML line. Carriage Return/Line Feed (CR/LF) characters in an ASCII editor are considered white space in HTML and do not indicate a new HTML line. Refer to the W3C HTML Recommendations (www.w3.org) for additional information about block-level and inline elements.

Page 148: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Defining Exclusions to Playback Comparisons

128128128128 Functional Testing User's Guide

The following HTML markup example shows HTML that Oracle Functional Testing for Web Applications compares and ignores on Visual Script playback.

<BODY> HTML Source that Oracle Functional Testing for Web Applications will compare against Master on playback of Visual Script. <DIV BV_BeginIgnore>HTML differences ignored starting on HTML line containing DIV BV_BeginIgnore</DIV>

<P>All HTML lines between DIV BV_BeginIgnore and DIV BV_EndIgnore will not have differences between Master and current HTML source compared on playback of the Visual Script. </P>

<DIV BV_EndIgnore>HTML source on same HTML line as DIV BV_EndIgnore is not compared against Master on playback </DIV>

<P>HTML Source on next HTML line after DIV BV_EndIgnore tag will be compared against Master on playback of Visual Script. “<P>”element after </DIV> tag creates another HTML line that is not on the same HTML line as DIV BV_EndIgnore.</P> </BODY> The excluded HTML source will not be tested and will not cause red flags to be generated in the Visual Script during playback. The HTML source excluded from the playback comparison will be shown in purple text when you double-click on any Different HTML node in the Visual Script.

Page 149: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

129129129129

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 4444 Working with Visual Scripts

Visual Scripts define the baseline for testing of your Web site or application. Recorded Visual Scripts include a set of default tests that are automatically executed on playback of the script. These tests are designed for Anchors, Elements, Forms, Frames, HTML, Images, Image Maps, Links, ActiveX controls, Java Applets, VBScript, and JavaScript. The Visual Scripts and default tests can be customized to suit your requirements without programming.

Viewing Visual Scripts

Oracle Functional Testing for Web Applications Visual Scripts show the recorded Web site or application as a tree hierarchy. The Visual Scripts provide visual indications of the type of recorded information, the structure of the site or application, and any comparison problems encountered during playback. Comparison problems are shown using simple color-coded flags in the script itself.

Changing the Visual Script Pane Width

To toggle the Visual Script pane width:

Select ViewViewViewView ���� Resize Visual Script ViewResize Visual Script ViewResize Visual Script ViewResize Visual Script View.

or:

Click and drag the divider between the Visual Script pane and the Browser pane.

Page 150: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Viewing Visual Scripts

130130130130

Expanding and Collapsing the Visual Script

Visual Scripts form a tree hierarchy showing the structure of the Web site or applications. When working with Visual Scripts, you will need to expand the script, or sections of the script, to view specific nodes, add test cases and modify default tests.

T

T

1111

2222

T

1111

2222

C e E

ollapsed Pag

Functional Testing User's Guide

o expand and collapse the entire Visual Script:

Select ViewViewViewView ���� Expand ScriptExpand ScriptExpand ScriptExpand Script or select ViewViewViewView ���� Collapse ScriptCollapse ScriptCollapse ScriptCollapse Script.

o expand or collapse a specific Visual Script node:

.... Select the node in the Visual Script.

.... Click the icon to expand the node or click the icon to collapse the node.

o expand and collapse Visual Script pages:

.... Select the page node in the Visual Script.

.... Click the right mouse button and select Expand PageExpand PageExpand PageExpand Page or Collapse Collapse Collapse Collapse PagePagePagePage from the popup menu. -or- Click the and icons next to the page node.

xpanded Page

Page Hierarchy

Page 151: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Viewing Visual Scripts

Chapter 4: Working with Visual Scripts 131131131131

NoteNoteNoteNote: Clicking the icon expands the page to its previous expanded state, which might be one level or all levels depending upon the last time the page was expanded.

Overview of Visual Script Nodes

Each Visual Script page in the hierarchy contains a set of sub-nodes that define the structure of the page. The following nodes can be in the tree:

Address node: the URL for the page. Below this node are the duration and any parameters used by forms.

♦ Duration node: shows the download time for the page and the playback delay associated with the page. The playback delay is the actual amount of time (think time) the user spent on the page before going to another page.

♦ Cookies node: shows the Client Request and Server Response values.

♦ Parameters node: shows the form elements and data values for form results pages. If the page is mapped to a Data Bank, the Parameters node shows which parameters are mapped to variables and bound to a Data Bank file.

Frame node: the main frame for the entire page. Below this node are the other components of the page.

♦ ActiveX node: lists the ActiveX objects in the page.

♦ Anchors node: list the anchors in the page.

♦ Form node: lists the forms and elements in the page.

♦ Frames node: lists the frames in a frames-based page.

♦ HTML node: contains the HTML source for the page.

♦ Images node: lists all images in the page.

♦ Java Applet node: contains the properties of Java Applets in the page.

♦ Links node: lists all links in the page.

♦ Scripts node: lists all VBScripts and JavaScripts in the page.

♦ Tests node: lists the user-defined test cases added to the Visual Script.

Page 152: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Viewing Visual Scripts

132132132132 Functional Testing User's Guide

NoteNoteNoteNote: The Address, Custom Page Programmability, and Frame nodes are always included in the Visual Script. The sub-nodes can vary depending upon the structure of the recorded page. Web pages that include other types of page components will have additional tree nodes displayed in a similar fashion.

In addition to icons with textual identifiers (for example, HTML, images, links, etc.), the Visual Script use the following icons:

IconIconIconIcon DescriptionDescriptionDescriptionDescription

Plus icon – node has lower level nodes.

Minus icon – node fully expanded.

Job icon – multi-script job node.

Script icon – individual Visual Script node.

Page icon – individual script page node.

Yellow flag – ignore (skip) test.

Red flag – test case failure.

Red and yellow flags – ignore test failure.

Arrow – Parameter mapped to variable, but not bound to Data Bank field.

Check mark – Parameter mapped to variable and bound to Data Bank field.

Failure flags appear after playback of the Visual Script if the baseline version of the page differs from the version under test. You can set Ignore flags manually for specific nodes after analyzing test results. Data Bank icons appear after you use the Data Bank Wizard to map parameters to a Data Bank file.

Page 153: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Viewing Visual Scripts

Chapter 4: Working with Visual Scripts 131313133333

Exporting Visual Scripts

You can export Visual Scripts to an ASCII file.

To export the Visual Script to an ASCII file:

1.1.1.1. Expand or collapse the Visual Script to show the node(s) you want to export. The text in the exported file will appear the same as is shown in the Visual Script pane.

2.2.2.2. Select FileFileFileFile ���� Export Script AsExport Script AsExport Script AsExport Script As. Oracle Functional Testing for Web Applications opens a dialog box for saving the file.

3.3.3.3. Enter a file name and click OKOKOKOK.

You can use any ASCII editor to view or print the file. The following is an example of a Visual Script exported to an ASCII file: - [1] HOME + Address: http://testserver.com/ - Frame (HOME) Html + Images - Links http://www.testserver.com:80/index.html http://www.testserver.com:80/company/index.html http://www.testserver.com:80/products/index.html http://www.testserver.com:80/news/index.html http://www.testserver.com:80/support/index.html http://www.testserver.com:80/contact/index.html http://www.testserver.com:80/success.html http://www.testserver.com:80/partners.html http://www.testserver.com:80/jobs.html http://www.testserver.com:80/sitemap.html http://www.testserver.com:80/y2k.html + [2] PRODUCTS|Oracle Application Suite + [3] NEWS & EVENTS|IN THE NEWS

The nodes with the minus (-) signs are nodes that were expanded in the Visual Script pane when the script was exported. The nodes with the plus (+) signs are nodes that were collapsed in the Visual Script pane when the script was exported.

Page 154: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Editing Visual Scripts

134134134134 Functional Testing User's Guide

Editing Visual Scripts

Once you record a Visual Script, you can modify the page hierarchy if necessary. Oracle Functional Testing for Web Applications lets you do the following: ♦ Copy pages ♦ Move pages ♦ Append pages ♦ Insert pages

♦ Add Comments ♦ Delete pages ♦ Delete Visual Scripts

Copying Pages

To copy a page in the Visual Script:

1.1.1.1. Select the page node to copy in the Visual Script

2.2.2.2. Click the right mouse button and select Copy PageCopy PageCopy PageCopy Page from the menu.

3.3.3.3. Click the right mouse button and select Paste PagePaste PagePaste PagePaste Page from the menu.

Moving Pages

To move a page in the Visual Script:

1.1.1.1. Select the page to move in the Visual Script tree.

2.2.2.2. Click the right mouse button and select Cut PageCut PageCut PageCut Page from the menu.

3.3.3.3. Select the page location in the Visual Script where you want the page moved.

4.4.4.4. Click the right mouse button and select Paste PagePaste PagePaste PagePaste Page from the menu. The page is pasted to the Visual Script directly after the currently selected page.

Appending a Page

To append a page to the Visual Script:

1.1.1.1. Load the page to append into the Browser pane.

2.2.2.2. Select RunRunRunRun ���� RecordRecordRecordRecord ���� CuCuCuCurrent Pagerrent Pagerrent Pagerrent Page or click the toolbar button. The new page is appended to the end of the Visual Script.

Page 155: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Editing Visual Scripts

Chapter 4: Working with Visual Scripts 135135135135

Inserting Pages

The Insert Page Wizard provides a convenient way to insert a page navigation into a Visual Script. You can insert a page that uses a URL and post data or a raw HTTP request header.

To insert a page into the Visual Script:

1.1.1.1. Select the top-level script node or any page node.

2.2.2.2. Select Insert Page from the right-click shortcut menu. The Insert Page Wizard opens

3.3.3.3. Select the method to use and click NextNextNextNext.

4.4.4.4. Enter the navigation information (URL and post data or raw HTTP Request header)

5.5.5.5. Click FinishedFinishedFinishedFinished.

Provide Title The Provide Title options of the Insert Page Wizard are as follows:

Please provide a title for the new pagePlease provide a title for the new pagePlease provide a title for the new pagePlease provide a title for the new page – enter any name for the page. The name will appear in the Visual Script.

Page 156: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Editing Visual Scripts

136136136136 Functional Testing User's Guide

How will you specify navigation information fHow will you specify navigation information fHow will you specify navigation information fHow will you specify navigation information for this page?or this page?or this page?or this page? – select one of the following options:

♦ Provide the URL and optional post data manuallyProvide the URL and optional post data manuallyProvide the URL and optional post data manuallyProvide the URL and optional post data manually – when selected, the wizard opens a panel for specifying the URL and post data after you click NextNextNextNext.

♦ Provide a raw HTTP request header and let Oracle FunctProvide a raw HTTP request header and let Oracle FunctProvide a raw HTTP request header and let Oracle FunctProvide a raw HTTP request header and let Oracle Functional Testing ional Testing ional Testing ional Testing for Web Applications build my navigationfor Web Applications build my navigationfor Web Applications build my navigationfor Web Applications build my navigation – when selected, the wizard opens a panel for specifying the raw request header after you click NextNextNextNext.

Manual URL The Manual URL options of the Insert Page Wizard are as follows:

URLURLURLURL – enter the URL for the page.

Post dataPost dataPost dataPost data – enter any post data, if necessary, to use with the URL.

Navigate to this pageNavigate to this pageNavigate to this pageNavigate to this page – click this button to test the navigation. The page should appear in the Oracle Functional Testing for Web Applications browser pane.

HTTP Request The HTTP Request options of the Insert Page Wizard are as follows:

Raw HTTP RequestRaw HTTP RequestRaw HTTP RequestRaw HTTP Request – type or paste the request.

Show Me an ExampleShow Me an ExampleShow Me an ExampleShow Me an Example – loads an example HTTP Request into the Raw Raw Raw Raw HTTP RequestHTTP RequestHTTP RequestHTTP Request box.

Load Request from a FileLoad Request from a FileLoad Request from a FileLoad Request from a File – opens a file selection dialog box for specifying the file to load.

Deleting Pages

To delete a page from the Visual Script:

1.1.1.1. Select the Page to delete in the Visual Script.

2.2.2.2. Click the right mouse button and select Delete PageDelete PageDelete PageDelete Page from the popup menu or click the toolbar button.

Page 157: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Editing Visual Scripts

Chapter 4: Working with Visual Scripts 137137137137

Adding Comments

To add comments for an entire Visual Script:

1.1.1.1. Select EditEditEditEdit ���� Script CommentsScript CommentsScript CommentsScript Comments. The comments dialog box opens:

2.2.2.2. Enter any text to document Visual Script modifications. Use Shift-Enter to create a new line.

3.3.3.3. Select OKOKOKOK or press Enter to close the Script Comments window.

NoteNoteNoteNote: Oracle Functional Testing for Web Applications automatically adds a date and time stamp each time you save the Visual Script.

To add a comment line for a specific page of a Visual Script:

1.1.1.1. Record a Visual Script.

2.2.2.2. Select the top-level node of the page where you want to add a comment.

3.3.3.3. Click the right mouse button and select Add Page CommentAdd Page CommentAdd Page CommentAdd Page Comment.

Page 158: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Editing Visual Scripts

138138138138 Functional Testing User's Guide

The comments dialog box opens.

4.4.4.4. Enter any text to document Visual Script page modifications. Page comments are limited to a single line of text.

5.5.5.5. Select OKOKOKOK.

The comment appears as a node in the Visual Script.

Deleting Visual Scripts

To delete a Visual Script:

1.1.1.1. Select AdminAdminAdminAdmin ���� Script ManagerScript ManagerScript ManagerScript Manager. The list of scripts opens:

2.2.2.2. Select the Visual Script to delete.

3.3.3.3. Click DeleteDeleteDeleteDelete.

4.4.4.4. Click YesYesYesYes to confirm the deletion or click NoNoNoNo to cancel.

Page 159: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Default Tests

Chapter 4: Working with Visual Scripts 139139139139

Working with Default Tests

By default, Oracle Functional Testing for Web Applications performs a comparison between the pages recorded to Visual Scripts and the current version of the pages when the Visual script is played back. The default tests are: ♦ Anchors ♦ ActiveX Controls ♦ Elements ♦ Forms

♦ HTML ♦ Images ♦ Frames ♦ Image Maps

♦ Links ♦ Java Applets ♦ Scripts

The default tests can be enabled or disabled to suit your requirements.

Modifying Default Tests for All Pages

To modify default tests for all pages:

1.1.1.1. Select Options Options Options Options ���� New Scripts New Scripts New Scripts New Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

2.2.2.2. Select Content TestsContent TestsContent TestsContent Tests in the Functional Tests options.

3.3.3.3. Select or clear the check boxes on the specific elements and attributes.

4.4.4.4. Click OKOKOKOK.

Page 160: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Default Tests

140140140140 Functional Testing User's Guide

NoteNoteNoteNote: The global default settings are used for all newly recorded Visual Scripts.

Modifying Default Tests for a Specific Page

To modify default tests for specific page:

1.1.1.1. Select the page node in the Visual Script.

2.2.2.2. Click the right mouse button.

3.3.3.3. Select Page Content Test ManagerPage Content Test ManagerPage Content Test ManagerPage Content Test Manager from the shortcut menu. The default test dialog box opens:

4.4.4.4. Select or clear the check boxes on the specific elements and attributes.

5.5.5.5. Click OKOKOKOK.

Turning Off Default Tests for a Specific Node

To turn off default test for a specific node:

1.1.1.1. Select the node in the Visual Script.

2.2.2.2. Click the right mouse button and select Don’t Test (item)Don’t Test (item)Don’t Test (item)Don’t Test (item).

NoteNoteNoteNote: Nodes with ignored tests are identified with a yellow flag ( ) next to the node.

Page 161: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Default Tests

Chapter 4: Working with Visual Scripts 141141141141

Turning Off Existence Tests for a Specific Node

To turn off the existence test for a specific node

1.1.1.1. Select the node in the Visual Script.

2.2.2.2. Select EditEditEditEdit ���� PropertiesPropertiesPropertiesProperties. The properties dialog box opens:

3.3.3.3. Clear the Execute Default Comparison TestExecute Default Comparison TestExecute Default Comparison TestExecute Default Comparison Test check box. Clearing this check box is the same as clicking the right mouse button and selecting Don’t Test (item)Don’t Test (item)Don’t Test (item)Don’t Test (item).

4.4.4.4. Click OKOKOKOK.

NoteNoteNoteNote: You can also press the F4 key to view properties, or click the right mouse button and select PropertiesPropertiesPropertiesProperties from the popup menu.

Page 162: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Adding Custom Variables

142142142142 Functional Testing User's Guide

Adding Custom Variables

The Custom Variables dialog box lets you manage variables in a Visual Script. The variables can be used as placeholders for dynamically changed data on a web page.

NewNewNewNew – creates a new custom variable. There are four types of custom variables: Data Bank, Expression, XML XPath, and HTML DOM Path. Data Bank and expression variable are added at the Script level. HTML DOM and XML XPath variables can be added to specific pages.

DeleteDeleteDeleteDelete – deletes the selected variable.

[Script/Page grid] – shows the variables defined in the Visual Script and each page of the script.

♦ Page Page Page Page – shows the page number on which the variable is used.

♦ ParameterParameterParameterParameter – shows the names of the custom variables.

Page 163: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Adding Custom Variables

Chapter 4: Working with Visual Scripts 143143143143

♦ VariableVariableVariableVariable – shows the name of the variable.

♦ Column or ExpressionColumn or ExpressionColumn or ExpressionColumn or Expression – shows the Data Bank column name or the value of an expression variable.

♦ Last ValueLast ValueLast ValueLast Value – shows the last value of the custom variable.

♦ Test Test Test Test – tests the properties (path, expression, etc.) defined for the variable and gets the data value.

The variable properties differ depending upon the type of variable selected. The following sections show the properties for each type of variable.

Data Bank Variables

Data Bank variables have the following additional properties:

Mapped toMapped toMapped toMapped to – shows the variable to which the selected Parameter is mapped. This field appears only when a Visual Script parameter is selected in the Script/Page grid.

Variable NameVariable NameVariable NameVariable Name – shows the name of the variable.

TypeTypeTypeType – shows the variable type: Databank.

Page 164: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Adding Custom Variables

144144144144 Functional Testing User's Guide

Data bank FileData bank FileData bank FileData bank File – shows the name of the Data Bank file.

ColumnColumnColumnColumn – specifies which column to highlight in the table.

[Data table] – shows the columns, records, and data values in the Data Bank file.

RefreshRefreshRefreshRefresh – refreshes the table with the latest data from the Data Bank file.

EditEditEditEdit – lets you edit the Data Bank data in the table. A SaveSaveSaveSave and CancelCancelCancelCancel button appear in the dialog box to save changes or cancel editing.

OpenOpenOpenOpen – opens the Data Bank file in an external editor (the default is Microsoft Excel).

Expression Variables

Expression variables have the following additional properties:

Variable NameVariable NameVariable NameVariable Name – shows the name of the variable.

TypeTypeTypeType – shows the variable type: Expression. Expression variables are internal Data Bank variables. They can be defined in this dialog box or the Data Bank Wizard.

Page 165: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Adding Custom Variables

Chapter 4: Working with Visual Scripts 145145145145

ExpressiExpressiExpressiExpressionononon – shows the expression for the variable.

EvaluateEvaluateEvaluateEvaluate – evaluates the expression defined for the variable.

Evaluated ExpressionEvaluated ExpressionEvaluated ExpressionEvaluated Expression – shows the result of the expression returned when you click the EvaluateEvaluateEvaluateEvaluate button.

HTML DOM Path Variables

HTML DOM Path variables have the following additional properties:

Variable NameVariable NameVariable NameVariable Name – shows the name of the variable.

TypeTypeTypeType – shows the variable type: Page Content.

Last ValueLast ValueLast ValueLast Value – shows the last value for the variable.

DOM Path to ElementDOM Path to ElementDOM Path to ElementDOM Path to Element – specifies the Document Object Model path to the page object.

DOM PropertyDOM PropertyDOM PropertyDOM Property – specifies the Document Object Model property to use (i.e. innertext, innerHTML, etc.)

Property Reg ExpProperty Reg ExpProperty Reg ExpProperty Reg Exp – specifies the Regular Expression to use to locate and replace the DOM Property.

Page 166: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Adding Custom Variables

146146146146 Functional Testing User's Guide

ThinThinThinThin----Client Regular ExpressionClient Regular ExpressionClient Regular ExpressionClient Regular Expression – specifies the Regular Expression to use to locate and replace the dynamic part of the page for Thin Client (Oracle Load Testing for Web Applications).

Test Test Test Test – tests the properties (path, expression, etc.) defined for the variable and gets the data value.

Build Pattern Build Pattern Build Pattern Build Pattern – opens the Dynamic Value Wizard for defining the Regular Expression.

Find ElementFind ElementFind ElementFind Element – opens the Select Object Model Element dialog box for selecting the path to the page element.

XML Path Variables

XML XPath variables have the following additional properties:

Variable NameVariable NameVariable NameVariable Name – shows the name of the variable.

TypeTypeTypeType – shows the variable type: XML XPath.

XXXX----Path ExpressionPath ExpressionPath ExpressionPath Expression –––– specifies the XPath language expression to use to locate the dynamic part of the page.

Page 167: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Adding Custom Variables

Chapter 4: Working with Visual Scripts 147147147147

XML NamespaceXML NamespaceXML NamespaceXML Namespace –––– specifies the URI of the XML Namespace for the XML document.

Frame PathFrame PathFrame PathFrame Path –––– specifies the path to the frame containing the XML document.

TestTestTestTest –––– tests the properties (path, expression, etc.) defined for the variable and gets the data value.

Find FrameFind FrameFind FrameFind Frame –––– opens the Select Object Model Element dialog box for selecting the path to the frame.

Adding Variables

To add a custom variable to the page

1.1.1.1. Record a Web Services Visual Script.

2.2.2.2. Select a page node.

3.3.3.3. Select either Manage VariablesManage VariablesManage VariablesManage Variables or Add Page Content VariableAdd Page Content VariableAdd Page Content VariableAdd Page Content Variable from the right-click shortcut menu.

4.4.4.4. If you selected Manage VariablesManage VariablesManage VariablesManage Variables, click NewNewNewNew and select the variable type

5.5.5.5. Enter a variable name or use the default name.

6.6.6.6. Specify the properties for the variable.

7.7.7.7. Click OKOKOKOK.

See also Recording Web Services in Chapter 3 for information about using Custom Variables with Web Services scripts.

Page 168: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Running Resource Validation

148148148148 Functional Testing User's Guide

Running Resource Validation

The Resource Validation test checks the integrity of the referenced resources (i.e. links, images, etc.) in your pages. The Resource Validation test can be run automatically after playback of a Visual Script. You can also run the Resource Validation test manually at any time.

Running Resource Validation Manually

To run the Resource Validation test:

1.1.1.1. Select RunRunRunRun ���� Resource ValidationResource ValidationResource ValidationResource Validation or click the toolbar button. The Resource Validation window opens:

2.2.2.2. Click the StartStartStartStart button.

Page 169: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Running Resource Validation

Chapter 4: Working with Visual Scripts 149149149149

3.3.3.3. Wait for the tests to finish and view the validation results.

4.4.4.4. Close the Resource Validation window when finished.

Exporting Resource Validation Results

You can export the Resource Validation results to an ASCII file either before or after running the resource Validation test.

To export Resource Validation results to a file:

1.1.1.1. Select RunRunRunRun ���� Resource ValidationResource ValidationResource ValidationResource Validation or click the toolbar button. The Resource Validation window opens.

2.2.2.2. Start the Resource Validation.

3.3.3.3. When the Resource Validation test finishes, click ExportExportExportExport. Oracle Functional Testing for Web Applications opens a dialog box for saving the file.

4.4.4.4. Enter a file name and click OKOKOKOK.

You can use any ASCII editor to view or print the file. The following is an example of an exported Resource Validation file before running the Resource Validation test: Item 1 Host: www.testserver.com Resource: - Internet Status: - Item 1. 1 Host: www.testserver.com Resource: index.html Item 1. 2 Host: www.testserver.com Resource: company.html Item 1. 3 Host: www.testserver.com Resource: products.html Item 1. 4 Host: www.testserver.com Resource: news.html

Page 170: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Running Resource Validation

150150150150 Functional Testing User's Guide

Item 1. 5 Host: www.testserver.com Resource: support.html Item 1. 6 Host: www.testserver.com Resource: contact.html

The following is an example of an exported Resource Validation file after running the Resource Validation test: Item 1 Host: www.myweb.com Resource: - Status: Finished Internet Status: - Item 1. 1 Host: www.myweb.com Resource: 'Default' Status: Passed Resource Handle: 1180 Internet Status: 200 Item 2 Host: www.anotherweb.com Resource: - Status: Finished Internet Status: - Item 2. 1 Host: www.anotherweb.com Resource: 'Default' Status: Failed - Internet Send Error Error: Internet Error: NAME_NOT_RESOLVED Resource Handle: 1181 Wininet Error: 12007

The status and error information is listed after each item. The error headings appear under an item only when an error occurred.

Setting the Resource Validation Playback Option

The Resource Validation test runs automatically after playback of Visual Scripts by default. You can turn on and off the automatic Resource Validation test using the Playback Options.

To set the Resource Validation Playback option:

1.1.1.1. Select OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

2.2.2.2. Select GeneralGeneralGeneralGeneral in the Playback options.

Page 171: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Running Resource Validation

Chapter 4: Working with Visual Scripts 151151151151

3.3.3.3. Set or clear Automatically run resource validation after playbackAutomatically run resource validation after playbackAutomatically run resource validation after playbackAutomatically run resource validation after playback.

4.4.4.4. Click OKOKOKOK.

The Playback Options setting affects the Resource Validation test for the entire Visual Script.

Page 172: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Running Resource Validation

152152152152 Functional Testing User's Guide

Turning Off Validation Tests for a Node

To turn off the validation test for a specific node:

1.1.1.1. Select the node in the Visual Script.

2.2.2.2. Select EditEditEditEdit ���� PropertiesPropertiesPropertiesProperties. The properties dialog box opens:

3.3.3.3. Clear the Execute Validation TestExecute Validation TestExecute Validation TestExecute Validation Test check box.

4.4.4.4. Click OKOKOKOK.

NotesNotesNotesNotes: Validation tests are options only on Link nodes and Image nodes.

You can also press the F4 key to view properties, or click the right mouse button and select PropertiesPropertiesPropertiesProperties from the popup menu.

Page 173: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Running Resource Validation

Chapter 4: Working with Visual Scripts 153153153153

Setting Resource Validation Options

To set Resource Validation options:

1.1.1.1. Select OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

2.2.2.2. Select Resource ValidationResource ValidationResource ValidationResource Validation in the Functional Test options.

This dialog box lets you specify the default Resource Validation parameters.

Resource ValidationResource ValidationResource ValidationResource Validation – the following options:

♦ Maximum number of threadsMaximum number of threadsMaximum number of threadsMaximum number of threads – the maximum number of threads Oracle Functional Testing for Web Applications uses to validate the existence of Web page resources (links, images, etc.) Increasing the number of threads can improve performance.

♦ Perform after Perform after Perform after Perform after each iterationeach iterationeach iterationeach iteration – when selected, the Resource Validation test runs after each iteration of the Visual Script played back with a Data Bank.

Page 174: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Running Resource Validation

154154154154 Functional Testing User's Guide

For Every HostFor Every HostFor Every HostFor Every Host – the following options:

♦ Maximum number of threadsMaximum number of threadsMaximum number of threadsMaximum number of threads – the maximum number of threads Oracle Functional Testing for Web Applications uses when accessing servers during resource validation tests. Increasing the number of threads can improve performance.

♦ Timeout in secondsTimeout in secondsTimeout in secondsTimeout in seconds – the maximum amount of time Oracle Functional Testing for Web Applications will wait to receive a response from a server during the resource validation tests.

XML Schema Validation

To validate XML against a schema file:

Select a page node and select XML Schema ValidationXML Schema ValidationXML Schema ValidationXML Schema Validation from the right-click shortcut menu.

This dialog box lets you validate the XML result of the selected page or frame against a schema file.

General PropGeneral PropGeneral PropGeneral Propertiesertiesertieserties – specifies the following general information about the test:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: XML Schema

♦ FrameFrameFrameFrame – the name of a web page frame containing the XML result.

Page 175: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 155155155155

♦ ResultResultResultResult – the validation result.

XML Schema AttributesXML Schema AttributesXML Schema AttributesXML Schema Attributes – specifies the schema attributes.

♦ URLURLURLURL – the Uniform Resource Locator of the schema file.

♦ DescriptionDescriptionDescriptionDescription – a description of the schema file.

Specify the XML Schema Attributes and click OKOKOKOK.

Working with Visual Script Properties

Each node of a Visual Script has a set of properties that define the baseline information used to compare the Web site or application. This section describes the various properties for the different types of Visual Script nodes.

Viewing Visual Script Node Properties

To view Visual Script node properties:

1.1.1.1. Select a node in the Visual Script.

2.2.2.2. Select EditEditEditEdit ���� PropertiesPropertiesPropertiesProperties. or: Click the right mouse button and select PropertiesPropertiesPropertiesProperties from the popup menu. or: Press the F4 key.

The dialog box that opens depends upon the type of node selected. The following sections explain the options in each dialog box.

Page 176: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

156156156156 Functional Testing User's Guide

Basic Node Properties

All Visual Script nodes have a basic set of properties that provide information about the node.

The dialog box shows the properties of the currently selected node of the Visual Script. The properties are as follows:

PagePagePagePage – the page number and title from the Visual Script.

TypeTypeTypeType – the Visual Script node type: Frame, Scripts Collection, Image Collection, Links Collection, Page, etc.

Name/TitleName/TitleName/TitleName/Title – the name or title of the node.

Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test – when selected, the default existence test is run on playback. The existence test verifies that the node exists in the current version of the Web page or application during playback of the Visual Script. When cleared, the test is ignored for the node. Clearing this check box is the same as clicking the right mouse button and selecting Ignore TestIgnore TestIgnore TestIgnore Test.

ResultResultResultResult – the result of the existence test: passed or failed.

Page 177: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 157157157157

Address Node Properties

This dialog box shows the properties of the currently selected Address node of the Visual Script.

The properties are as follows:

PagePagePagePage – the page number and title from the Visual Script.

TypeTypeTypeType – the Visual Script node type: Address.

URLURLURLURL – the Uniform Resource Locator of the page.

ActionsActionsActionsActions – lists the Dynamic HTML and/or Java events to be played back. The associated check box lets you include or exclude specific events in the Visual Script playback. When selected, the event is included in playback. When cleared, the event is not included. You can also specify if events play back by the text or the index using Base Event on IndexBase Event on IndexBase Event on IndexBase Event on Index.

Page 178: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

158158158158 Functional Testing User's Guide

You can double-click on an event in the ActionActionActionAction list to open the event properties. You can also use the options on the right-click shortcut menu to work with or modify the recorded events in the list.

General Tab The GeneralGeneralGeneralGeneral tab properties are as follows:

AttributesAttributesAttributesAttributes – the duration and delay times as follows:

♦ Recorded DurationRecorded DurationRecorded DurationRecorded Duration – the amount of time in seconds required to record the page.

♦ TTTTested Durationested Durationested Durationested Duration – the amount of time in seconds required to test the page.

♦ Delay Before PlaybackDelay Before PlaybackDelay Before PlaybackDelay Before Playback – the amount of time in seconds Oracle Functional Testing for Web Applications delayed before playback of the page.

Base Event on IndexBase Event on IndexBase Event on IndexBase Event on Index – specifies how Oracle Functional Testing for Web Applications navigates Dynamic HTML and/or Java events that occurred on the page. When based on the index, Oracle Functional Testing for Web Applications uses the zero-based index of the event. Otherwise, Oracle Functional Testing for Web Applications navigates using the text attribute for the event. The following examples show the Oracle Functional Testing for Web Applications object paths by index and text attribute:

Based on text: window(0).link(text[3]="real8video.rm" | 16) Based on index: window(0).link(16 | text[3]="real8video.rm")

♦ Selected EventSelected EventSelected EventSelected Event – when selected, Oracle Functional Testing for Web Applications navigates using the zero-based index of the selected event and ignores any text related to the event. Select an event in the ActionsActionsActionsActions list and select or clear this setting for the specific event. The default setting is cleared.

♦ All EventsAll EventsAll EventsAll Events – changes all events to use the event index.

Advanced Tab The AdvancedAdvancedAdvancedAdvanced tab properties are as follows:

Page 179: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 159159159159

On Playback, display each element's outer htmlOn Playback, display each element's outer htmlOn Playback, display each element's outer htmlOn Playback, display each element's outer html – when selected, the playback writes to the log the outer HTML of each element after the playback status message for the event. When cleared, the playback only writes to the log the status message for the event.

Create new eventCreate new eventCreate new eventCreate new event – opens a dialog box for selecting the element on which the event should occur. Select the element in the browser pane and then specify the event type in the Event Properties dialog box.

Play all eventsPlay all eventsPlay all eventsPlay all events – plays back all events listed in the Actions list.

Play selected eventsPlay selected eventsPlay selected eventsPlay selected events – plays back only the selected events listed in the Actions list. You can select multiple events using the Shift and Ctrl keys.

Stop playbackStop playbackStop playbackStop playback – stops playback of the events.

Show element's outer htmlShow element's outer htmlShow element's outer htmlShow element's outer html – writes the outer HTML of the element on which the selected event occurs in the Advanced tab log.

ClearClearClearClear – clears the AdvancedAdvancedAdvancedAdvanced tab log pane.

NoteNoteNoteNote: Events listed in the Address node Actions list actually occur on the previous page of the Visual Script. Before playing back the events, you may need to load the previous page of the Visual Script into the browser pane (i.e. using Goto PageGoto PageGoto PageGoto Page on the right-click shortcut menu). If the correct page is not loaded in the browser, you may get A “Failed to play event: Failed to find element…” message in the log pane.

Page 180: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

160160160160 Functional Testing User's Guide

Cookies Properties

This dialog box shows the properties of the currently selected Cookies node of the Visual Script.

The properties are as follows:

Client RequestsClient RequestsClient RequestsClient Requests – shows cookie information set during a client request to the server.

♦ CookieCookieCookieCookie – the cookie name.

♦ ComparisonComparisonComparisonComparison – shows the comparison results between the Master Value and the Tested Value.

♦ Master ValueMaster ValueMaster ValueMaster Value – shows the cookie value when the page was recorded to the Visual Script.

♦ Tested ValueTested ValueTested ValueTested Value – shows the cookie value when the page was played back by the Visual Script.

Server ResponsesServer ResponsesServer ResponsesServer Responses – shows cookie information returned by the server.

♦ CookieCookieCookieCookie – the cookie name.

♦ ComparisonComparisonComparisonComparison – shows the comparison results between the Master Response Value and the Tested Response Value.

♦ Master ValueMaster ValueMaster ValueMaster Value – shows the comparison results between the Master Value and the Master Response Value.

Page 181: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 161161161161

♦ Tested ValueTested ValueTested ValueTested Value – shows the comparison results between the Tested Value and the Tested Response Value.

♦ Master Response ValueMaster Response ValueMaster Response ValueMaster Response Value – the cookie from the server response when the page was recorded to the Visual Script.

♦ Tested Response ValueTested Response ValueTested Response ValueTested Response Value – the cookie from the server response when the page was played back by the Visual Script.

Event Properties

This dialog box shows the properties of Applet, DHTML, Java, Plugin, and Windows events recorded to the Visual Script. The events are recorded to the Address node. The Event Properties are opened from the Address node Properties. Double-click on an event to open the properties. The GeneralGeneralGeneralGeneral tab appears for all event types. Other tabs appear only for specific event types.

General Tab The General tab shows the Event and General properties.

Event PropertiesEvent PropertiesEvent PropertiesEvent Properties – shows the properties of the event.

♦ Event ClassEvent ClassEvent ClassEvent Class – shows which class of event was recorded.

♦ Event TypeEvent TypeEvent TypeEvent Type – shows the type of event recorded.

Page 182: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

162162162162 Functional Testing User's Guide

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – shows general information about the event.

♦ Object PathObject PathObject PathObject Path – shows the Oracle Functional Testing for Web Applications object model path for the object that generated the event.

♦ Pre Event ValuePre Event ValuePre Event ValuePre Event Value – shows the value before the event occurred.

♦ Pre Event Value TypePre Event Value TypePre Event Value TypePre Event Value Type – shows the type of Pre event value: Value, Index, or Irrelevant.

♦ DelayDelayDelayDelay – shows the amount of delay time (in milliseconds) recorded before the event.

♦ Additional DelayAdditional DelayAdditional DelayAdditional Delay – specifies additional delay time to add to the recorded delay before firing the event.

♦ Scalable PositionScalable PositionScalable PositionScalable Position – when selected, the Oracle Functional Testing for Web Applications playback scales the x/y coordinate values for an event (i.e. a click) to the same proportion as a scaled object. This option appears only for events types to which it applies.

Advanced Tab This tab shows the path information for Windows event properties recorded against an ActiveX object in a Web page.

PathPathPathPath – shows the path information for the control.

Page 183: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 163163163163

♦ Unique NameUnique NameUnique NameUnique Name – shows the unique name of the control on which the event occurred.

♦ Class NameClass NameClass NameClass Name – shows the class of the control on which the event occurred.

♦ Window TextWindow TextWindow TextWindow Text – shows the name of the window in which the event occurred.

♦ Apply Apply Apply Apply ChangeChangeChangeChange – applies any changes to the path information.

♦ [Path list] – list the full path to the control on which the event occurred.

X CoordinateX CoordinateX CoordinateX Coordinate – shows the X-axis coordinate where the event occurred on the control.

Y CoordinateY CoordinateY CoordinateY Coordinate – shows the Y-axis coordinate where the event occurred on the control.

Attributes Tab This tab shows the attributes for Applets, DHTML, Java, and Plugin objects recorded to the Visual Script. The attributes can vary depending upon the type event.

For DHTML events, you can select which attributes to include or exclude and the order of recognition.

Page 184: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

164164164164 Functional Testing User's Guide

[Object/Attribute tree] – shows the order in which objects and attributes are recognized. Select or clear the checkboxes to enable or disable recognition for specific objects or attributes.

AttributeAttributeAttributeAttribute – shows the name of the selected DHTML attribute.

ValueValueValueValue – shows the recorded value of the selected DHTML attribute.

Use the arrow buttons to change the order in which attributes are recognized during playback of the Visual Script. You can set the default for each order using Object Recognition settings in the Oracle Functional Testing for Web Applications options.

For Applets with text fields, the event properties may include a DDDDatabank atabank atabank atabank button that lets you assign a Data Bank variable name to the field.

NameNameNameName – shows the name of the object attribute.

ValueValueValueValue – shows the recorded value of the object attribute.

DatabDatabDatabDatabankankankank – opens a dialog box for defining a Data Bank variable name for passing data from a Data Bank to a Java Applet text field or key listener. The DatabankDatabankDatabankDatabank button appears only for Events that have attributes that can be linked to a Data Bank variable.

Page 185: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 165165165165

Java Event Details Tab Oracle Functional Testing for Web Applications captures Sun JRE 1.4.x applet events using an integrated third-party component called Abbot1. These events allow scripts recorded against these applets to be playback in Oracle Functional Testing for Web Applications and Thick Client.

Abbot can capture applet events for both Swing and AWT UI components for applets built with Sun JRE 1.4 and above (with limited support for JRE 1.3x). You must specifically select the Sun JRE 1.4x Applets Support during the Oracle Application Testing Suite setup procedure.

Before you start recording, you must enable the Sun Plugin Applet v1.4.1 support setting in the Java Applet section of the AdvancedAdvancedAdvancedAdvanced options in Options Options Options Options ���� New Scripts New Scripts New Scripts New Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

When you use the Page Snapshot option to record a page in Oracle Functional Testing for Web Applications that has captured Abbot applet events, the Java events appear in the ActionsActionsActionsActions list of the Address node properties.

Double-clicking on the Action opens the Event Properties dialog box where the Java Event Details are listed. The Java Event DetailsDetailsDetailsDetails tab shows the applet events in the XML format used by Abbot to capture and represent the components and events. You can edit the XML in this dialog box.

1 Abbot (‘A Better Bot’). The Abbot framework is a Java library that provides methods to reproduce user actions and examine the state of GUI components. The Abbot framework software copyright © 2002 Timothy Wall, All Rights Reserved. See Help Help Help Help ���� About e About e About e About e----TesterTesterTesterTester for additional details about Abbot copyright and licensing.

Page 186: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

166166166166 Functional Testing User's Guide

The XML for a series of applet events is divided into two sections:

♦ Component definitions

♦ Sequence information

The component definitions section lists the applet components. It provides the component information that Abbot needs to be able to execute events against the components.

The following is an example of the XML in the component definitions section: <component id="OK 1" class="javax.swing.JButton" index="0" title="F001SelectOrderOption Form" tag="OK"/> <component id="null.layeredPane 2" class="javax.swing.JLayeredPane" index="1" title="QUOTE_LOOKUP Resource" tag=""/> <component id="ResourceListPanel Instance" class="gui.views.ResourceListPanel" index="0" title="QUOTE_LOOKUP Resource" tag=""/>

The sequence information section lists the actions that are executed against the components. The actions are contained within the <sequence> tags.

Page 187: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 167167167167

The following is an example of the XML in the sequence information section: <sequence> <action args="10000" method="actionDelay"/> <wait timeout="60000" args="new.gif" method="assertComponentShowing"/> <action args="20000" method="actionDelay"/> <action class="javax.swing.AbstractButton" args="new.gif" method="actionClick"/> <action args="10000" method="actionDelay"/> <wait timeout="60000" args="F001SelectOrderOption Form" method="assertFrameShowing"/> <action args="30000" method="actionDelay"/> <action class="javax.swing.AbstractButton" args="JCheckBox Instance" method="actionClick"/> <action args="5000" method="actionDelay"/> <action class="javax.swing.AbstractButton" args="OK 1" method="actionClick"/> <wait invert="true" args="F001SelectOrderOption Form" method="assertFrameShowing"/> </sequence> The following explains some of the types of actions within the <sequence> tag. There are three types of actions within this sequence: <wait timeout="60000" args="new.gif" method="assertComponentShowing"/> This is an assert command that forces the script to wait until a specific applet component or frame is visible before continuing (might also see “assertFrameShowing” or similar). This has a timeout value in milliseconds to keep looping and checking for the component to become visible before continuing. In this example, the action is to look for the component called “new.gif” and if you don’t see it initially keep looping on this for 60 seconds trying to find it before you timeout. As soon as Abbot thinks the component is visible it will break out of the loop and move on. One issue we have seen is that sometimes the applet component will be considered visible but will not be able to accept events for it yet. In this case, you may have to add a fixed delay before the next applet event (described below). <action class="javax.swing.AbstractButton" args="new.gif" method="actionClick"/> This is an action command to execute a click on a particular applet component defined by the “class” and “args” attributes. If the click event is not successful, there is an internal timeout of 10 seconds where it will

Page 188: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

168168168168 Functional Testing User's Guide

keep trying to do the click event before continuing. However, unlike the assert actions, this timeout condition CANNOT be set by the user. This is one of the things that forces us to add more fixed delays. <action args="10000" method="actionDelay"/> This is a fixed delay in milliseconds. In this example, the script will wait 10,000 msec (10 seconds) before continuing. You may want to add a fixed delay after an assert event or before an actionClick event to make sure the applet is really ready before executing an event. However, you need to minimize these fixed delays as much as possible to get accurate timings for applet events since these fixed delays will lengthen the amount of time it takes to run a script regardless of how fast or slow the applet is running.

The key to having accurate timing reported for applet scripts is to reduce or eliminate the number of fixed delays you have in your actions list. The fixed delays are fixed so the script will always wait that amount of time before continuing - regardless of whether the applet is running fast or slow at that point in timeout. It would be preferable to not use these at all and just use the assert command with the timeouts to know when to continue however that does have some limitations as described earlier - since the asserts don’t always reliably tell you when a component is ready to accept events.

For additional information, see the API documentation for the ComponentTester and Robot classes at http://abbot.sourceforge.net.

Page 189: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 169169169169

Advanced Abbot Events The Advanced button opens an additional dialog box for comparing the Playback XML to the Recorded XML.

WinForms Attributes Tab

The WinForms Attributes tabs shows the properties for Events recorded against .NET WinForms.

Page 190: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

170170170170 Functional Testing User's Guide

Control PropertiesControl PropertiesControl PropertiesControl Properties – shows the properties for the WinForm control.

♦ TypTypTypTypeeee – shows the type of WinForm control.

♦ PathPathPathPath – shows the path information for the control.

Playback ExpressionsPlayback ExpressionsPlayback ExpressionsPlayback Expressions – specifies the data and expressions used during playback of the Visual Script.

♦ DataDataDataData – specifies the data to provide to the Data object on playback of the Visual Script.

♦ ScriptScriptScriptScript – specifies the expression used to provide data to the Data object on playback of the Visual Script.

♦ AdvancedAdvancedAdvancedAdvanced – open the advanced Playback properties.

♦ Create DataCreate DataCreate DataCreate Data – specifies the data to provide to the EventData object on playback of the Visual Script.

♦ Create Event DataCreate Event DataCreate Event DataCreate Event Data – specifies the expression used to provide data to the EventData object on playback of the Visual Script.

WinForm PropertiesWinForm PropertiesWinForm PropertiesWinForm Properties – shows the version and assembly information for the WinForm control.

♦ VersionVersionVersionVersion – shows the version number of the WinForm control Dynamic Link Library (DLL).

♦ AssemblyAssemblyAssemblyAssembly – shows the Assembly name of the WinForm control Dynamic Link Library (DLL).

Page 191: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 171171171171

Form Element Properties

This dialog box shows the properties of the currently selected Form Element node of the Visual Script.

The properties are as follows:

PagePagePagePage – the page number and title from the Visual Script.

TypeTypeTypeType – the Visual Script node type: Element.

Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test – when selected, the default existence test is run on playback.

ResultResultResultResult – the result of the existence test: passed or failed.

Form Element PropertiesForm Element PropertiesForm Element PropertiesForm Element Properties – the list of the form element properties in the HTML source.

♦ Property Property Property Property – the form element attribute (i.e. type, name, value, etc.).

♦ Recorded Value Recorded Value Recorded Value Recorded Value – the value of the form element when the Visual Script was recorded. .

♦ Playback ValuePlayback ValuePlayback ValuePlayback Value – the current value of the form element when the Visual Script was played back.

Page 192: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

172172172172 Functional Testing User's Guide

Form Element Test Properties

This dialog box shows the properties of the currently selected Form Element Test node of the Visual Script.

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the test:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Form Element Test.

♦ Execute TestExecute TestExecute TestExecute Test – when selected, the Form element test case is executed on playback.

♦ ResultResultResultResult – the result of the Form element test: passed or failed.

NameNameNameName – a name attribute of the Form element in the HTML source.

Page 193: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 173173173173

Specify Comparison ConditionSpecify Comparison ConditionSpecify Comparison ConditionSpecify Comparison Condition – the comparison condition to use for the test.

♦ Select PropertySelect PropertySelect PropertySelect Property – the properties for the selected Form element. Select the property to test.

♦ Current ValueCurrent ValueCurrent ValueCurrent Value – the value of the Form element when the Visual Script was recorded.

♦ Select Test CriteriaSelect Test CriteriaSelect Test CriteriaSelect Test Criteria – select the type of comparison to perform on playback of the Visual Script:

� Property Must Always be EmptyProperty Must Always be EmptyProperty Must Always be EmptyProperty Must Always be Empty – verify that the selected property is empty.

� Property Must Always be a NumberProperty Must Always be a NumberProperty Must Always be a NumberProperty Must Always be a Number – verify that the selected property contains a number.

� Property Must Always be a StringProperty Must Always be a StringProperty Must Always be a StringProperty Must Always be a String – verify that the selected property contains a text string.

� Property Must Always be in RangeProperty Must Always be in RangeProperty Must Always be in RangeProperty Must Always be in Range – verify that the selected property contains a numeric value that falls within a specified range. You must specify the range expression.

� Property Must Satisfy ExpressionProperty Must Satisfy ExpressionProperty Must Satisfy ExpressionProperty Must Satisfy Expression – verify that the selected property contains a value that evaluates True. You must specify the expression to evaluate.

� Property Must Equal VariableProperty Must Equal VariableProperty Must Equal VariableProperty Must Equal Variable – verify that the selected property contains a value that equals a Data Bank variable value. You must specify the variable in an expression.

♦ Specify ExpressionSpecify ExpressionSpecify ExpressionSpecify Expression – an expression to evaluate that tests the Form element.

Test ResultTest ResultTest ResultTest Result – shows if the expression evaluates True or False when you click the TestTestTestTest button.

♦ TestTestTestTest – tests the expression entered in the Expression text box.

♦ ResultResultResultResult – shows result of the expression evaluation: True, False, or an error message.

Page 194: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

174174174174 Functional Testing User's Guide

Form Node Properties

This dialog box shows the properties of the currently selected Form node of the Visual Script.

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the form:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Form.

♦ NameNameNameName – a name assigned to the Visual Script node.

♦ Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test – when selected, the default existence test is run on playback.

♦ ResultResultResultResult – the result of the existence test: passed or failed.

Form AForm AForm AForm Attributesttributesttributesttributes – attributes of the <FORM> HTML source.

♦ ActionActionActionAction – the Action attribute of the <FORM> tag in the HTML source.

♦ MethodMethodMethodMethod – the Method attribute of the <FORM> tag in the HTML source.

♦ Encoding Encoding Encoding Encoding – the encoding scheme specified by the form in the HTML source.

Page 195: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 175175175175

♦ TargetTargetTargetTarget – the target frame to go to in a Frames-based Web site specified by the form in the HTML source.

HTML Node Properties

This dialog box shows the properties of the currently selected HTML node of the Visual Script.

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the node:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: HTML.

♦ NameNameNameName – a name assigned to the Visual Script node (<None> for HTML).

♦ ExecuExecuExecuExecute Default Comparison Test te Default Comparison Test te Default Comparison Test te Default Comparison Test – when selected, the default existence test is run on playback.

♦ ResultResultResultResult – the result of the existence test: passed or failed.

Page 196: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

176176176176 Functional Testing User's Guide

HTML SourceHTML SourceHTML SourceHTML Source – the HTML source of the page.

ResetResetResetReset – resets the Execute Default Comparison TestExecute Default Comparison TestExecute Default Comparison TestExecute Default Comparison Test option back to the original setting.

ValidateValidateValidateValidate – opens a dialog box for setting HTML validation options and viewing syntax errors and warnings for the page source.

Image Node Properties

This dialog box shows the properties of the currently selected Image node of the Visual Script.

The properties are as follows:

GeGeGeGeneral Propertiesneral Propertiesneral Propertiesneral Properties – specifies the following general information about the node:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Image.

♦ NameNameNameName – the name and location of the image file.

♦ Execute Default Comparison TExecute Default Comparison TExecute Default Comparison TExecute Default Comparison Test est est est – when selected, the default existence test is run on playback.

♦ ResultResultResultResult – the result of the existence test: passed or failed.

Page 197: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 177177177177

Resource Validation Resource Validation Resource Validation Resource Validation – specifies the following resource validation test information:

♦ Execute Validation TestExecute Validation TestExecute Validation TestExecute Validation Test – when selected, the Resource Validation test is run on playback. The Resource Validation verifies that the image exists in the current version of the Web page or application during playback of the Visual Script.

♦ ResultResultResultResult – the result of the validation test: passed or failed.

♦ DetailsDetailsDetailsDetails – the status of the page resource during playback of the Visual Script, as follows:

� AvailableAvailableAvailableAvailable – the resource was found during playback of the Visual Script.

� Host not reachableHost not reachableHost not reachableHost not reachable – Oracle Functional Testing for Web Applications was unable to reach the host of this resource during playback of the Visual Script.

� Link not reachable Link not reachable Link not reachable Link not reachable – Oracle Functional Testing for Web Applications was unable to reach the link of this resource during playback of the Visual Script.

� UnknownUnknownUnknownUnknown – the resource status could not be validated during playback of the Visual Script.

Java Applet Properties

This dialog box shows the properties of the currently selected Java Applet node of the Visual Script.

Page 198: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

178178178178 Functional Testing User's Guide

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the Java Applet:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Java Applet. Java Applet nodes can also include subnodes for the classes used in the applet. The node types vary depending upon the applet but may include Panel, Button, Label, TextArea, etc. The subnode properties dialog box is the same as the Java Applet node.

♦ EEEExecute Default Comparison Test xecute Default Comparison Test xecute Default Comparison Test xecute Default Comparison Test – when selected, the default existence test is run on playback.

♦ ResultResultResultResult – the result of the existence test: passed or failed.

Attribute NameAttribute NameAttribute NameAttribute Name – the name of the Java Applet attribute. The list of Attribute Names will vary depending upon the type of node.

Attribute ValueAttribute ValueAttribute ValueAttribute Value – the value of the Java Applet attribute.

Link Node Properties

This dialog box shows the properties of the currently selected Link node of the Visual Script.

Page 199: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 179179179179

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the node:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Link.

♦ NameNameNameName – the name and location of the linked page.

♦ Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test – when selected, the default existence test is run on playback.

♦ ResultResultResultResult – the result of the existence test: passed or failed.

Resource Validation Resource Validation Resource Validation Resource Validation – specifies the following resource validation test information:

♦ Execute Validation TestExecute Validation TestExecute Validation TestExecute Validation Test – when selected, the Resource Validation test is run on playback. The Resource Validation verifies that the image exists in the current version of the Web page or application during playback of the Visual Script.

♦ ResultResultResultResult – the result of the validation test: passed or failed.

♦ DetailsDetailsDetailsDetails – the status of the page resource during playback of the Visual Script, as follows:

Page 200: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

180180180180 Functional Testing User's Guide

� AvailableAvailableAvailableAvailable – the resource was found during playback of the Visual Script.

� Host not reachableHost not reachableHost not reachableHost not reachable – Oracle Functional Testing for Web Applications was unable to reach the host of this resource during playback of the Visual Script.

� Link not Link not Link not Link not reachable reachable reachable reachable – Oracle Functional Testing for Web Applications was unable to reach the link of this resource during playback of the Visual Script.

� UnknownUnknownUnknownUnknown – the resource status could not be validated during playback of the Visual Script.

Object Properties

This dialog box shows the properties of the currently selected Object or Object Parameter node of the Visual Script.

The properties are as follows:

PagePagePagePage – the page number and title from the Visual Script.

TypeTypeTypeType – the Visual Script node type: Object or Parameter.

Execute Default Comparison TestExecute Default Comparison TestExecute Default Comparison TestExecute Default Comparison Test – when selected, the default existence test is run on playback.

Result Result Result Result – the result of the existence test: passed or failed.

Page 201: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 181181181181

Attribute NameAttribute NameAttribute NameAttribute Name – the name of the Object or Parameter attribute.

Attribute ValueAttribute ValueAttribute ValueAttribute Value – the value of the Object or Parameter attribute.

Page Node Properties

All Visual Script nodes have a basic set of properties that provide information about the node.

The dialog box shows the properties of the currently selected node of the Visual Script. The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the node:

♦ PagePagePagePage – the page name from the Visual Script. The initial recorded page name is based upon the HTML <TITLE> tag. You can rename the page to any other name.

♦ TypeTypeTypeType – the Visual Script node type: Page.

♦ TitleTitleTitleTitle – the title of the page from the HTML <TITLE> tag.

♦ Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test – when selected, the default existence test is run on playback.

♦ ResultResultResultResult – the result of the existence test: passed or failed.

AdvancedAdvancedAdvancedAdvanced – opens a dialog box for specifying advanced settings for Visual Script playback. The Advanced Page Properties are provided for special-case circumstances involving URLs that are changed dynamically. The default settings are the correct settings for the majority of applications. If you experience problems with recording and playing back Visual Scripts in Oracle Functional Testing for Web Applications, the Advanced Page

Page 202: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

182182182182 Functional Testing User's Guide

Properties may need to be changed to resolve the problem. Contact Customer Support for assistance in using the Advanced Page Properties.

Parameter Properties

This dialog box shows the properties of the currently selected Parameter node of the Visual Script.

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the parameter:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Parameter.

♦ NameNameNameName – a name attribute to the form element in the HTML source.

♦ Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test – when selected, the default existence test is run on playback.

♦ ResultResultResultResult – the result of the existence test: passed or failed.

AttributesAttributesAttributesAttributes – the attributes of the Parameter node in the Visual Script.

♦ Recorded ValueRecorded ValueRecorded ValueRecorded Value – the data value captured from a form in a Web page or application during recording of the Visual Script.

♦ Tested ValueTested ValueTested ValueTested Value – the data value captured from a form in a Web page or application during playback of the Visual Script.

Page 203: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 183183183183

♦ Mapped to VariableMapped to VariableMapped to VariableMapped to Variable – the name of the variable mapped to the Parameter node of the Visual Script using the Data Bank Wizard.

Use Default value on play backUse Default value on play backUse Default value on play backUse Default value on play back – when selected, the Visual Script plays back using the value defined with the value= attribute of a name/value pair in the page source. When cleared, the Visual Script plays back using the recorded value or the value from a Data Bank.

Script Node Properties

This dialog box shows the properties of the currently selected Script node of the Visual Script.

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the node:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Script.

Page 204: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

184184184184 Functional Testing User's Guide

♦ NameNameNameName – a name assigned to the Visual Script node (<None> for Scripts).

♦ Execute Default ComparisoExecute Default ComparisoExecute Default ComparisoExecute Default Comparison Test n Test n Test n Test – when selected, the default existence test is run on playback.

♦ ResultResultResultResult – the result of the existence test: passed or failed.

Script SourceScript SourceScript SourceScript Source – the JavaScript or VBScript source from the Web page or application.

Server Response Test Properties

This dialog box shows the properties of the currently selected Server Response test case inserted into the Visual Script.

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Server Response Test.

♦ Execute TestExecute TestExecute TestExecute Test – when selected, the Server Response test case is executed on playback.

Page 205: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 185185185185

♦ ResultResultResultResult – the result of the Server Response test case: passed or failed.

Specify Name and Page InformationSpecify Name and Page InformationSpecify Name and Page InformationSpecify Name and Page Information – specifies the test name and start and stop settings for the Server Response Test. These settings are useful for testing Server Response time across multiple pages, as follows:

♦ NameNameNameName – the user-assigned name for the Server Response Test.

♦ Start test on this pageStart test on this pageStart test on this pageStart test on this page – when selected, the Server Response test starts on this page.

♦ End test on this pageEnd test on this pageEnd test on this pageEnd test on this page – when selected, the Server Response test ends on this page.

Specify Minimum and Maximum Allowed Playback Time Specify Minimum and Maximum Allowed Playback Time Specify Minimum and Maximum Allowed Playback Time Specify Minimum and Maximum Allowed Playback Time – the time attributes of the test, as follows.

♦ Elapsed Time During RecordingElapsed Time During RecordingElapsed Time During RecordingElapsed Time During Recording – actual time required to receive a response from the server during recording of the Visual Script.

♦ Minimum Time AlloMinimum Time AlloMinimum Time AlloMinimum Time Allowed for Playbackwed for Playbackwed for Playbackwed for Playback – the minimum amount of time Oracle Functional Testing for Web Applications will wait to receive a response from the server during playback.

♦ Maximum Time Allowed for PlaybackMaximum Time Allowed for PlaybackMaximum Time Allowed for PlaybackMaximum Time Allowed for Playback – the maximum amount of time Oracle Functional Testing for Web Applications will wait to receive a response from the server during playback.

♦ Elapsed Time During PlaybackElapsed Time During PlaybackElapsed Time During PlaybackElapsed Time During Playback – the actual amount of time required to receive a response from the server during playback.

Page 206: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

186186186186 Functional Testing User's Guide

Soap Properties

This dialog box shows the properties of SOAP XML parameters recorded using the Web Services wizard. The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the node:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Soap: type. Soap nodes can also include subnodes for the Envelope, body, and other parameters the file. The node types vary depending upon the contents of the Soap file.

♦ Execute Default Comparison TestExecute Default Comparison TestExecute Default Comparison TestExecute Default Comparison Test – when selected, the default test for Existence test is run on playback.

♦ ResultResultResultResult – the result of the existence test: passed of failed.

Attribute NameAttribute NameAttribute NameAttribute Name – the name of the Soap attribute. The list of Attribute Names will vary depending upon the type of node.

Attribute ValueAttribute ValueAttribute ValueAttribute Value – the value of the Soap attribute.

Page 207: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

Chapter 4: Working with Visual Scripts 187187187187

Test Scriptlet Properties

This dialog box shows the properties of the currently selected Test Scriptlet node of the Visual Script.

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the node:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Test Scriptlet.

♦ Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test Execute Default Comparison Test – when selected, the default existence test is run on playback.

♦ Result Result Result Result – the result of the existence test: passed or failed.

Return ValuesReturn ValuesReturn ValuesReturn Values – any values returned by the Test Scriptlet.

♦ Number Number Number Number – any return code or error number returned from the Test Scriptlet.

♦ DescriptionDescriptionDescriptionDescription – any text description returned from the Test Scriptlet.

Page 208: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Visual Script Properties

188188188188 Functional Testing User's Guide

Text Matching Test Properties

This dialog box shows the properties of the currently selected Text Matching test case inserted into the Visual Script.

The properties are as follows:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the test

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Text Matching Test.

♦ Execute Test Execute Test Execute Test Execute Test – when selected, the Text Matching test case is executed on playback.

♦ ResultResultResultResult – the result of the Text Matching test: passed or failed.

Text Matching TestText Matching TestText Matching TestText Matching Test – specifies the following information about the test:

♦ NameNameNameName – the user-assigned name of the Text Matching test case.

♦ Pass WhenPass WhenPass WhenPass When – select the type of test:

� Selected text is presentSelected text is presentSelected text is presentSelected text is present – the test case passes if the Selected Text is found in the current Web page or application source.

Page 209: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Settings Manager

Chapter 4: Working with Visual Scripts 189189189189

� Selected text is absentSelected text is absentSelected text is absentSelected text is absent – the test case passes if the Selected TextSelected TextSelected TextSelected Text is not found in the current Web page or application source.

Selected TextSelected TextSelected TextSelected Text – the text string to test for in the Web page or application. You can capture text directly from the Web page or application by highlighting a text string with the mouse before opening the Text Matching test case dialog box. You can enter any text to compare in the Selected TextSelected TextSelected TextSelected Text box, including references to variable names that get values from a Data Bank file. See Using Text Matching Tests in Chapter 5 for information about using the Text Matching test case to verify data driven-tests.

Using the Settings Manager

The Settings Manager is used to set advanced options for Oracle Functional Testing for Web Applications Visual Scripts. The default settings provide for most testing situations and generally do not need to be changed. Also, the majority of the settings correlate directly to Oracle Functional Testing for Web Applications user interface options and settings. The user interface options and settings can be used to specify most global default settings.

In cases where specific Workspaces, Visual Scripts, or even specific pages of Visual Scripts, require different settings from the default settings, you can use the Settings Manager to adjust specific settings. The default settings should be changed only with advice from Customer Support.

To have settings apply to specific Workspaces, Visual Scripts, or pages of Visual Scripts, you can open the Settings Manager specific to a particular level. There are five levels of settings: system, global, workspace, script, and page, as follows:

♦ SystemSystemSystemSystem – default settings defined by the Oracle Application Testing Suite installation. These settings cannot be changed.

♦ GlobalGlobalGlobalGlobal – settings defined using Options Options Options Options ���� Settings Manager Settings Manager Settings Manager Settings Manager ���� Global. Global. Global. Global. Global settings specify the settings that will be used as the default settings for all newly recorded Visual Scripts in all Workspaces. The global level correlates to various options available through the Oracle Functional Testing for Web Applications user interface.

Page 210: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Settings Manager

190190190190 Functional Testing User's Guide

♦ WorkspaceWorkspaceWorkspaceWorkspace – settings defined using Options Options Options Options ���� Settings Manager Settings Manager Settings Manager Settings Manager ���� WorkspaceWorkspaceWorkspaceWorkspace. Workspace settings override global settings and define specific setting values that will be used only by new Visual Scripts recorded in the current Workspace.

♦ ScriptScriptScriptScript – settings defined using Options Options Options Options ���� Settings Manager Settings Manager Settings Manager Settings Manager ���� Script Script Script Script. Script settings override global and Workspaces settings and define specific setting values that will be used only by the current Visual Script.

♦ PagePagePagePage – settings defined using Options Options Options Options ���� Settings Manager Settings Manager Settings Manager Settings Manager ���� Page Page Page Page. Page settings override global, Workspace, and script settings and define specific setting values that will be used only by the selected page of the current Visual Script.

Changing Settings

To use the Settings Manager:

1.1.1.1. Open the Settings Manager at the level where you want to change a setting (global, Workspace, Visual Script, or page).

Page 211: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Settings Manager

Chapter 4: Working with Visual Scripts 191191191191

2.2.2.2. Expand the appropriate category.

3.3.3.3. Double-click the setting name. The setting value changes to either a selector list or a text field.

4.4.4.4. Change the setting value (either by selecting from the list or by entering a string value into a text field).

5.5.5.5. Click OKOKOKOK.

The Settings Manager has the following options:

StandardStandardStandardStandard – when selected, Settings Manager shows a user-definable list of settings. The Standard list is defined by adding a comma-separated string of setting names to the StandardSettings setting in the [Common] section.

ChangedChangedChangedChanged – when selected, Settings Manager shows only settings that have been changed since installation.

AdvancedAdvancedAdvancedAdvanced – when selected, Settings Manager shows all settings in the tree view.

FilteredFilteredFilteredFiltered – when selected, Settings Manager shows in the tree view only the settings that contain the filter text. Filter text can be partial text contained anywhere within a setting name.

Settings TreeSettings TreeSettings TreeSettings Tree – shows various settings by category or filter view. Expand the tree nodes to view the settings.

DescriptionDescriptionDescriptionDescription – provides a brief description of the currently selected setting. The Settings Manager includes expanded descriptions for specific settings. When you select a setting with an expanded description, the Settings Manager shows the description below the settings tree.

Reset Reset Reset Reset – resets all changes made during the current Settings Manager session.

Profiles Profiles Profiles Profiles – opens a dialog box for selecting a pre-defined settings profile for a specific application environment.

Replace Replace Replace Replace – opens a dialog box for selecting the Visual Script(s) in which you want to replace a setting. You must select the setting to change in the Settings Manager tree before clicking the ReplaceReplaceReplaceReplace button. The Replace option only affects script level settings.

Page 212: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Settings Manager

192192192192 Functional Testing User's Guide

The color icons indicate the setting value origin (system, global, Workspace, Visual Script, or page). Initial values are inherited from the system level down to the page level.

Changing Settings Across Multiple Visual Scripts

To change settings across multiple Visual Scripts in a Workspace:

1.1.1.1. Open the Settings Manager at the level where you want to change a setting (global, Workspace, Visual Script, or page).

2.2.2.2. Expand the category.

3.3.3.3. Select the setting to change.

4.4.4.4. Click ReplaceReplaceReplaceReplace. Settings Manager opens a dialog box for specifying which Visual Scripts to change.

5.5.5.5. Select the Visual Script(s) to change and click AddAddAddAdd.

6.6.6.6. Double-click the setting name below the Visual Script list.

7.7.7.7. Change the setting value as needed.

8.8.8.8. Click OKOKOKOK.

Page 213: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Settings Manager

Chapter 4: Working with Visual Scripts 193193193193

Selecting a Profile

The Settings Manager lets you specify a profile that contains pre-defined settings to use for a specific application environment.

To select a profile:

1.1.1.1. Open the Settings Manager at the level where you want to change a setting (global, Workspace, Visual Script, or page).

2.2.2.2. Click ProfileProfileProfileProfile. Settings Manager opens a dialog box for selecting which profile to use.

3.3.3.3. Select the profiles to use from the Setting ProfilesSetting ProfilesSetting ProfilesSetting Profiles list. The settings contained within the profile appear in the SettingsSettingsSettingsSettings list and a description appears at the bottom of the window.

Page 214: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Settings Manager

194194194194 Functional Testing User's Guide

4.4.4.4. Click OKOKOKOK to apply the profile settings or click ResetResetResetReset to clear the profile settings.

Creating Profiles

Profiles for specific environments are defined in .spf files located in the Settings directory below the installation directory. Oracle Functional Testing for Web Applications has a set of pre-defined Profiles. You can also create custom profile files.

To create a profile:

1.1.1.1. Open any ASCII text editor.

2.2.2.2. Type the label: [Description]. 3.3.3.3. Type any text description you want to appear in the description pane

of the Setting Profiles dialog box below the [Description] label.

4.4.4.4. Type the label: [Settings]. 5.5.5.5. Define the list of name=value pairs of Oracle Functional Testing for

Web Applications settings, each on a separate line below the [Settings] label.

Page 215: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Settings Manager

Chapter 4: Working with Visual Scripts 195195195195

6.6.6.6. Save the file using a .spf extension in the Settings directory below the Oracle Application Testing Suite installation directory.

When you open the profiles from the Settings Manger, the file name of the .spf file is the name that will appear in the Settings ProfilesSettings ProfilesSettings ProfilesSettings Profiles list.

The .spf files are ASCII text files with the following format: [Description] Any text description you want to appear in the description pane of the Setting Profiles dialog box. [Settings] The list of name=value pairs of Oracle Functional Testing for Web Applications settings.

For example: [Description] These are the settings commonly used for Siebel 7 eBusiness applications. [Settings] NoAutoPage=True NoAutoPageTimeOut=150000 The available setting names/values are listed in the Settings Manager tree. The settings should be changed only with advice from Customer Support.

Page 216: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Settings Manager

196196196196 Functional Testing User's Guide

[This page intentionally left blank]

Page 217: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

197197197197

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 5555 Using Test Cases

In addition to the automatic existence and resource validation tests, Oracle Functional Testing for Web Applications lets you add specialized test cases to the pages of your Visual Scripts. Oracle Functional Testing for Web Applications includes the following types of test cases: ♦ Text matching ♦ Server response ♦ Form element ♦ Test Scriptlet test before or after playback ♦ Table tests ♦ WinForms test ♦ Siebel test The following sections of this chapter explain each of the test cases and how to use them with Visual Scripts.

Page 218: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

198198198198 Functional Testing User's Guide

Using Text Matching Tests

Text Matching test cases let you detect the presence or absence of complex phrases within the text content of your Web pages. Text Matching test cases can also be stored in a test case library for reuse.

When you insert a Text Matching test, Oracle Functional Testing for Web Applications opens a dialog box for setting the test attributes.

The dialog box has the following options:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the test:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Text Matching test.

♦ Execute TestExecute TestExecute TestExecute Test – when selected, the Text Matching test case is executed on playback.

♦ ResultResultResultResult – the result of the Text Matching test: passed or failed.

Page 219: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

Chapter 5: Using Test Cases 199199199199

Text Matching TextText Matching TextText Matching TextText Matching Text – specifies the following information about the test:

♦ NameNameNameName – enter a name for this test case. A test case name is required.

♦ Pass WhenPass WhenPass WhenPass When – selects the type of test:

� Selected text is presentSelected text is presentSelected text is presentSelected text is present – the test case passes if the Selected TextSelected TextSelected TextSelected Text is found in the current Web page or application source.

� SelecSelecSelecSelected text is absentted text is absentted text is absentted text is absent – the test case passes if the Selected TextSelected TextSelected TextSelected Text is not found in the current Web page or application source.

♦ Selected Text Selected Text Selected Text Selected Text – specifies the text string to match in the Web page or application source. You can capture text directly from the Web page or application by highlighting a text string with the mouse before opening the Text Matching test case dialog box. You can also enter or edit the text manually, or reference Data Bank variables for verifying data-driven tests.

♦ Test ResultTest ResultTest ResultTest Result – shows the current status of the test case.

♦ Select From Test LibrarySelect From Test LibrarySelect From Test LibrarySelect From Test Library – opens the test library to select a previously defined Text Matching test case.

♦ Add to Test LibraryAdd to Test LibraryAdd to Test LibraryAdd to Test Library – stores this test case in the test library.

♦ Test on HTMLTest on HTMLTest on HTMLTest on HTML – performs the Text Matching test case interactively on the current HTML. This button is active only if you edited or entered the Selected Text Selected Text Selected Text Selected Text manually.

The following sections explain how to use the Text Matching test case.

Page 220: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

200200200200 Functional Testing User's Guide

Adding a Text Matching Test Case

To add a Text Matching test case:

1.1.1.1. Be sure the page you want to test is the current page in the Browser pane. (Right-click the mouse and select GGGGoto Pageoto Pageoto Pageoto Page.)

2.2.2.2. Highlight the text (in the Browser) that you want to match using the mouse.

3.3.3.3. Select TestsTestsTestsTests ���� Insert Text Matching TestInsert Text Matching TestInsert Text Matching TestInsert Text Matching Test or click the toolbar button. The highlighted text automatically appears in the Selected TextSelected TextSelected TextSelected Text box of the Insert Text Matching Test dialog box.

NoteNoteNoteNote: You can enter any text to compare in the Selected TextSelected TextSelected TextSelected Text box, including references to variable names that get values from a Data Bank file. The next section explains how to use variables with Text Matching test cases.

4.4.4.4. Enter a test case name.

5.5.5.5. Select the Pass WhenPass WhenPass WhenPass When option:

♦ Selected text is presentSelected text is presentSelected text is presentSelected text is present – the test case passes if the Selected TextSelected TextSelected TextSelected Text is found in the current Web page or application source.

♦ Selected text is absentSelected text is absentSelected text is absentSelected text is absent – the test case passes if the Selected TextSelected TextSelected TextSelected Text is not found in the current Web page or application source.

6.6.6.6. Click OKOKOKOK. The Text Matching test case is added under the Frame node of the Visual Script page.

Page 221: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

Chapter 5: Using Test Cases 201201201201

Using a Text Matching Test Case to Verify a Data-Driven Test

The Text Matching test cases, combined with Data Banks, provide a convenient way to verify the results of a data-driven test. Visual Scripts let you map external data to script parameters using the Data Bank Wizard so that a single script can play back using multiple data items. Text Matching test cases let you compare the results returned by data-driven tests to a Data Bank of “expected results.”

Performing a search using multiple data items is an example of a data-driven test. There are three categories of data for this type of test: ♦ the input data used to perform the search; ♦ the expected results data to use for comparison; ♦ the actual results data returned by the search. When planning a Text Matching data-driven test, you must define the input data and the expected results data. Once you set up the Data Bank and the Text Matching test case in the Visual Script, Oracle Functional Testing for Web Applications automatically compares the actual data returned to the expected results data during playback and returns pass or fail for the test.

Example 7 - Using the Data Bank Wizard on a Registration Form in the Getting Started manual shows an example of creating a data-driven test using Text Matching for verification against static text. The following example provides a step-by-step explanation of how to create a data-driven test using variables in Text Matching test cases and Data Bank data for expected results verification.

Define the Input Data and Expected Results Before creating the Visual Script to perform the test, you should define the input data and the expected result for each input. For example, the Home SuperStores example in the Getting Started tutorial includes a search page for product data. The example in the tutorial uses the search text Lamps, which returns a list of lamp products including the following:

Lunar Pod Lamp :: $18.00

Page 222: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

202202202202 Functional Testing User's Guide

We can make the assumption that if the text Lunar Pod Lamp is in the page returned by the search for Lamps, the search was successful. With known input data and expected results, you can build a Data Bank file with multiple values to use for data-driven testing and verification, as in the following example: Input,Expected Lamps,Lunar Pod Lamp Paints,Exterior Flat House Latex Paint Plants,Bamboo Vase Set Searches for the products Lamps, Paints, and Plants are expected to return the associated text string for a successful search.

The input data and expected results are not limited to single fields. For example, you could set up a test where the input data is a username and password, and the expected result is the first and last name of the user. In this case, the Data Bank file would contain four fields, as follows: username,password,firstname,lastname

The username and password fields are the input data fields and the firstname and lastname fields are the expected result fields. Each record in the Data Bank file would contain the actual data for each of the fields.

The following example shows a Data Bank file with multiple input data fields and expected results fields: username,password,firstname,lastname jsmith,jms04P,John,Smith mmcmillin,mmc46a,Mary,Mcmillin jalexander,jda2a4,Jason,Alexander rromano,rorFX2,Ray,Romano jpurdue,jfp9vs,Jillian,Purdue

The Data Bank file with the input data and expected results should be saved as a .csv file to the DataBank subdirectory of the installation directory (C:\OracleATS\OFT is the default).

Record the Visual Script Once you have created a Data Bank file with the input data and expected results data, you can record a Visual Script that will use the data.

1.1.1.1. Load the data input page for your application into the Browser (for example the search or login page).

Page 223: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

Chapter 5: Using Test Cases 203203203203

2.2.2.2. Start recording a Visual Script.

3.3.3.3. Enter and submit the input data. You can use any representative input data for script recording purposes.

4.4.4.4. Wait for the “results” page to return.

5.5.5.5. Stop recording the Visual Script.

Map and Bind the Data Bank to the Visual Script Once you have the Data Bank file and the Visual Script, you use the Data Bank Wizard to connect the two.

1.1.1.1. Start the Data Bank Wizard.

2.2.2.2. Add new variable names for each field in the Data Bank file. Specify each variable as External External External External ---- Map to External Data Source Map to External Data Source Map to External Data Source Map to External Data Source.

3.3.3.3. Map the variables for the input data fields to the corresponding Visual Script parameters.

Click to Add New Variables Define Variable For Each Data Bank Field

Parameters in Visual Script

Page 224: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

204204204204 Functional Testing User's Guide

4.4.4.4. Click the Data BindingData BindingData BindingData Binding tab.

5.5.5.5. Select the Data Bank file containing the input data and the expected results data.

6.6.6.6. Bind each input data field and each expected results data field to the corresponding variable name in the wizard.

Click to Add Mapping

Select Variable for Input Data

Input Data Variables Mapped to Parameters

Select Script Parameter

Page 225: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

Chapter 5: Using Test Cases 205205205205

7.7.7.7. Click Fetch RecordFetch RecordFetch RecordFetch Record to cycle through the records in the Data Bank file.

8.8.8.8. Click OKOKOKOK to close the Data Bank Wizard.

Insert a Text Matching Test Case After mapping and binding the Data Bank file to the Visual Script, you insert a Text Matching test case into the Visual Script to perform a test for the expected results data. Oracle Functional Testing for Web Applications lets you specify a variable name as part of the Selected Text attribute of the Text Matching test case.

1.1.1.1. Select the “results” page in the Visual Script.

2.2.2.2. Select TestsTestsTestsTests ���� Insert Text Matching Test Insert Text Matching Test Insert Text Matching Test Insert Text Matching Test.

3.3.3.3. Enter a name for the test case.

4.4.4.4. Select the Pass WhenPass WhenPass WhenPass When option (typically set to Selected text is presentSelected text is presentSelected text is presentSelected text is present for data-driven tests).

Select Data Bank File

Select Data Bank Field

Variables Mapped to Data Bank Field Names

Select Variable

Click to Add Binding

Page 226: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

206206206206

5.5.5.5. Type the variable names for the expected results fields into the Selected Selected Selected Selected TextTextTextText box in the form <<var_name>>. You can also enter static text that you expect to be part of the “results” page, as shown below:

6.6.6.6.

7.7.7.7.

Play BaOnMpeItepla

1.1.1.1.

2.2.2.2.

3.3.3.3.

ThOnappaind

Enter Static Text and Variable Names

Functional Testing User's Guide

Click AcceptAcceptAcceptAccept to finish the test case.

Save the Visual Script.

ck the Visual Script with Iterations ce the Data Bank file, Visual Script, mapping and binding, and Text

atching test case are set up, you can play back the Visual Script to rform the test. The Oracle Functional Testing for Web Applications rate feature is used to cycle through data in a Data Bank file on yback.

Select RunRunRunRun ���� Playback Playback Playback Playback ���� Iterate. Iterate. Iterate. Iterate.

Select Playback with DaPlayback with DaPlayback with DaPlayback with Data Bankta Bankta Bankta Bank and Use All RecordsUse All RecordsUse All RecordsUse All Records.

Click OKOKOKOK.

e Visual Script plays back once for each record in the Data Bank file. each playback, the Visual Script passes the input data to the Web

plication, and then the Text Matching test case compares the “results” ge with the data in the “expected results” fields. Any failures are icated by a red flag on the Text Matching node of the Visual Script.

Page 227: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

Chapter 5: Using Test Cases 207207207207

Editing Text Matching Test Cases

To edit a Text Matching test case:

1.1.1.1. Select the test case to edit in the Visual Script.

2.2.2.2. Double-click to open the Modify Text Matching Test dialog box. or: Select AdminAdminAdminAdmin ���� Test LibraryTest LibraryTest LibraryTest Library, select a test case and click ModifyModifyModifyModify.

3.3.3.3. Enter changes and click AcceptAcceptAcceptAccept.

Adding Text Matching Test Cases to the Library

To add Text Matching test cases to the library:

1.1.1.1. Select AdminAdminAdminAdmin ���� Test LibraryTest LibraryTest LibraryTest Library.

2.2.2.2. Click AddAddAddAdd.

3.3.3.3. Enter a test case name.

4.4.4.4. Select the Pass WhenPass WhenPass WhenPass When option.

5.5.5.5. Enter the text to match in the Selected TextSelected TextSelected TextSelected Text edit box.

6.6.6.6. Click AcceptAcceptAcceptAccept in the Text Matching Test dialog box.

7.7.7.7. Click OKOKOKOK in the Administer Test Library dialog box.

or:

1.1.1.1. Insert a new test or edit an existing Text Matching test.

2.2.2.2. Click the Add Test to LibraryAdd Test to LibraryAdd Test to LibraryAdd Test to Library button.

3.3.3.3. Click AcceptAcceptAcceptAccept in the Add Test to Library dialog box.

4.4.4.4. Click AcceptAcceptAcceptAccept in the Text Matching test case dialog box.

Page 228: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Text Matching Tests

208208208208 Functional Testing User's Guide

Using Text Matching Test Cases from the Library

To use a Text Matching test case from the library:

1.1.1.1. Select the page in the Visual Script.

2.2.2.2. Select TestsTestsTestsTests ���� Insert Text Matching TestInsert Text Matching TestInsert Text Matching TestInsert Text Matching Test.

3.3.3.3. Click Select From Test LibrarySelect From Test LibrarySelect From Test LibrarySelect From Test Library.

4.4.4.4. Select the test case name and click OKOKOKOK.

5.5.5.5. Click AcceptAcceptAcceptAccept. The Text Matching test case is added under the Frame node of the Visual Script page.

Deleting Text Matching Test Cases from the Library

To delete a Text Matching test case from the library:

1.1.1.1. Select AdminAdminAdminAdmin ���� Test LibraryTest LibraryTest LibraryTest Library.

2.2.2.2. Select the test case to remove.

3.3.3.3. Click RemoveRemoveRemoveRemove.

4.4.4.4. Click OKOKOKOK.

Deleting Text Matching Test Cases from the Script

To delete a Text Matching test case from the Visual Script:

1.1.1.1. Select the test case node in the Visual Scripts.

2.2.2.2. Click the delete toolbar button.

3.3.3.3. Click YesYesYesYes to confirm or NoNoNoNo to cancel.

Page 229: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Server Response Tests

Chapter 5: Using Test Cases 209209209209

Using Server Response Tests

Server Response test cases measure the response time of a server access of one or more pages in a Visual Script. You can use Server Response test cases to determine how long it takes for the server to return a specific page or a set of pages.

When you insert a Server Response test, Oracle Functional Testing for Web Applications opens a dialog box for setting the test attributes.

Server Response test cases can be run across multiple pages within the current Visual Script and across multiple Visual Scripts when the scripts are run in e-Monitor and Oracle Load Testing for Web Applications.

The PagePagePagePage tab contains the following options:

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the test:

♦ PagePagePagePage – shows the page in the Visual Script where the test case will be added.

♦ TypeTypeTypeType – the Visual Script node type: Server Response Test.

Page 230: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Server Response Tests

210210210210 Functional Testing User's Guide

♦ Execute TestExecute TestExecute TestExecute Test – when selected, the Server Response test case is executed on playback.

♦ ResultResultResultResult – the result of the Server Response test case: passed or failed.

Specify Name and Page SpecificationSpecify Name and Page SpecificationSpecify Name and Page SpecificationSpecify Name and Page Specification – defines the page specifications:

♦ NameNameNameName – specifies the name of the Server Response test.

♦ Start test on this pageStart test on this pageStart test on this pageStart test on this page – when selected, starts the Server Response test on this page.

♦ End test on this pageEnd test on this pageEnd test on this pageEnd test on this page – when selected, ends the Server Response test on this page.

Specify Minimum and Maximum Allowed Playback Time Specify Minimum and Maximum Allowed Playback Time Specify Minimum and Maximum Allowed Playback Time Specify Minimum and Maximum Allowed Playback Time – the time attributes of the test, as follows.

♦ Elapsed TimeElapsed TimeElapsed TimeElapsed Time During Recording During Recording During Recording During Recording – shows the time required to receive a response from the server during recording of the Visual Script.

♦ Minimum Time Allowed for PlaybackMinimum Time Allowed for PlaybackMinimum Time Allowed for PlaybackMinimum Time Allowed for Playback – sets the minimum amount of time Oracle Functional Testing for Web Applications will wait to receive a response from the server during playback.

♦ Maximum Time Allowed for PlaybackMaximum Time Allowed for PlaybackMaximum Time Allowed for PlaybackMaximum Time Allowed for Playback – sets the maximum amount of time Oracle Functional Testing for Web Applications will wait to receive a response from the server during playback.

Adding a Server Response Test Case

To add a Server Response test case:

1.1.1.1. Select the page where you want to start (or end) a Server Response test in the Visual Script.

2.2.2.2. Select TestsTestsTestsTests ���� Insert Server Response TestInsert Server Response TestInsert Server Response TestInsert Server Response Test or click the toolbar button.

3.3.3.3. Enter a name for the Server Response test in the NameNameNameName field.

4.4.4.4. Select the Start test on this pageStart test on this pageStart test on this pageStart test on this page checkbox if you want to start the Server Response test on the current page. - or - Clear the Start test on this pageStart test on this pageStart test on this pageStart test on this page checkbox if you started the Server Response test on a different page.

Page 231: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Server Response Tests

Chapter 5: Using Test Cases 211211211211

5.5.5.5. Select the End test on this pageEnd test on this pageEnd test on this pageEnd test on this page checkbox if you want to end the Server Response test on the current page. - or - Clear the End test on this pageEnd test on this pageEnd test on this pageEnd test on this page checkbox if you want to end the Server Response test on a different page.

6.6.6.6. Enter the minimum and maximum amount of time allowed for playback.

7.7.7.7. Click OKOKOKOK.

Oracle Functional Testing for Web Applications adds the test case to the Visual Script between the Address and Frame nodes.

Editing Server Response Test Cases

To edit a Server Response test case:

1.1.1.1. Select the test case to edit in the Visual Script.

2.2.2.2. Double-click to open the Server Response Test Properties.

3.3.3.3. Enter any changes.

4.4.4.4. Click OKOKOKOK.

Deleting Server Response Test Cases from the Script

To delete a Server Response test case from the Visual Script:

1.1.1.1. Select the test case node in the Visual Scripts.

2.2.2.2. Click the delete toolbar button.

3.3.3.3. Click YesYesYesYes to confirm or NoNoNoNo to cancel.

Page 232: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Form Element Test Cases

212212212212 Functional Testing User's Guide

Using Form Element Test Cases

Form Element test cases compare attributes and values for the elements in HTML forms.

When you insert a Form Element test, Oracle Functional Testing for Web Applications opens a dialog box for setting the test attributes.

This dialog box lets you specify the comparison options for a form element of a page.

General PropertiesGeneral PropertiesGeneral PropertiesGeneral Properties – specifies the following general information about the test:

♦ PagePagePagePage – the page number and title from the Visual Script.

♦ TypeTypeTypeType – the Visual Script node type: Element.

♦ NameNameNameName – a name attribute to the form element in the HTML source.

♦ Execute Existence TestExecute Existence TestExecute Existence TestExecute Existence Test – when selected, the default test for Existence test is run on playback. The Existence test verifies that the node exists

Page 233: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Form Element Test Cases

Chapter 5: Using Test Cases 213213213213

in the current version of the Web page or application during playback of the Visual Script.

♦ ResultResultResultResult – the result of the existence test: passed or failed.

NameNameNameName – enter a name for this test case. A test case name is required.

Specify Comparison ConditionSpecify Comparison ConditionSpecify Comparison ConditionSpecify Comparison Condition – specifies the comparison condition to use for the test.

♦ Select PropertySelect PropertySelect PropertySelect Property – specifies the property to test for the selected Form element. Select the property to test.

♦ Current ValueCurrent ValueCurrent ValueCurrent Value – shows the value of the Form element property when the Visual Script was recorded.

♦ Select Test CriteriaSelect Test CriteriaSelect Test CriteriaSelect Test Criteria – specifies the type of comparison to perform on playback of the Visual Script, as follows:

� Property Must Always be EmpProperty Must Always be EmpProperty Must Always be EmpProperty Must Always be Emptytytyty – verifies that the selected property is empty.

� Property Must Always be a NumberProperty Must Always be a NumberProperty Must Always be a NumberProperty Must Always be a Number – verifies that the selected property contains a number.

� Property Must Always be a StringProperty Must Always be a StringProperty Must Always be a StringProperty Must Always be a String – verifies that the selected property contains a text string.

� Property Must Always be in RangeProperty Must Always be in RangeProperty Must Always be in RangeProperty Must Always be in Range – verifies that the selected property contains a numeric value that falls within a specified range. You must specify the range expression.

� Property Must Satisfy ExpressionProperty Must Satisfy ExpressionProperty Must Satisfy ExpressionProperty Must Satisfy Expression – verifies that the selected property contains a value that evaluates True. You must specify the expression to evaluate.

� Property Must Equal VariableProperty Must Equal VariableProperty Must Equal VariableProperty Must Equal Variable – verifies that the selected property contains a value that equals a Data Bank variable value. You must specify the variable in an expression.

♦ Specify ExpressionSpecify ExpressionSpecify ExpressionSpecify Expression – enter an expression to evaluate.

♦ TestTestTestTest – tests the expression entered in the Specify ExpressionSpecify ExpressionSpecify ExpressionSpecify Expression text box.

♦ ResultResultResultResult – shows if the expression evaluates True or False when you click the TestTestTestTest button.

Page 234: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Form Element Test Cases

214214214214 Functional Testing User's Guide

Adding a Form Element Test Case

To add a Form Element test:

1.1.1.1. Expand the Visual Script page that contains recorded Form Elements.

2.2.2.2. Select the Form Element to test.

3.3.3.3. Select TestTestTestTest ���� Insert Form Element TestInsert Form Element TestInsert Form Element TestInsert Form Element Test.

4.4.4.4. Enter a test case name.

5.5.5.5. Select the Property to compare.

6.6.6.6. Select the Test Criteria.

7.7.7.7. If necessary, enter a comparison expression. The following criteria require an expression: ♦ Property Must Always be in Range ♦ Property Must Satisfy Expression ♦ Property Must Equal Variable

8.8.8.8. Test the result.

9.9.9.9. Click OKOKOKOK.

The Form Element test case is added under the Element node of the Form in the Visual Script.

Page 235: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Form Element Test Cases

Chapter 5: Using Test Cases 215215215215

Form Element Test Case Expressions

Expressions used in the Form Element test cases test properties of the Form element. The following are examples of the valid Form Element expressions:

Property Must Always be in Range: Value >=LOWER_BOUND AND Value <= UPPER_BOUND Value >=Cdate("10/10/01") AND Value<=Date

Property Must Satisfy Expression: Type="text" Name="string" Value=Date Disabled="False|True"

Property Must Equal Variable: Value=DBVarValueOf("var_Search")

See Using Internal Variables in Chapter 8 for additional information about using expressions.

Page 236: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Test Scriptlets

216216216216 Functional Testing User's Guide

Using Test Scriptlets

Test Scriptlets are calls to your own VBScript code snippets that you add to the Oracle Functional Testing for Web Applications Visual Scripts. Oracle Functional Testing for Web Applications includes two menu options for adding Test Scriptlets to Visual Scripts.

♦ Selecting Tests Tests Tests Tests ���� Insert Insert Insert Insert Test Scriptlet Test Scriptlet Test Scriptlet Test Scriptlet ���� Before PageBefore PageBefore PageBefore Page adds a Test Scriptlet that runs before playing back the Visual Script page.

♦ Selecting Tests Tests Tests Tests ���� Insert Insert Insert Insert Test Scriptlet Test Scriptlet Test Scriptlet Test Scriptlet ���� After PageAfter PageAfter PageAfter Page adds a Test Scriptlet that runs after playing back the Visual Script page.

When you add a Test Scriptlet to a Visual Script, the Oracle Functional Testing for Web Applications browser pane changes to a script-editing pane where you can define your own VBScript code as a Test Scriptlet. The following illustration shows the script-editing pane:

When you first add a Test Scriptlet, the script-editing pane only contains the text “Your Script Here.” You add your Test Scriptlet code and comments to define the test.

Script Editing Pane

Test Scriptlet in Visual Script

Page 237: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Test Scriptlets

Chapter 5: Using Test Cases 217217217217

The following illustration shows the script-editing pane with a VBScript code snippet:

Enter your VBScript code into the script-editing pane. Click DoneDoneDoneDone and Save the Visual Script when finished editing the Test Scriptlet.

The code for Test Scriptlet test cases can access the Document Object Model of the Web page, evaluate and modify elements and properties, access Data Bank values, and change Visual Script page navigation programmatically based upon specific conditions.

Oracle Functional Testing for Web Applications includes the Application Programming Interface (API), which provides several methods and properties that you can use when developing Test Scriptlets. Chapter 10 of this manual explains how to use Test Scriptlets to extend your Visual Script testing capabilities. The Oracle Functional Testing for Web Applications Application Programming Reference contains a reference for the API methods and properties that you can use in your custom code.

Test Scriptlet in Script Editing Pane

Page 238: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Table Test Wizard

218218218218 Functional Testing User's Guide

Using the Table Test Wizard

The Table Test Wizard provides a convenient way to create custom tests for specific tables in Web pages. The Table Test properties let you modify an existing Table Test in a Visual Script.

Selecting the Page to Test

Before inserting a test using the Table Test Wizard, the page where you want to add the custom test must be the current page displayed in the Browser pane.

1.1.1.1. Select the page node of the Visual Script where you want to add the table test.

2.2.2.2. Click the right mouse button and select Goto PageGoto PageGoto PageGoto Page. Oracle Functional Testing for Web Applications opens the page in the Browser pane.

When you start the Table Test Wizard, the wizard captures the table from the page in the Browser pane.

Starting the Table Test Wizard The Table Test Wizard creates the test based upon a selected Web page object and the test options you define in the wizard.

Selecting Tests Tests Tests Tests ���� Insert Table Insert Table Insert Table Insert Table TestTestTestTest opens the first panel of the Table Test Wizard. The first panel is where you specify a name for the test.

The Welcome panel has the following options:

Test NameTest NameTest NameTest Name – specifies the name for the Table test. The name identifies the Table test in the Visual Script node.

Enter a test name and click Next Next Next Next to select the table to test.

Selecting a Web Page Table

Clicking NextNextNextNext in the Welcome screen, a window opens that shows the path of the element below the mouse pointer.

Page 239: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Table Test Wizard

Chapter 5: Using Test Cases 219219219219

The Current Path is the object model location of the Web page table currently beneath the mouse cursor. The tables in the browser pane change color to highlight the current Web page table.

The Visual Script pane shows the Web page hierarchy and shows the location of the table, currently below the mouse pointer, in the page source.

Select a Web page table element in the browser pane using the mouse. The selected table element path appears in the top window in the form window[1].table[#].

Click Next.Next.Next.Next. The wizard opens a panel for specifying additional details of the test.

Specifying Test Details

After selecting a table from the Web page, the Table Test Wizard reopens with the table contents and test criteria. The following options are available:

Page 240: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Table Test Wizard

220220220220 Functional Testing User's Guide

The Recorded TableRecorded TableRecorded TableRecorded Table grid shows the content captured from the table element selected in the Web page. The rows and columns correspond to the table in the Web page.

Select or clear the checkbox in the grid cells to include or exclude the table cell from the play back comparison test.

Select or clear the EnabledEnabledEnabledEnabled checkbox to enable or disable the entire table comparison.

Specify the comparison test options in the properties.

Use the TestTestTestTest button in the Test Table TestTest Table TestTest Table TestTest Table Test section to evaluate the test criteria.

Table PathTable PathTable PathTable Path – shows the selected table element path.

Test ElementTest ElementTest ElementTest Element – shows the table cell selected in the Recorded TableRecorded TableRecorded TableRecorded Table grid.

Page 241: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Table Test Wizard

Chapter 5: Using Test Cases 221221221221

Test TypeTest TypeTest TypeTest Type – specifies the type of test: Boolean, Integer, String or Date/Time. The Boolean, Integer, String and Date/Time options are the same as the options for the Custom Object Test. See the Using the Custom Object Test Wizard section in this Chapter for details.

Test Table TestTest Table TestTest Table TestTest Table Test – provides options for evaluating the test criteria. These options let you evaluate the table test criteria. When you click the Test button, the Last Played TableLast Played TableLast Played TableLast Played Table grid appears. The icons in the Last Played Last Played Last Played Last Played TableTableTableTable grid indicate if the table comparison passed or failed.

ResultResultResultResult – shows if the table test passed or failed the comparison test.

DetailsDetailsDetailsDetails – shows which table cells failed the comparison test.

TestTestTestTest – starts the evaluation test and shows or updates the Last Played TableLast Played TableLast Played TableLast Played Table tab.

The icons in the Last Played TableLast Played TableLast Played TableLast Played Table grid indicate if the table comparison passed or failed for each cell in the grid.

Page 242: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the WinForms Test Wizard

222222222222 Functional Testing User's Guide

Click the Recorded TableRecorded TableRecorded TableRecorded Table tab to change any of the test criteria.

Click OKOKOKOK (Properties) or FinishFinishFinishFinish (Wizard) to complete the Table Test definition.

Using the WinForms Test Wizard

The WinForms Test Wizard provides a convenient way to create custom tests for specific WinForm objects in Web pages developed using the .NET framework. The WinForms Test properties let you modify an existing WinForms Test in a Visual Script.

Selecting the Object to Test

Before inserting a test using the WinForms Test Wizard, the page where you want to add the custom test must be the current page displayed in the Browser pane.

1.1.1.1. Select the page node of the Visual Script where you want to add the WinForms test.

2.2.2.2. Click the right mouse button and select Goto PageGoto PageGoto PageGoto Page. Oracle Functional Testing for Web Applications opens the page in the Browser pane.

When you start the WinForms Test Wizard, the wizard captures the WinForms object from the page in the Browser pane.

Starting the WinForms Test Wizard The WinForms Test Wizard creates Visual Script tests based upon a selected WinForm object and the test options you define in the wizard.

Selecting Tests Tests Tests Tests ���� Insert WinForms Insert WinForms Insert WinForms Insert WinForms TestTestTestTest opens the first panel of the WinForms Test Wizard. The first panel is where you specify a name for the test.

The Welcome panel has the following options:

Test NameTest NameTest NameTest Name – specifies the name for the WinForms test. The name identifies the WinForms test in the Visual Script node.

Enter a test name and click Next Next Next Next to select the object to test.

Page 243: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the WinForms Test Wizard

Chapter 5: Using Test Cases 223223223223

Selecting a WinForm Object

Clicking NextNextNextNext in the Welcome screen, a window opens that shows the path of the object below the mouse pointer.

The Current Path is the object model location of the WinForm object currently beneath the mouse cursor. The objects in the browser pane change color to highlight the current object.

Select a WinForm object in the browser pane using the mouse. The selected object path appears in the top window in the form .WinformControls.type.

Click Next.Next.Next.Next. The wizard opens a panel for specifying additional details of the test.

Specifying Test Details

After selecting a WinForm object from the Web page, the WinForm Test Wizard reopens with the object information. The following options are available:

Page 244: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the WinForms Test Wizard

224224224224 Functional Testing User's Guide

The Select path and property panel options are as follows:

Selected WindowSelected WindowSelected WindowSelected Window – specifies the WinForm object selected for testing. The selected element is represented in the form .WinformControls.type.

Choose what you want to testChoose what you want to testChoose what you want to testChoose what you want to test – specifies what part of the object you want to test. Select one of the following options:

♦ TextTextTextText – when selected, the text of the selected WinForm object appears and is used for the test.

♦ PropertiesPropertiesPropertiesProperties – when selected, the object properties of the selected WinForm object appear in the list. The WinForms Test Wizard lets you specify tests for specific properties.

If you select PropertiesPropertiesPropertiesProperties, select the property of the object to test from the list. The Property selection of the Select path and property panel has the following options:

The options are as follows:

PropertyPropertyPropertyProperty – lists the names of the WinForm object properties. The list of properties is specific to the selected object.

ValueValueValueValue – shows the values of the WinForm object properties.

Select the element property to use for the test from the list.

Page 245: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the WinForms Test Wizard

Chapter 5: Using Test Cases 225225225225

Specifying the Type of Test

After selecting the path and property options and clicking NextNextNextNext, the WinForms Test Wizard opens a panel for selecting the type of test to perform. The available options depend upon the type of property to test: String, Boolean, or Numeric. The available options depend upon the type of property.

The String, Boolean, and Numeric options are the same as the options for the Custom Object Test. See the Using the Custom Object Test Wizard section in this Chapter for details.

Click OKOKOKOK (Properties) or FinishFinishFinishFinish (Wizard) to complete the WinForms Test definition.

Page 246: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Siebel Test Wizard

226226226226 Functional Testing User's Guide

Using the Siebel Test Wizard

The Siebel Test Wizard provides a convenient way to create custom tests for specific Siebel application objects. The Visual Script must be a Siebel Enabled Script. See Setting Advanced Options in Chapter 3 for additional information about enabling Siebel options. The Siebel Test properties let you modify an existing Siebel Test in a Visual Script.

Selecting the Object to Test

Before inserting a test using the Siebel Test Wizard, the page where you want to add the custom test must be the current page displayed in the Browser pane.

1.1.1.1. Select the page node of the Visual Script where you want to add the Siebel test.

2.2.2.2. Click the right mouse button and select Goto PageGoto PageGoto PageGoto Page. Oracle Functional Testing for Web Applications opens the page in the Browser pane.

When you start the Siebel Test Wizard, the wizard captures the Siebel object from the page in the Browser pane.

Starting the Siebel Test Wizard The Siebel Test Wizard creates Visual Script tests based upon a selected Siebel object and the test options you define in the wizard.

Selecting Tests Tests Tests Tests ���� Insert Siebel TestInsert Siebel TestInsert Siebel TestInsert Siebel Test opens the first panel of the Siebel Test Wizard. The first panel is where you specify a name for the test.

The Welcome panel has the following options:

Test NameTest NameTest NameTest Name – specifies the name for the Siebel test. The name identifies the Siebel test in the Visual Script node.

Enter a test name and click Next Next Next Next to select the object to test.

Selecting a Siebel Object

Clicking NextNextNextNext in the Welcome screen, a window opens that shows the path of the object below the mouse pointer.

Page 247: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Siebel Test Wizard

Chapter 5: Using Test Cases 227227227227

The Current Path is the object model location of the Siebel object currently beneath the mouse cursor. The objects in the browser pane change color to highlight the current object.

Select a Siebel object in the browser pane using the mouse. The selected object path appears in the top window in the form <Obj ClassName="name."

Click Next.Next.Next.Next. The wizard opens a panel for specifying additional details of the test.

Specifying Test Details

After selecting a Siebel object from the Web page, the Siebel Test Wizard reopens with the object information. The following options are available:

Page 248: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Siebel Test Wizard

228228228228 Functional Testing User's Guide

The Select path and property panel options are as follows:

Selected WindowSelected WindowSelected WindowSelected Window – specifies the Siebel object selected for testing. The selected element is represented in the form <Obj ClassName="name."

Choose what you want to testChoose what you want to testChoose what you want to testChoose what you want to test – specifies what part of the object you want to test. Select one of the following options:

♦ TextTextTextText – when selected, the text of the selected Siebel object appears and is used for the test.

♦ PropertiesPropertiesPropertiesProperties – when selected, the object properties of the selected Siebel object appear in the list. The Siebel Test Wizard lets you specify tests for specific properties.

Page 249: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Siebel Test Wizard

Chapter 5: Using Test Cases 229229229229

If you select PropertiesPropertiesPropertiesProperties, select the property of the object to test from the list. The Property selection of the Select path and property panel has the following options:

The options are as follows:

PropertyPropertyPropertyProperty – lists the names of the Siebel object properties. The list of properties is specific to the selected object.

ValueValueValueValue – shows the values of the Siebel object properties.

Select the element property to use for the test from the list.

Specifying the Type of Test

After selecting the path and property options and clicking NextNextNextNext, the Siebel Test Wizard opens a panel for selecting the type of test to perform. The available options depend upon the type of property to test: String, Boolean, or Numeric. The available options depend upon the type of property.

The String, Boolean, and Numeric options are the same as the options for the Custom Object Test. See the Using the Custom Object Test Wizard section in this Chapter for details.

Click OKOKOKOK (Properties) or FinishFinishFinishFinish (Wizard) to complete the Siebel Test definition.

Page 250: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Siebel Test Wizard

230230230230 Functional Testing User's Guide

[This page intentionally left blank]

Page 251: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

231231231231

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 6666 Working with Test Results

Playing back Visual Scripts compares the recorded baseline (master) of the Web site or application and compares the baseline to the current version (tested version). Test results appear as flags in the Visual Script and in the Results log pane. Oracle Functional Testing for Web Applications provides the following options for working with test results:

♦ Locating and viewing test results

♦ Accepting or discarding tested pages

♦ Ignoring specific differences and test cases

♦ Using the Results log

Locating and Viewing Test Results

After playing back a Visual Script, you need to evaluate any differences that Oracle Functional Testing for Web Applications detects between the baseline and the tested pages.

Visual Scripts nodes with failures are identified with a red flag ( ) next to the node.

Page 252: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Locating and Viewing Test Results

232232232232 Functional Testing User's Guide

Locating Failures in Visual Scripts

To locate failures in the Visual Script:

1.1.1.1. Select ResultsResultsResultsResults ���� Find Next FailureFind Next FailureFind Next FailureFind Next Failure or press the F3 key.

or:

2.2.2.2. Select ResultsResultsResultsResults ���� Find Previous FailureFind Previous FailureFind Previous FailureFind Previous Failure or press the Shift-F3 keys.

You can also expand Visual Script pages manually to locate failure flags.

Viewing HTML Differences

To view HTML differences:

1.1.1.1. Double-click a Different HTML node in the Visual Script.

2.2.2.2. Use the scroll bars to examine the HTML source.

The HTML from the recorded Web page (master) is shown in blue text.

The HTML from the Web page used for playback (tested) is shown in red text.

Page 253: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Locating and Viewing Test Results

Chapter 6: Working with Test Results 233233233233

Oracle Functional Testing for Web Applications uses a heuristic program to determine and exclude machine-generated components of Web page source that can change dynamically (i.e. session IDs) when visiting a site. The machine-generated components will not be tested and will not cause red flags to be generated in the Visual Script during playback. Any HTML that is excluded from the playback comparison is shown in dark blue text.

Use the PreviousPreviousPreviousPrevious and NextNextNextNext buttons to navigate between areas of HTML differences.

The Different HTML node only appears in the Visual Script after playback if differences are found in the HTML for a Web page.

Viewing JavaScript/VBScript Differences

To view JavaScript/VBScript differences:

1.1.1.1. Double-click a Different Script node in the Visual Script.

2.2.2.2. Use the PreviousPreviousPreviousPrevious and NextNextNextNext buttons to examine the Script source.

Page 254: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Accepting and Discarding Tested Pages

234234234234 Functional Testing User's Guide

The Script from the recorded Web page (master) is shown in blue text. The Script from the Web page used for playback (tested) is shown in red text.

The Different Script node only appears in the Visual Script after playback if differences are found in the JavaScript or VBScript for a Web page.

Any JavaScript/VBScript that is excluded from the playback comparison is shown in dark blue text.

Accepting and Discarding Tested Pages

When you play back a Visual Script against a new version of a Web page or application, Oracle Functional Testing for Web Applications compares the baseline Visual Script to the Web page or application. If there are differences, Oracle Functional Testing for Web Applications creates a “tested version” of the Visual Script and flags those differences in the Visual Script pane.

Accepting Tested Pages

Accepting tested pages means that the tested version of the Visual Script is used as the new baseline (master) Visual Script for future testing of the Web page or application.

You can accept the tested version of the Visual Script on a page-by-page basis or for the entire Visual Script. To accept tested pages:

♦ Select a specific page node and then select Accept Tested PageAccept Tested PageAccept Tested PageAccept Tested Page from the right-click shortcut menu. - or - Select ResultsResultsResultsResults ���� Accept All Tested PagesAccept All Tested PagesAccept All Tested PagesAccept All Tested Pages.

Discarding Tested Pages

Discarding tested pages means that the tested version of the Visual Script is deleted and the original baseline (master) Visual Script will be used for future testing of the Web page or application.

Page 255: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Ignoring Specific Failures and Test Cases

Chapter 6: Working with Test Results 235235235235

You can discard the tested version of the Visual Script on a page-by-page basis or for the entire Visual Script. To discard tested pages:

♦ Select a specific page node and then select Discard Tested PageDiscard Tested PageDiscard Tested PageDiscard Tested Page from the right-click shortcut menu. - or - Select ResultsResultsResultsResults ���� Discard All Tested PagesDiscard All Tested PagesDiscard All Tested PagesDiscard All Tested Pages.

Ignoring Specific Failures and Test Cases

In some cases, you may want to ignore specific failures or test cases. For example, when testing search results pages, you know the HTML source for the page will be different each time. In this case, you can have the Visual Script ignore comparison failures on the HTML node of the script.

Ignoring Specific Failures on Playback

To ignore a specific failure on playback:

1.1.1.1. Select the node with a failure in the Visual Script.

2.2.2.2. Click the right mouse button and select Ignore (type) Test FailureIgnore (type) Test FailureIgnore (type) Test FailureIgnore (type) Test Failure from the popup menu.

Nodes with ignored test failures are identified with red and yellow flags ( ) next to the node.

Ignoring a Specific Test Case on Playback

To ignore a specific test case on playback:

1.1.1.1. Select the test case node in the Visual Script.

2.2.2.2. Click the right mouse button and select Ignore (type) TestIgnore (type) TestIgnore (type) TestIgnore (type) Test from the popup menu.

Nodes with ignored tests are identified with a yellow flag ( ) next to the node.

Page 256: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

236236236236 Functional Testing User's Guide

Using the Results Log

In addition to the flags used in the Visual Scripts, the Results log shows the following additional details about playback results.

Drag to Adjust Width

Playback Results Summary

Test #Test #Test #Test # – the test number within an Oracle Functional Testing for Web Applications session. Each playback of the Visual Script increments the Test #Test #Test #Test #.

TimeTimeTimeTime – the time and date of the test action.

IterationIterationIterationIteration – the iteration number if playback iterations were used.

ActionActionActionAction – the playback action. The ActionActionActionAction column always shows the beginning and ending time and date of the Visual Script playback. Other information can be listed in the ActionActionActionAction column depending upon the settings in the result log options and playback options. You can set the options in the ReportReportReportReport section of OptionsOptionsOptionsOptions ���� Results LogResults LogResults LogResults Log to show failures only or all details. You can also set the playback options to automatically run the Resource Validation test after playback. The ActionActionActionAction column also shows the results of the Resource Validation test.

Elapsed TimeElapsed TimeElapsed TimeElapsed Time – the amount of time required to initiate a request (for example, user input) and receive a response from the server and display the page components (HTML, images, links, etc.).

ResultResultResultResult – the test result: passed or failed.

SummarySummarySummarySummary – shows additional information about failed tests.

See the next section, Analyzing Results Log Timelines, for additional information about the TimeTimeTimeTime and Elapsed TimeElapsed TimeElapsed TimeElapsed Time information.

Page 257: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

Chapter 6: Working with Test Results 237237237237

Analyzing Results Log Timelines

The result log TimeTimeTimeTime and Elapsed TimeElapsed TimeElapsed TimeElapsed Time columns provide a way for you to analyze and measure the efficiency of your Web pages or application. The following are guidelines for analyzing the start/stop times for Visual Scripts and the elapsed time for individual pages.

Visual Script page playback includes the following basic timeline components:

RequestRequestRequestRequest ResponseResponseResponseResponse Test CasesTest CasesTest CasesTest Cases Think TimeThink TimeThink TimeThink TimeAction Initiatedthrough Browser(User Input)

Display PageComponents(HTML, ImagesLinks, etc. )

Automatic TestsCases (HTMLValidation, FormsLinks, Images, etc.)

Time Spent BetweenActions Intiatedthrough Browser(Recorded Delay)

Elapsed TimeTimeline 1

Timeline 2

Timeline 3

Elapsed Time + Test Case Time

Elapsed Time + Test Case Time + Recorded Delay

Visual ScriptVisual ScriptVisual ScriptVisual ScriptPlaybackPlaybackPlaybackPlaybackTimelinesTimelinesTimelinesTimelines

The RequestRequestRequestRequest component is the moment a user action is initiated from within the browser to the server. This can be a click on a link to another page, a form submission, or other action that requires a response from the server.

The ResponseResponseResponseResponse component is the amount of time it takes for the server to process the request and return all components of the requested page.

The Test CasesTest CasesTest CasesTest Cases component is the amount of time it takes to perform the default existence and validation tests of the Visual Script plus the time it takes to complete any user inserted test cases (for example text matching or server response test cases).

The Think TimeThink TimeThink TimeThink Time component is the actual amount of time that occurred between page navigation when the Visual Script was recorded. Visual Scripts can be played back with or with out the recorded delay by setting or clearing the Play with Recorded Delay Between PagesPlay with Recorded Delay Between PagesPlay with Recorded Delay Between PagesPlay with Recorded Delay Between Pages check box in the Playback Options.

Page 258: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

238238238238 Functional Testing User's Guide

When analyzing Results logs, you can use the timestamp to determine the amount of time required to playback a specific page or the entire Visual Script.

Overall Visual Script Time (10:59:57 - 10:59:34 = 23 seconds)

Specific Page Time (10:59:52 - 10:59:47 = 5 seconds)

The timestamp times include the Request, Response, Test Case, and Recorded Delay times of the playback run (either Timeline 2 or Timeline 3 on the previous page).

You can also evaluate the effects of the recorded delay on page playback. The following example shows the log with the results from two different playbacks of the same Visual Script. The first playback (Test#Test#Test#Test# 1) did not use the recorded delay for playback. The second playback (Test#Test#Test#Test# 2) did use the recorded delay (think time).

Without Recorded Delay (10:59:57 - 10:59:34 = 23 seconds)

With Recorded Delay (11:00:55 - 11:00:15 = 40 seconds)

Page 259: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

Chapter 6: Working with Test Results 239239239239

Setting Results Log Options

The Results log options is where you specify the log file name, the logging mode and the type of data to include in the log.

Select Results LogResults LogResults LogResults Log in the Results section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

This dialog box lets you specify the Results log file name and mode.

Log File NameLog File NameLog File NameLog File Name – specifies how to name the Results log file, as follows:

♦ Default to script nameDefault to script nameDefault to script nameDefault to script name – when selected, the Results log file name is the same name as the current Visual Script file with a .LOG extension.

♦ Default to workspace nameDefault to workspace nameDefault to workspace nameDefault to workspace name – when selected, the Results log file name is the same name as the current Workspace with a .LOG extension.

♦ Use specified nameUse specified nameUse specified nameUse specified name – when selected, you can specify any name. Enter the name in the text box.

♦ Prepend workstation name to log file namePrepend workstation name to log file namePrepend workstation name to log file namePrepend workstation name to log file name – when selected, the name of the workstation is added to the beginning of the log file name.

Page 260: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

240240240240 Functional Testing User's Guide

Logging ModeLogging ModeLogging ModeLogging Mode – specifies how to write to the log file, as follows:

♦ Overwrite logOverwrite logOverwrite logOverwrite log – when selected, Oracle Functional Testing for Web Applications overwrites the Results log file with new results data each time the Visual Script is played back.

♦ Append to logAppend to logAppend to logAppend to log – when selected, Oracle Functional Testing for Web Applications appends results data to the end of current Results log file during Visual Script playback.

♦ Do not logDo not logDo not logDo not log – when selected, Oracle Functional Testing for Web Applications does not write results data to the log file. The results data still appears in the Results log pane of Oracle Functional Testing for Web Applications.

ReportReportReportReport – specifies the type of data to include in the Results log, as follows:

♦ Failures onlyFailures onlyFailures onlyFailures only – when selected, Oracle Functional Testing for Web Applications includes only failure indications in the Results log.

♦ All detailsAll detailsAll detailsAll details – when selected, Oracle Functional Testing for Web Applications includes all testing details in the Results log.

Showing and Hiding the Results log Pane

To show or hide the Results log window:

♦ Select ViewViewViewView ���� Resize Results WindowResize Results WindowResize Results WindowResize Results Window.

Selecting a Visual Script Page from the Results Log

To select a Visual Script page from the Results log:

1.1.1.1. Double click the corresponding number in the Test #Test #Test #Test # column of the Results log.

Double-Click Number to View Page

Page 261: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

Chapter 6: Working with Test Results 241241241241

2.2.2.2. Right-click on the page name in the Visual Script and select Expand Expand Expand Expand PagePagePagePage to view the Visual Script for the page.

The Test #Test #Test #Test # must be from the last playback cycle in the Results log.

Viewing Resource Validation Results from the Results Log

To view Resource Validation from the Results log:

Double-click the corresponding number in the Test #Test #Test #Test # column for the Resource Validation entry of the Results log.

Resource Validation Log Entry

Double-Click to View Validation

Oracle Functional Testing for Web Applications open the Resource Validation window with the results from the last time the Resource Validation test was run.

Appending to the Results Log

To append to a Results log file:

1.1.1.1. Select OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriCurrent ScriCurrent ScriCurrent Scriptptptpt.

2.2.2.2. Select Result LogResult LogResult LogResult Log in the Results options.

3.3.3.3. Select Append to logAppend to logAppend to logAppend to log.

4.4.4.4. Click OKOKOKOK.

5.5.5.5. Play back the Visual Script.

Page 262: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

242242242242 Functional Testing User's Guide

Exporting the Results Log

To export the contents of the Oracle Functional Testing for Web Applications Results log pane:

1.1.1.1. Select File File File File ���� Export Output Log AsExport Output Log AsExport Output Log AsExport Output Log As. Oracle Functional Testing for Web Applications opens a dialog box for saving the file.

2.2.2.2. Enter a file name and click OKOKOKOK.

You can use any ASCII editor to view or print the file.

The following is an example of a Results log exported to an ASCII file: Test 1 Time:12:36:57PM 2/3/00 Action:BEGIN TESTING SCRIPT:Script2 Test 1 Time: 12:36:58 PM 2/3/00 Action: [1] Welcome Elapsed Time: 0.07 secs Result: Failed Summary: Different HTML Test 1 Time: 12:36:58 PM 2/3/00 Action:[2] Kitchens Elapsed Time: 0.14 secs Result: Failed Summary: Different HTML Test 1 Time: 12:36:58 PM 2/3/00 Action:[3] Lighting Elapsed Time: 0.15 secs Result: Passed Test 1 Time:12:36:58PM 2/3/00 Action:END TESTING SCRIPT:Script2

Saving Results Log Files

To save a Results log file:

1.1.1.1. Select FileFileFileFile ���� Save Output Log AsSave Output Log AsSave Output Log AsSave Output Log As.

2.2.2.2. Enter a file name and click OKOKOKOK.

Oracle Functional Testing for Web Applications saves Results log files to the current Workspace as the default location. The Workspace is a user-specified subdirectory of the installation directory (C:\OracleATS\OFT is the default).

The Results log file is save in an Oracle Functional Testing for Web Applications format that can be viewed or exported to an ASCII file using ResultsResultsResultsResults ���� View Results View Results View Results View Results LogLogLogLog.

Overwriting Results Logs

To overwrite a Results log:

Page 263: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

Chapter 6: Working with Test Results 243243243243

1.1.1.1. Select OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

2.2.2.2. Select Result LogResult LogResult LogResult Log in the Results options.

3.3.3.3. Select Overwrite logOverwrite logOverwrite logOverwrite log.

4.4.4.4. Click OKOKOKOK.

5.5.5.5. Play back the Visual Script.

Clearing the Results Log Window

To clear the Results log window:

♦ Select ViewViewViewView ���� Clear Results WindowClear Results WindowClear Results WindowClear Results Window.

Viewing Saved Results Logs in Oracle Functional Testing for Web Applications

To view a saved Results log file in Oracle Functional Testing for Web Applications:

1.1.1.1. Select ResultsResultsResultsResults ���� View Results Log View Results Log View Results Log View Results Log.

2.2.2.2. Select the log file from the Select Results LogSelect Results LogSelect Results LogSelect Results Log list. The Results log file contains the following information:

Select Results LogSelect Results LogSelect Results LogSelect Results Log – specifies the name of the log file to view.

Page 264: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

244244244244 Functional Testing User's Guide

ExportExportExportExport – exports the Results log to a file. Select the type of file (Text or HTML).

Session #Session #Session #Session # – shows the number of the Oracle Functional Testing for Web Applications session..

Test #Test #Test #Test # – shows the test number within an Oracle Functional Testing for Web Applications session. Each playback of the Visual Script increments the Test #Test #Test #Test #.

TimeTimeTimeTime – shows the start time and date for the test action.

IterationIterationIterationIteration – shows the iteration number if playback iterations were used.

ActionActionActionAction – shows the playback action.

Elapsed TimeElapsed TimeElapsed TimeElapsed Time – shows the amount of time required to test the page.

ResultResultResultResult – shows the test result: passed or failed.

SummarySummarySummarySummary – shows additional information about failed tests.

Exporting Saved Results Logs

To export a saved Results log to an ASCII file or an HTML file:

1.1.1.1. Select ResultsResultsResultsResults ���� View Results Log View Results Log View Results Log View Results Log.

Page 265: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Results Log

Chapter 6: Working with Test Results 245245245245

2.2.2.2. Select the log file from the Select Results LogSelect Results LogSelect Results LogSelect Results Log list.

3.3.3.3. Select the type of file (Text or HTML).

3.3.3.3. Click ExpoExpoExpoExportrtrtrt. Oracle Functional Testing for Web Applications opens a dialog box for saving the file.

4.4.4.4. Enter a file name and click OKOKOKOK.

Viewing Saved Results Logs in a Browser

To view a saved Results log file in HTML format in a Browser:

1.1.1.1. Open and play back the Visual Script for which you want to view results.

2.2.2.2. Select ResultsResultsResultsResults ���� View Results Log View Results Log View Results Log View Results Log.

3.3.3.3. Export the results log to HTML.

4.4.4.4. Open the file in a browser.

The browser version of the results log contains the same information as in the Oracle Functional Testing for Web Applications Results Log Viewer.

Deleting Results Logs

To delete a Results log file:

1.1.1.1. Select AdminAdminAdminAdmin ���� Result Log ManagerResult Log ManagerResult Log ManagerResult Log Manager.

2.2.2.2. Select the log file to delete and click DeleteDeleteDeleteDelete.

3.3.3.3. Click YesYesYesYes to confirm.

Page 266: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Results Reports

246246246246 Functional Testing User's Guide

Using Results Reports

Oracle Functional Testing for Web Applications can generate a results report after each play back of a Visual Script. The results report contains results for an individual play back of the Visual Script. You can specify options that determine what information is included in the report and where the report files are saved.

To view a Visual Script results report:

1.1.1.1. Set the Result Report options (see next section).

2.2.2.2. Play back a Visual Script (see Note 1 below).

3.3.3.3. If necessary, expand the nodes in the summary table and click the links to view information on specific pages and iterations (see Note 2 below).

NNNNotes:otes:otes:otes:

1. If you did not select Show Report after playbackShow Report after playbackShow Report after playbackShow Report after playback, use ResultsResultsResultsResults ���� View View View View Results ReportResults ReportResults ReportResults Report to open the report in a browser.

2. The Results Report uses active content. If the links in the report are not working, check if the browser shows the restricted active content security warning at the top of the browser. If so, click on the warning and select Allow Blocked ContentAllow Blocked ContentAllow Blocked ContentAllow Blocked Content. Use the browser Internet Options to set the default settings for allowing active content. Select Tools Tools Tools Tools ���� Internet OptionsInternet OptionsInternet OptionsInternet Options ���� AdvancedAdvancedAdvancedAdvanced tab. Select the Allow active Allow active Allow active Allow active content to run in files...content to run in files...content to run in files...content to run in files... setting under the Security section if you do not want the restricted active content security warning to appear each time the Results Report is generated.

Page 267: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Results Reports

Chapter 6: Working with Test Results 247247247247

Setting Results Report Options

Select Results ReportResults ReportResults ReportResults Report in the Results section of OptionsOptionsOptionsOptions ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script to open the options:

This dialog box specifies what information to include in a Visual Script playback results report and where to store the report files. The following options are available:

Results ReportResults ReportResults ReportResults Report – specifies the report creation options and location to store the files.

♦ Automatically create report after script playbackAutomatically create report after script playbackAutomatically create report after script playbackAutomatically create report after script playback – when selected, Oracle Functional Testing for Web Applications automatically generates a playback report when Visual Script playback finishes. Use Show Report after playbackShow Report after playbackShow Report after playbackShow Report after playback or select ResultsResultsResultsResults ���� View Playback Report View Playback Report View Playback Report View Playback Report after playback finishes to open the report in a browser window.

♦ Collect data after each iterationCollect data after each iterationCollect data after each iterationCollect data after each iteration – when selected, the report includes play back results for each iteration of a Visual Script played back with a Data Bank.

Page 268: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Results Reports

248248248248 Functional Testing User's Guide

♦ Show report after playbackShow report after playbackShow report after playbackShow report after playback – when selected, Oracle Functional Testing for Web Applications automatically opens and displays the report in the specified location. Specify the location option.

� Show in browser paneShow in browser paneShow in browser paneShow in browser pane – when selected, the results report appears in the Oracle Functional Testing for Web Applications browser pane replacing the last page of the Visual Script.

� Show in new windowShow in new windowShow in new windowShow in new window – when selected, the results report appears in a new IE Web browser window. The last page of the Visual Script remains in the Oracle Functional Testing for Web Applications browser pane.

♦ Report locationReport locationReport locationReport location – specifies the drive and directory location where the Visual Script playback report will be saved.

Changing Results Report Settings

To set Result Report options:

1.1.1.1. Select Options Options Options Options ���� New Scripts New Scripts New Scripts New Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script.

2.2.2.2. Select Results ReportResults ReportResults ReportResults Report in the Results options.

3.3.3.3. Select Automatically create files after script playbackAutomatically create files after script playbackAutomatically create files after script playbackAutomatically create files after script playback to automatically generate the report each time the Visual Script is played back.

4.4.4.4. Select Collect data after every iterationCollect data after every iterationCollect data after every iterationCollect data after every iteration if playing back iterations on a Visual Script that has a Data Bank.

5.5.5.5. If desired, select Show Report after playbackShow Report after playbackShow Report after playbackShow Report after playback and specify where you want the report to appear (either the Oracle Functional Testing for Web Applications Browser pane or a new browser window).

6.6.6.6. Specify the drive and directory location where you want to save the report files in the Report LocationReport LocationReport LocationReport Location field.

7.7.7.7. Click OKOKOKOK.

8.8.8.8. Play back the Visual Script. The report appears in the selected location.

If you did not select Show Report after playbackShow Report after playbackShow Report after playbackShow Report after playback, use ResultsResultsResultsResults ���� Vie Vie Vie View w w w Results ReportResults ReportResults ReportResults Report to open the report in a browser.

Page 269: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Results Reports

Chapter 6: Working with Test Results 249249249249

The following window shows a sample report:

9.9.9.9. If necessary, expand the nodes in the summary table and click the links to view information on specific pages and iterations (see Notes at the beginning of this section).

Page 270: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Results Reports

250250250250 Functional Testing User's Guide

The following the expanded script details table and Test Results Summary.

10.10.10.10. Click on the links in the table to go to that section of the report.

Page 271: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

251251251251

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 7777 Using e-Spider

The e-Spider automatically searches the HTML pages that make up your Web site or Web application. The e-Spider allows you to quickly and easily generate a Visual Script from a set of linked pages without having to manually navigate the pages.

The e-Spider will not follow any links that use a protocol other than Http or Https. It automatically ignores links such as News, Telnet, FTP, MailTo, etc.

The e-Spider automatically dismisses confirmation dialogs box that appear for links to downloadable executables or documents and marks these links with yellow flags. The e-Spider does not list links to documents in other domains and will not follow them.

NoteNoteNoteNote: If you have a very large site or application, it is not advisable to try to spider the entire site from the home page due to time and system resource issues. A more efficient approach is to identify related sections of your site or application and create a set of modular Visual Scripts by first manually navigating to a specific section and then starting e-Spider.

e-Spider is hidden by default. Use the Settings Manager to set the SSVisible setting in the site spider tree to True to add the e-Spider option to the ToolsToolsToolsTools menu. Restart Oracle Functional Testing for Web Applications after changing the setting.

Page 272: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

252252252252

Main Window Features

This section explains the main window, the menu options, and the associated toolbar buttons. The e-Spider main window consists of the menu bar, toolbar, address line, site map tree, and a status line.

File Men

Title Bar and Menu

Toolbar

Starting URL or File

Site Map Tree

S

tatus Line

Functional Testing User's Guide

The Title bar of the window shows the program name followed by the current Map file name and the status.

u

The File menu options let you work with e-Spider Map files. The following options are available:

New Site MapNew Site MapNew Site MapNew Site Map – clears the e-Spider tree window for creating a new map file.

Open Site MapOpen Site MapOpen Site MapOpen Site Map – opens a dialog box for selecting the map file to open.

Save Site MapSave Site MapSave Site MapSave Site Map – saves the current e-Spider tree to a file. If you have not saved the file previously, a dialog box opens for specifying the name.

Save Site Map AsSave Site Map AsSave Site Map AsSave Site Map As – saves the current e-Spider tree to a new file name. A dialog box opens for specifying the name.

Export Site Map AsExport Site Map AsExport Site Map AsExport Site Map As – exports the e-Spider map to an ASCII file.

ExitExitExitExit – closes the e-Spider.

Page 273: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

Chapter 7: Using e-Spider 253253253253

Edit Menu

The Edit menu options let you specify the pages to include when spidering a site. The following options are available:

Ignore PageIgnore PageIgnore PageIgnore Page – the page and all pages linked below the page will not be included when you run the e-Spider and/or generate a Visual Script.

Ignore All Other PagesIgnore All Other PagesIgnore All Other PagesIgnore All Other Pages – all other pages in the e-Spider tree will not be included when you generate a Visual Script.

Append Page to TreeAppend Page to TreeAppend Page to TreeAppend Page to Tree – appends a results page generated by a form page to the e-Spider tree.

Delete PageDelete PageDelete PageDelete Page – removes the selected page from the e-Spider tree.

Exclude URLsExclude URLsExclude URLsExclude URLs – the selected URLs will not be included when you run the e-Spider and/or when you generate a Visual Script.

Run Menu

The Run menu options let you start, stop, and continue the e-Spider. You can also generate Visual Scripts. The following options are available:

StartStartStartStart – starts searching pages that make-up the Web site or application. The starting point is the URL specified in the AddressAddressAddressAddress drop down list.

ContinueContinueContinueContinue – continues searching the pages.

Generate Visual ScriptGenerate Visual ScriptGenerate Visual ScriptGenerate Visual Script – generates a Visual Script based upon the pages in the e-Spider tree.

StopStopStopStop – stops the e-Spider.

Set Maximum LevelsSet Maximum LevelsSet Maximum LevelsSet Maximum Levels – opens a dialog box for specifying the maximum number of levels to spider.

Tools Menu

The Tools menu options let you access other tools in the Oracle Application Testing Suite. The following options are available:

Oracle Functional Testing for Web ApplicationOracle Functional Testing for Web ApplicationOracle Functional Testing for Web ApplicationOracle Functional Testing for Web Applicationssss – switches focus to the Oracle Functional Testing for Web Applications window.

Page 274: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Main Window Features

254254254254 Functional Testing User's Guide

Oracle Load Testing for Web ApplicationsOracle Load Testing for Web ApplicationsOracle Load Testing for Web ApplicationsOracle Load Testing for Web Applications – starts Oracle Load Testing for Web Applications for running load and performance testing on Web applications.

Help Menu

These options let you access the e-Spider on-line help.

Address Line

The AddressAddressAddressAddress line shows the top level URL where e-Spider starts scanning Web pages. By default, e-Spider enters the URL of the page currently displayed in the Browser pane of the Oracle Functional Testing for Web Applications main window. However, you can also type a URL manually.

Site Map Tree

The map tree shows the hierarchy of the Web pages under the top-level page. The icons represent the following:

IconIconIconIcon DescriptionDescriptionDescriptionDescription

Plus icon – node has lower level nodes.

Minus icon – node fully expanded.

White with planet – original.

Blue with planet – completed.

White with red border – stopped by user.

Yellow flag – ignore page when generating Visual Script.

“x” flag – child pages have been deleted from Spider tree.

“F” flag – page with a form.

“T” flag – page with a frame transition.

“Yellow bar” left of planet – page did not complete successfully or timed out.

Page 275: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Setting Maximum Navigation Depth

Chapter 7: Using e-Spider 255255255255

Status Bar

The status bar provides status and current progress information. The mode determines the information that appears in the status bar. The status bar panes from left to right are as follows:

Spider Status – shows the current status of e-Spider.

Current Site – shows the current location.

Count – shows the number of pages navigated by e-Spider.

Setting Maximum Navigation Depth

The e-Spider allows you to specify the maximum depth to which it navigates through your Web site or application. To set the maximum navigation depth, select RunRunRunRun ���� Set Maximum LevelsSet Maximum LevelsSet Maximum LevelsSet Maximum Levels. Enter the number of levels and click OKOKOKOK.

Working with e-Spider

e-Spider provides a convenient way to map an entire Web site or application with manual navigation. You can use e-Spider to do the following: ♦ Create a tree hierarchy of the site ♦ Append pages to the tree ♦ Delete pages from the tree ♦ Ignore pages in the tree ♦ Exclude specific URLs ♦ Generate a Visual Script from the tree ♦ Save the tree to a map file.

Starting e-Spider

To start the e-Spider:

1.1.1.1. Load the Web page or application to start from into the Oracle Functional Testing for Web Applications Browser pane.

2.2.2.2. Select ToolsToolsToolsTools ���� e e e e----SpiderSpiderSpiderSpider or click the toolbar button.

3.3.3.3. In the e-Spider window, select Run Run Run Run ���� Start Start Start Start or click the toolbar button.

Page 276: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with e-Spider

256256256256 Functional Testing User's Guide

4.4.4.4. Wait for the e-Spider to finish or click the Stop button.

NoteNoteNoteNote: The e-Spider does not navigate below Web pages that contain forms. Pages with forms are shown with an “F” icon ( ) next to the page node. The e-Spider provides an interactive capability so that you can navigate to pages with forms, fill in the form, navigate to the pages below, and then add the generated pages to the e-Spider.

Pausing and Resuming e-Spider

To pause and resume the e-Spider:

1.1.1.1. Select Run Run Run Run ���� Stop Stop Stop Stop or click the toolbar button to pause.

2.2.2.2. Select Run Run Run Run ���� Continue Continue Continue Continue or click the toolbar button to resume.

Stopping e-Spider

To stop the e-Spider:

1.1.1.1. Select Run Run Run Run ���� Stop Stop Stop Stop or click the toolbar button.

The Run Run Run Run ���� Stop Stop Stop Stop option and toolbar button are only active while e-Spider is actively searching through a Web site.

Appending Pages to the Tree

The e-Spider allows you to interactively add form results pages to the e-Spider tree so that data input into the form will be captured with the results page as Visual Script parameters.

To append a page to the e-Spider tree:

1.1.1.1. Double-click a Web page with a form icon ( ) in the e-Spider tree to load the page in the Oracle Functional Testing for Web Applications Browser pane.

2.2.2.2. Enter data into the form fields.

3.3.3.3. Click the Web page “Submit” button. The Web page “Submit” button can have any text label, such as “Register”, “Search”, or “Finished”.

4.4.4.4. Wait for the “Results” page returned by the Web application processing the form.

Page 277: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with e-Spider

Chapter 7: Using e-Spider 257257257257

5.5.5.5. Select Edit Edit Edit Edit ���� Appen Appen Appen Append Page to Treed Page to Treed Page to Treed Page to Tree or click the toolbar button.

The new page is appended one level below the form page in the e-Spider tree.

After you generate a Visual Script from the e-Spider tree, the form elements and data appear under the Parameters node of the Visual Script page.

Deleting Pages from the Tree

To delete a page from the e-Spider tree:

1.1.1.1. Select the page in the e-Spider tree.

2.2.2.2. Select Edit Edit Edit Edit ���� Delete Page Delete Page Delete Page Delete Page or click the toolbar button.

Deleted pages will not be included in the Visual Script when you click the Generate Visual Script button in the e-Spider window.

Page 278: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with e-Spider

258258258258 Functional Testing User's Guide

Excluding URLs in e-Spider

Excluding URLs lets you define specific locations that e-Spider will bypass when mapping Web sites or applications and generating Visual Scripts.

To exclude URLs in e-Spider:

1.1.1.1. Start e-Spider.

2.2.2.2. Select EditEditEditEdit ���� Exclude URLsExclude URLsExclude URLsExclude URLs or click the toolbar button.

3.3.3.3. Click the AddAddAddAdd button in the Exclude URLs dialog box.

4.4.4.4. Type in the URL to be excluded. If you selected a node in the e-Spider tree, the URL for that node automatically appears in the dialog box.

5.5.5.5. Click OKOKOKOK.

Exclude URLsExclude URLsExclude URLsExclude URLs will exclude locations relative to the URL of the starting page. In order to exclude /subfolder/doc.htm, enter subfolder/doc.htm, not http://www.mycompany.com/subfolder/doc.htm.

Page 279: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with e-Spider

Chapter 7: Using e-Spider 259259259259

Modifying an Excluded URL

To modify an excluded URL in e-Spider:

1.1.1.1. Start e-Spider.

2.2.2.2. Select EditEditEditEdit ���� Exclude URLsExclude URLsExclude URLsExclude URLs or click the toolbar button.

3.3.3.3. Select the URL in the URLs to ExcludeURLs to ExcludeURLs to ExcludeURLs to Exclude list.

4.4.4.4. Click the ModifyModifyModifyModify button in the Exclude URLs dialog box.

5.5.5.5. Edit the URL to be excluded.

6.6.6.6. Click OKOKOKOK.

Ignoring a Page in the Tree

To ignore a page in the e-Spider tree:

1.1.1.1. Select the page to ignore in the e-Spider tree.

2.2.2.2. Select Edit Edit Edit Edit ���� Ignore Page Ignore Page Ignore Page Ignore Page or click the toolbar button.

Ignored pages will not be included in the Visual Script when you select Run Run Run Run ���� Generate Visual Script Generate Visual Script Generate Visual Script Generate Visual Script in e-Spider.

Ignored pages will not be included when you run the e-Spider using the Spider Site button.

Ignored pages are identified using a yellow flag ( ) next to the page node.

Ignoring All But the Current Page in the Tree

To ignore all but the current page in the e-Spider tree:

1.1.1.1. Select the page in the e-Spider tree.

2.2.2.2. Select Edit Edit Edit Edit ���� Ignore All Other Pages Ignore All Other Pages Ignore All Other Pages Ignore All Other Pages or click the toolbar button.

All pages except the current page are marked with yellow flags.

Page 280: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with e-Spider

260260260260 Functional Testing User's Guide

Generating a Visual Script from e-Spider

To generate a Visual Script using the e-Spider:

1.1.1.1. Load the Web page or application to start from into the Browser pane.

2.2.2.2. Start the e-Spider.

3.3.3.3. Select Run Run Run Run ���� Start Start Start Start or click the toolbar button.

4.4.4.4. Wait for the e-Spider to finish or click the Stop button.

5.5.5.5. Make any edits to the e-Spider tree as necessary:

♦ Append form results pages.

♦ Ignore pages.

♦ Delete Pages.

6.6.6.6. Select a node in the e-Spider tree, as follows:

♦ Topmost node: generate Visual Script for entire e-Spider tree.

♦ Any leaf node: generate Visual Script from top to this node (inclusive).

♦ Any middle node: generate Visual Script from top to this node and all its child nodes.

7.7.7.7. Select Run Run Run Run ���� Generate Visual Script Generate Visual Script Generate Visual Script Generate Visual Script or click the toolbar button. The new Visual Script appears in Oracle Functional Testing for Web Applications.

8.8.8.8. Save the map file.

9.9.9.9. Close the e-Spider window.

Page 281: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Map Files

Chapter 7: Using e-Spider 261261261261

Working with Map Files

Map files let you save the e-Spider tree for future use. If you modify the e-Spider tree, saving the tree to a map file lets you save those modifications. You can also export the tree to an ASCII file.

Saving Map Files

To save an e-Spider tree to a map file:

1.1.1.1. Select File File File File ���� Save Site Map Save Site Map Save Site Map Save Site Map or click the toolbar button.

2.2.2.2. If the tree has not been saved before, a dialog box opens for entering a file name.

3.3.3.3. If necessary, enter a file name and save the file.

Creating a New Map File

To clear the current e-Spider tree and start a new map:

1.1.1.1. Select File File File File ���� New Site Map New Site Map New Site Map New Site Map or click the toolbar button.

2.2.2.2. If you have an unsaved e-Spider tree, a message appears asking if you want to save the current tree to a map file.

3.3.3.3. Click YeYeYeYessss to save the tree to a map file or NoNoNoNo to discard the tree.

Opening an Existing Map File

To open a saved map file:

1.1.1.1. Select FiFiFiFile le le le ���� Open Site Map Open Site Map Open Site Map Open Site Map or click the toolbar button.

2.2.2.2. Select the file and click OKOKOKOK.

Page 282: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Map Files

262262262262 Functional Testing User's Guide

Exporting the Site Map Tree

To export the site map tree:

1.1.1.1. Select File File File File ���� Export Site MExport Site MExport Site MExport Site Map Asap Asap Asap As. e-Spider opens a dialog box for saving the file.

2.2.2.2. Enter a file name and click OKOKOKOK.

You can use any ASCII editor to view or print the file. The following is an example of a Site Map tree exported to an ASCII file: - "HOME" - www.testserver.com/ "HOME" - index.html "COMPANY|ABOUT" - company/index.html - "PRODUCTS|Testing " - products/index.html - "PRODUCTS|Test" - products/tester.html - products/testerfeature.html - products/tester.pdf - "PRODUCTS|Monitor "-products/monitor.html - products/monitorfeature.html - products/monitor.pdf - "PRODUCTS|Load " - products/load.html - products/feature.html - products/ feature.pdf "PRODUCTS|FEATURES" -products/feature.html - products/ feature.pdf - "NEWS & EVENTS|NEWS" - news/index.html

Page 283: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

263263263263

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 8888 Using Data Banks

Oracle Functional Testing for Web Applications lets you use data from a Data Bank file. Data Banks are used to hold unlimited amounts of input data that can be automatically fed into your Web application. During playback, the parameters in the Web page are filled with values from the Data Bank file.

Using the Data Bank Wizard

The Data Bank Wizard provides a convenient way to use Data Banks with Visual Scripts. The Data Bank Wizard lets you map parameters in a Visual Script to variable names, and then bind the variable names to fields in Data Bank files.

The Data Bank Wizard dialog box has two tabs:

♦ Variables tab

♦ Data Binding tab

The following sections explain the tab options.

Page 284: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Data Bank Wizard

264264264264 Functional Testing User's Guide

Data Bank Variables Tab

The Variables tab of the Data Bank Wizard dialog box lets you create variables and map the variables to the parameters in the script.

ParametersParametersParametersParameters – lists the parameters recorded into the Visual Script from forms, JavaScript, or other user input controls. The Parameters list has two columns:

♦ NameNameNameName – lists the parameter name and Visual Script page number.

♦ Recorded ValueRecorded ValueRecorded ValueRecorded Value – shows the data value recorded to the Visual Script.

VariablesVariablesVariablesVariables – specifies variable names to be mapped to the parameters from the Visual Script. You can add variable names and mappings manually using the Add VariableAdd VariableAdd VariableAdd Variable and Add MappingAdd MappingAdd MappingAdd Mapping buttons. You can also add variables and parameters using the AutoAutoAutoAuto----MapMapMapMap button. Variable names are used to bind to fields in a Data Bank file.

♦ Add VariableAdd VariableAdd VariableAdd Variable button – opens a dialog box for defining a variable name. Type in the name of a variable and click OKOKOKOK.

Page 285: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Data Bank Wizard

Chapter 8: Using Data Banks 265265265265

♦ Delete VariableDelete VariableDelete VariableDelete Variable button – deletes the selected variable. Select the name to delete from the VariableVariableVariableVariable list and click this button. A confirmation dialog box appears. Click OKOKOKOK to delete the variable. Deleting a variable also deletes any mapping that it may have with the parameters and any binding with fields from the Data Bank file.

♦ Add MappingAdd MappingAdd MappingAdd Mapping button – maps a variable to a parameter from the script. All recorded parameters that are mapped will be replaced with the values from the Data Bank files if the variable is bound to a field. If variables are mapped but not bound to fields the recorded value will be used during playback.

♦ Remove MappingRemove MappingRemove MappingRemove Mapping button – removes the selected variable/parameter mapping from the MappingsMappingsMappingsMappings list.

MappingsMappingsMappingsMappings – lists the current mapping of Visual Script parameters to variables and values.

♦ Parameter NameParameter NameParameter NameParameter Name – shows the parameter name from the Visual Script and the Parameters list.

♦ Variable NameVariable NameVariable NameVariable Name – shows the variable name from the Variable list.

♦ VariableVariableVariableVariable Value Value Value Value – shows the value of the variable from the current record if the variable is bound to a field from a Data Bank file.

♦ Recorded ValueRecorded ValueRecorded ValueRecorded Value – shows the value of the parameter as recorded into the Visual Script.

♦ Tested ValueTested ValueTested ValueTested Value – shows the value of the parameter that was last supplied to the parameter during playback. In most cases, this will be the variable value.

♦ Current Record From DatabankCurrent Record From DatabankCurrent Record From DatabankCurrent Record From Databank – shows the current record that Oracle Functional Testing for Web Applications is using for playback from a Data Bank file.

♦ Fetch RecordFetch RecordFetch RecordFetch Record – advances the record pointer to the next record in the Data Bank file and updates the list view controls with the data from the current record.

♦ GGGGoto Recordoto Recordoto Recordoto Record – opens a dialog box for specifying the record to retrieve from the Data Bank file and updates the list view controls with the data.

Page 286: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Data Bank Wizard

266266266266 Functional Testing User's Guide

Data Binding Tab

The Data Binding tab of the Data Bank Wizard dialog box lets you bind variables to fields in a Data Bank file.

Data BankData BankData BankData Bank – specifies the Data bank file containing data to use as parameters during playback of the Visual Script.

♦ EditEditEditEdit button – opens a text editor for editing the Data Banks file. If a Data Bank file is selected, the file opens in the editor. If no Data Bank file is selected, the text editor opens for creating a new file.

♦ Update Update Update Update button – updates the Data Bank with any changes to the Data Bank file.

♦ SelectSelectSelectSelect button – opens the file selector dialog box for attaching a Data Bank file. The default directory for Oracle Functional Testing for Web Applications Data Bank files is the \DataBank directory under the installation directory (C:\OracleATS\OFT is the default).

♦ ClearClearClearClear button – clears the Data Bank file selection, any fields in the Data Data Data Data Bank FieldsBank FieldsBank FieldsBank Fields list, and any bindings that the variables may have to fields.

Page 287: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Data Bank Wizard

Chapter 8: Using Data Banks 267267267267

♦ SynthesizeSynthesizeSynthesizeSynthesize button –––– opens a dialog box for defining parameters to generate data to use in a Data Bank file.

VariablesVariablesVariablesVariables – lists the variable names mapped to the parameters nodes in the Visual Script.

Data Bank FieldsData Bank FieldsData Bank FieldsData Bank Fields – lists the field names from the Data Bank file.

BindingsBindingsBindingsBindings – shows which variables are bound to which fields from the Data Bank file. The columns in the Bindings list view are as follows:

♦ Variable nameVariable nameVariable nameVariable name – shows the names of the variables mapped to parameters in the Visual Script.

♦ Field NameField NameField NameField Name – shows the name of the Data Bank field to which the variable is bound.

♦ Field ValueField ValueField ValueField Value – shows the current value of the field from the Data Bank file for the current record.

♦ Field NumberField NumberField NumberField Number – shows the number for the field (field1, field2, will have numbers 1 and 2 respectively).

♦ Current Record From DatabankCurrent Record From DatabankCurrent Record From DatabankCurrent Record From Databank – shows current record that Oracle Functional Testing for Web Applications is using for playback from a Data Bank file.

♦ Fetch RecordFetch RecordFetch RecordFetch Record – advances the record pointer to the next record in the Data Bank file and updates the list view controls with the data from the current record.

♦ Goto RecordGoto RecordGoto RecordGoto Record – opens a dialog box for specifying the record to retrieve from the Data Bank file and updates the list view controls with the data.

Auto Map and Auto Bind

The Data Bank Wizard includes Auto Map and Auto Bind features that let you quickly and easily use Data Banks with Visual Scripts.

AutoAutoAutoAuto----MapMapMapMap – Automatically creates variables and mappings, as follows: ♦ analyzes the parameters list of the Visual Script; ♦ generates the minimum of variables; ♦ maps variables to the parameters; ♦ populates the mappings list view control.

Page 288: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

268268268268 Functional Testing User's Guide

The Unique Vars per PageUnique Vars per PageUnique Vars per PageUnique Vars per Page option lets you specify if AutoAutoAutoAuto----MapMapMapMap generates variable names that are unique to a Visual Script page or common across all pages of the Visual Script. When selected, Unique Vars per PageUnique Vars per PageUnique Vars per PageUnique Vars per Page adds the Visual Script page number to the each generated variable name.

AutoAutoAutoAuto----BindBindBindBind – automatically creates Data Bank files and bindings, as follows: ♦ generates a Data Bank file; ♦ creates the field definitions in the Data Bank file; ♦ creates one record of data using the data values recorded in the

parameters of the Visual Script; ♦ binds the Data Bank variables to the fields from the Data Bank file. You can then add your own comma-delimited data to the Data Bank file.

Working with Data Banks

This section explains how to create Data Bank files, map variables to script parameters, bind variables to Data Bank fields, and play back using Data Banks.

Creating a Data Bank File

Data Bank files are comma-delimited ASCII files with the field names as column headers on the first line of the file. Subsequent lines of the file contain data. You can view the contents of any of the sample files in the <installdir>\OFT\DataBank directory using Notepad or any other ASCII editor.

You can create a new Data Bank file and bind all variables using the AutoAutoAutoAuto----BindBindBindBind button. The new Data Bank file will contain the field names and one record of data from the Visual Script parameters.

To create a Data Bank file:

1.1.1.1. Open Notepad or any other ASCII editor.

2.2.2.2. Enter field names on the first line of the file separated by commas (no spaces).

3.3.3.3. Enter field data on subsequent lines separated by commas (different line for each record, no spaces around commas).

4.4.4.4. Save the file as filename.csv.

Page 289: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 269269269269

ExampleExampleExampleExample: FirstName,LastName,Mail,Phone John,Smith,[email protected],x993 Mary,Ellen,[email protected],x742

Oracle Functional Testing for Web Applications uses the \DataBank subdirectory of the installation directory (C:\OracleATS\OFT is the default) as the default location for Data Bank files.

If a data value contains a comma, place quotation marks around the value, as follows: John,Smith,"Anytown, MA","(781) 003-0000"

Recording a Visual Script to Use with a Data Bank

Before you can use a Data Bank for testing your Web application, you must record a Visual Script that contains parameters for passing data values to the Web application.

To record a Visual Script to use with a Data Bank:

1.1.1.1. Record a Web page with a form.

2.2.2.2. Enter data into the form and click the “Submit” button.

3.3.3.3. Wait for the “Results” page to load in the Browser pane.

4.4.4.4. Stop Recording.

5.5.5.5. Select the “Results” page in the Visual Script.

6.6.6.6. Select EditEditEditEdit ���� Data Bank WizardData Bank WizardData Bank WizardData Bank Wizard or click the toolbar button.

7.7.7.7. Map and bind variables in the Data Bank Wizard to the Visual Script parameters and Data Bank fields.

Mapping Variables to Visual Script Parameters

Data from Data Banks files gets passed to Visual Script parameters using variables. The first part of setting up a Visual Script to work with a Data Bank is to specify which variable name to use with which Visual Script parameter. The Data Bank Wizard lets you define variable names and map specific variables to specific Visual Script parameters.

Page 290: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

270270270270 Functional Testing User's Guide

To map variables to Visual Script parameters:

1.1.1.1. Select the page with Parameters in the Visual Script.

2.2.2.2. Select EditEditEditEdit ���� Data Bank WizardData Bank WizardData Bank WizardData Bank Wizard or click the toolbar button.

3.3.3.3. Select the Variables Variables Variables Variables tab, if necessary.

4.4.4.4. Click Add VariableAdd VariableAdd VariableAdd Variable.

The Data Bank Wizard opens a dialog box for defining a variable.

5.5.5.5. Enter a variable name.

6.6.6.6. Set the variable type as either External or Internal. External variables are used to map to an external Data Bank file. Internal variables pass the result of a calculated expression to the variable.

7.7.7.7. Click OKOKOKOK.

8.8.8.8. Select the variable name in the VariablesVariablesVariablesVariables list.

Page 291: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 271271271271

9.9.9.9. Select the corresponding parameter in the ParametersParametersParametersParameters list.

10.10.10.10. Click Add MappingAdd MappingAdd MappingAdd Mapping.

Select Variable Name

Select Matching Parameter

Add Mapping

Page 292: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

272272272272 Functional Testing User's Guide

The Data Bank Wizard adds the mapping to the MappingsMappingsMappingsMappings list.

11.11.11.11. Repeat 4–10 as necessary for any number of parameters from the Visual Script.

External variables must also be bound to fields in a Data Bank file. See the Binding External Variables to Data Bank Fields section later in this chapter for details about binding variables to Data Bank fields.

Using Internal Variables

Internal variables can be used to pass the results from simple expressions to Visual Script parameters. Rather than passing values from a Data Bank file, you can use Oracle Functional Testing for Web Applications functions to pass date and time values, specific text values, or calculated values.

Internal variable expressions can have the following formats:

ExpressionExpressionExpressionExpression DescriptionDescriptionDescriptionDescription

"text" Passes the text between the quotation marks.

Variable Mapping List

Page 293: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 273273273273

ExpressionExpressionExpressionExpression DescriptionDescriptionDescriptionDescription

function Passes the return value of an Oracle Functional Testing for Web Applications function.

variableName Passes the value of an internal or external Visual Script variable.

"text" & "text" Passes concatenated string of text.

"text" & function Passes the text concatenated with the result from an Oracle Functional Testing for Web Applications function.

"text" & variable Passes the text concatenated with the value of a Visual Script variable.

formula Passes the result from a mathematical formula. Formulas can contain addition, multiplication, division, and subtraction.

You can use the following Oracle Functional Testing for Web Applications functions to return values to internal Data Bank variables:

FunctionFunctionFunctionFunction DescriptDescriptDescriptDescriptionionionion

CurRecord Returns the number of the current record from the Data Bank file.

CurDatabank Returns the path and name of the current Data Bank file.

CurScript Returns the name of the current Visual Script.

CurWorkspace Returns the name of the current Workspace.

CStr(expression) Converts expression to a string data type. Use this function when concatenating text strings with non-string data types, such as date and time values.

Page 294: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

274274274274 Functional Testing User's Guide

FunctionFunctionFunctionFunction DescriptionDescriptionDescriptionDescription

Date Returns the current date.

Day(string) Returns the day of the month. string is a date value in mm/dd/yyyy format.

DBVarValueOf Returns the value of the specified Data Bank variable. Use the following syntax: DBVarValueOf("DBVar_Name$")

DBVar_Name$ is the name of a Data Bank variable defined in the Variables list of the Data Bank Wizard Variables tab.

ElementValueOf Returns the value of the specified form element. Use the following syntax: ElementValueOf("formName$","elemName$")

formName$ is the name of the HTML Form containing the element.

elemName$ is the name of an HTML Form element.

Now Returns the current date and time

Hour(string) Returns the current hour of the day in 24–hour format. string is a time value in hh:mm:ss AM|PM format.

IterationCount Returns the count of the Visual Script playback iterations.

Month(string) Returns the month of the year. string is a date value in mm/dd/yyyy format.

Time Returns the time of day in hh:mm:ss AM|PM format.

Page 295: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 275275275275

FunctionFunctionFunctionFunction DescriptionDescriptionDescriptionDescription

WeekDay(string) Returns an integer value from 1 to 7 corresponding to the day of the week. string is a date value in mm/dd/yyyy format.

Year(string) Returns the current year. string is a date value in mm/dd/yyyy format.

You can build an expression combining text and Oracle Functional Testing for Web Applications functions to generate unique values to pass to Web page forms without having to use a Data Bank file. The following examples show some of the ways that you can use the Oracle Functional Testing for Web Applications functions with internal Data Bank variables.

Internal variables must be mapped to parameters in the Visual Script. See the previous section for details about defining internal variables and mapping the variables to Visual Script parameters.

Internal Variables Examples - Date and Time You can use internal Data Bank variables to pass date and time values to form field parameters. Define an internal variable name and enter one of the Oracle Functional Testing for Web Applications date or time functions into the expression text box. The following are examples of expressions that pass the specified date or time values: "Time of Day " & Cstr(Time) "Hour of Day " & Cstr(Hour(Time)) "Current Time and Date " & Cstr(Now) "Today's Date " & Cstr(Date) "Day of month " & CStr(Day(Date)) "Month of Year " & Cstr(Month(Date)) "Day of week " & CStr(Weekday(Date)) "Current Year " & Cstr(Year(Date)) The Cstr function is used to convert the time and date values to String data types.

Internal Variables Examples - Calculations You can use internal Data Bank variables to pass the results of mathematical formulas to a parameter in a Visual Script. You can also add

Page 296: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

276276276276 Functional Testing User's Guide

the values of two fields and place the result into a third field. For example, you can define an internal variable and specify the expression as follows: iVar_field1 + iVar_field2 The following table shows additional examples of using expressions with internal variables and Visual Script parameters.

Map to Map to Map to Map to ParameterParameterParameterParameter

Variable NameVariable NameVariable NameVariable Name ExpressionExpressionExpressionExpression

field1 iVar_field1 "login" & IterationCount +1

field2 iVar_field2 elementValueOf("form1","elm1") field3 iVar_field3 iVar_field1 + iVar_field2

Internal Variables Example - Incremented Values If your Web page has a form and you want to supply incremented values to use as data entry, you can use the Oracle Functional Testing for Web Applications IterationCount function to generate incremented values. Using the Data Bank Wizard, you add an internal variable and enter an expression similar to the following expression: "login" & IterationCount +1

NoteNoteNoteNote: The IterationCount function is zero-based. The +1 in the above expression is used to start counting at 1.

You then map the internal variable to the Visual Script parameter for the form field where you want to enter the incremented value.

Use the Iterate playback option when you play back the Visual Script. Set the Iterate options to Use Current Record OnlyUse Current Record OnlyUse Current Record OnlyUse Current Record Only and set the Iterate Over Iterate Over Iterate Over Iterate Over RecordRecordRecordRecord value to the number of times you want the Visual Script to play back, as follows:

Page 297: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 277277277277

The values passed to the form field over three iterations of the Visual Script playback will be as follows: login1 login2 login3

You can define and map multiple internal variables to pass values to more than one form field. For example, you could define two internal variables and map each variable to a different Visual Script parameter, as follows:

Map to Map to Map to Map to ParameterParameterParameterParameter

Variable NameVariable NameVariable NameVariable Name ExpressionExpressionExpressionExpression

login iVar_login "login" & IterationCount +1

pwd iVar_pwd "password" & IterationCount +1

The values passed to the form fields over three iterations of the Visual Script playback will be as follows: login1 password1 login2 password2 login3 password3

Using the above method, you do not need to bind the variables to fields in a Data Bank file.

Play Back with Data Bank

Set Current Record Only

Set Iterations

Page 298: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

278278278278 Functional Testing User's Guide

The following example expression concatenates a text string with the record number from an attached Data Bank file to increment a value passed to a Visual Script parameter: "login" & Cstr(CurRecord) Map the internal variable to the Visual Script Parameter

Bind the external variable to a Data Bank field.

Use the DBVarValueOf function to pass the value from the external variable to the expression used by the internal variable, as follows:

DBVarValueOf("externalBoundToField") & Cstr(CurRecord) The following table shows an example of the defined variable and the expression used to pass a Data Bank value:

Variable NameVariable NameVariable NameVariable Name TypeTypeTypeType ExpressionExpressionExpressionExpression

eVar_login external N/A

iVar_login internal DBVarValueOf("eVar_login") & Cstr(CurRecord)

The following table shows an example of the Data Bank binding to the field name in the Data Bank file (db_login):

Variable NameVariable NameVariable NameVariable Name MappingMappingMappingMapping BindingBindingBindingBinding

iVar_login login None

eVar_login None db_login

Binding External Variables to Data Bank Fields

The second part of setting up a Visual Script to work with a Data Bank is to specify which Data Bank field to use with which variable. The Data Bank Wizard lets you bind variables to specific Data Bank fields.

To bind variables to Data Bank fields:

1.1.1.1. Make sure you have mapped variables to parameters in the Visual Script.

2.2.2.2. If necessary, select EditEditEditEdit ���� Data Bank WizardData Bank WizardData Bank WizardData Bank Wizard or click the toolbar button.

3.3.3.3. Select the Data BindingData BindingData BindingData Binding tab.

4.4.4.4. Click SelectSelectSelectSelect to open a Data Bank file.

Page 299: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 279279279279

5.5.5.5. Select a Data Bank file and click OpenOpenOpenOpen. A list of field names from the Data Bank file appears in the Data Bank FieldsData Bank FieldsData Bank FieldsData Bank Fields list.

6.6.6.6. Select a field name in the Data Bank FieldsData Bank FieldsData Bank FieldsData Bank Fields list.

7.7.7.7. Select the corresponding variable in the VariablesVariablesVariablesVariables list.

Select a Data Bank File

Page 300: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

280280280280

Select Data Bank Field

Functional Testing User's Guide

8.8.8.8. Click Add Add Add Add BindingBindingBindingBinding. The Data Bank Wizard adds the binding to the Bindings list.

Add Binding

Select Variable Name

Variable binding List

Page 301: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Da

9.9.9.9. Repeat 6–8 as necessary for any number of variables to bind to Data Bank fields.

10.10.10.10. Click OKOKOKOK to save the settings and close the Data Bank Wizard.

Playing Back a Range of Data Bank Records

Data Banks, when used with the Iterate feature of Oracle Functional Testing for Web Applications, let you perform data-driven tests on a Web application.

To play back with a Data Bank:

1.1.1.1. Use the Data Bank Wizard to map and bind Visual Script parameters to fields in a Data Bank file.

2.2.2.2. Select RunRunRunRun ���� PlaybackPlaybackPlaybackPlayback ���� Iterate Iterate Iterate Iterate.

3.3.3.3. Select Playback with Data BanksPlayback with Data BanksPlayback with Data BanksPlayback with Data Banks.

4.4.4.4.

5.5.5.5.

Set To Play Back Data Bank

Set Which Data Bank Records

Set # of Iterations Through Range

ta Banks 281281281281

Select Use All RecordsUse All RecordsUse All RecordsUse All Records.

Specify the range of Data Bank records to use during playback of the script in the Start at RecordStart at RecordStart at RecordStart at Record and End at RecordEnd at RecordEnd at RecordEnd at Record fields. You can enter “First” and “Last,” respectively, to iterate playback through the entire Data Bank.

Page 302: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

282282282282 Functional Testing User's Guide

6.6.6.6. Set the number of iterations through the Data Bank in the Iterate Iterate Iterate Iterate Over RangeOver RangeOver RangeOver Range field.

7.7.7.7. Click IterateIterateIterateIterate.

Oracle Functional Testing for Web Applications plays back the entire Visual Script (all pages) using all of the specified records for each iteration. If you have a Data Bank with 5 records and iterate over the range 2 times, Oracle Functional Testing for Web Applications plays back the Visual Script (all pages) a total of 10 times – twice for each record.

Playing Back a Specific Data Bank Record

To play back a specific Data Bank record:

1.1.1.1. Use the Data Bank Wizard to map and bind Visual Script parameters to fields in a Data Bank file.

2.2.2.2. Select EditEditEditEdit ���� Data Bank WizardData Bank WizardData Bank WizardData Bank Wizard or click the toolbar button.

3.3.3.3. Click Goto RecordGoto RecordGoto RecordGoto Record.

4.4.4.4. Enter a record number and click OOOOKKKK.

5.5.5.5. Click OKOKOKOK to close the Data Bank Wizard.

6.6.6.6. Select RunRunRunRun ���� Playback Playback Playback Playback ���� Iterate Iterate Iterate Iterate.

7.7.7.7. Select Playback with Data BanksPlayback with Data BanksPlayback with Data BanksPlayback with Data Banks.

Page 303: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Da

8.8.8.8.

9.9.9.9.

10101010

Set To Play Back Data Bank

Specific Record

Set # of Iterations Through Range

ta Banks 283283283283

Select UseUseUseUse Current Record Only Current Record Only Current Record Only Current Record Only.

Set the number of iterations for the record in the Iterate Over RecordIterate Over RecordIterate Over RecordIterate Over Record field.

.... Click IterateIterateIterateIterate.

Oracle Functional Testing for Web Applications plays back the entire Visual Script (all pages) using the specified record for each iteration.

Page 304: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

284284284284 Functional Testing User's Guide

Generating Data Bank Data

The Data Bank Wizard includes options for generating synthesized data based upon text and/or numeric patterns.

To generate synthesized data:

1.1.1.1. Select Edit Edit Edit Edit ���� Data Bank WizardData Bank WizardData Bank WizardData Bank Wizard or click the toolbar button.

2.2.2.2. Click the Data BindingData BindingData BindingData Binding tab.

3.3.3.3. Click SynthesizeSynthesizeSynthesizeSynthesize.

4.4.4.4. Enter a field name in the NameNameNameName field.

5.5.5.5. Specify a data pattern in the PatternPatternPatternPattern field.

6.6.6.6. Specify the AlAlAlAlgorithmgorithmgorithmgorithm, DirectionDirectionDirectionDirection, FillFillFillFill, and CaseCaseCaseCase options

7.7.7.7. Specify the MinMinMinMin, MaxMaxMaxMax, and StepStepStepStep values.

8.8.8.8. Click InsertInsertInsertInsert to add another column to the Data Bank. The column number increments and the NameNameNameName and PatternPatternPatternPattern values clear.

9.9.9.9. Repeat steps 4-7 to define data generation for the next column of Data Bank data.

10.10.10.10. Repeat steps 8-9 for each column of data to add to the Data Bank file.

11.11.11.11. Specify a file name in which to save the data.

12.12.12.12. Click SampleSampleSampleSample to generate a representative sample of the synthesized data. The sample Data Bank file opens in Windows Notepad.

13.13.13.13. Use the Column NumberColumn NumberColumn NumberColumn Number arrow buttons to switch between and edit column pattern definition settings.

14.14.14.14. Specify the number of data rows to generate in the RowsRowsRowsRows field.

15.15.15.15. Click OKOKOKOK to generate the Data Bank file.

Page 305: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 285285285285

The Generate Data dialog box has the following options:

Pattern DefinitionPattern DefinitionPattern DefinitionPattern Definition – specifies the data pattern and generation options for each column in a Data Bank file.

♦ NameNameNameName – specifies a field name for the current Data Bank column. A unique field name is required for each column added to the Data Bank.

♦ PatternPatternPatternPattern – specifies the text/numeric data pattern to generate. Use the following characters in this field to define the data pattern to generate for the current column:

CharacterCharacterCharacterCharacter DescriptionDescriptionDescriptionDescription

# [pound sign] represents a number (0-9) in the position.

% [percent sign] represents a letter (A-Z or a-z) in the position.

? [question mark] represents either a number or letter (0-9, A-Z or a-z) in the position.

You can mix text and the pattern characters in the PatternPatternPatternPattern field to generate combinations of patterns.

Page 306: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

286286286286 Functional Testing User's Guide

The pattern can be different for each column in the Data Bank. The following table shows examples of using the pattern characters:

SampleSampleSampleSample Example of Generated Data*Example of Generated Data*Example of Generated Data*Example of Generated Data*

User##%? User97r1 User02Ex User90iB User86X3

ID#%%# ID5Tu9 ID9uR1 ID6Vm6 ID8pJ1

???? a5ng 1B52 Xu4b 45d8

*Shown using RandomRandomRandomRandom generation and BothBothBothBoth case options.

♦ AlgorithmAlgorithmAlgorithmAlgorithm – specifies the algorithm to use to generate the data. The following options are available:

� RandomRandomRandomRandom – generates random data values.

� SequentialSequentialSequentialSequential – generates sequential data values.

♦ DirectionDirectionDirectionDirection – specifies the data direction. The following options are available:

� ForwardForwardForwardForward – generates data in ascending order.

� ReverseReverseReverseReverse – generates data in descending order.

♦ FillFillFillFill – specifies if leading zeros are used to fill all positions in multi-digit numbers. The following options are available:

� TrueTrueTrueTrue – insert leading zeros to maintain digit length.

� FalseFalseFalseFalse – do not insert leading zeros.

♦ Column NumberColumn NumberColumn NumberColumn Number – changes the Data Bank column. Use the InsertInsertInsertInsert, and RemoveRemoveRemoveRemove buttons to add and remove columns in the Data Bank file.

Page 307: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 287287287287

♦ CaseCaseCaseCase – specifies the case of generated text characters. The following options are available:

� LowerLowerLowerLower – generates lower case letters.

� UpperUpperUpperUpper – generates upper case letters

� BothBothBothBoth – generates mixed case letters.

MinMinMinMin – specifies the minimum value for generated values.

MaxMaxMaxMax – specifies the maximum value for generated values.

StepStepStepStep – specifies the increment amount to use between generated data values.

InsertInsertInsertInsert – inserts a new column into the Data Bank file.

RemoveRemoveRemoveRemove – remove the current column from the Data Bank file.

ClearClearClearClear – clears the current pattern definition values.

General Properties General Properties General Properties General Properties – specifies the number of data rows and the name of the Data Bank file.

♦ RowsRowsRowsRows – specifies the number of data value rows to generate.

♦ File NameFile NameFile NameFile Name – specifies the name of the Data Bank file in which to save the generated data.

♦ SampleSampleSampleSample – generates a sample set of data based upon the current pattern definition settings and values.

Page 308: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

288288288288 Functional Testing User's Guide

Using Data Banks with Java Applet Events

NoteNoteNoteNote: This procedure applies to applets using the Microsoft Java Runtime Engine (JRE).

Before you can use a Data Bank for testing your Java applet, you must record a Visual Script page that contains a Java applet with text change or KeyListener events.

1.1.1.1. Select Run Run Run Run ���� Record Record Record Record ���� Start Start Start Start or click the toolbar button to start recording.

2.2.2.2. Type the URL of the Web page with a Java applet in the AddressAddressAddressAddress line and press Enter.

3.3.3.3. Enter text into a Java applet text field.

4.4.4.4. Select Run Run Run Run ���� Record Record Record Record ���� Page Snapshot Page Snapshot Page Snapshot Page Snapshot. Oracle Functional Testing for Web Applications records a new page to the Visual Script.

5.5.5.5. Select Run Run Run Run ���� Record Record Record Record ���� Stop Stop Stop Stop when finished.

6.6.6.6. Select the Address node of the Visual Script page.

7.7.7.7. Click the right mouse button and select PropertiesPropertiesPropertiesProperties.

Page 309: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 289289289289

8.8.8.8. Double-click the text change or KeyListener event in the Actions list of the Address Properties.

9.9.9.9. Select the Databank Variable Name item in the AttributesAttributesAttributesAttributes tab.

10.10.10.10. Click the DatabankDatabankDatabankDatabank button. Oracle Functional Testing for Web Applications opens a dialog box for specifying a variable name.

11.11.11.11. Enter the name of the Data Bank variable to use. This variable name should be the same name as the variable you specify in the Data Bank Wizard to connect the text field to a Data Bank field.

Page 310: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

290290290290 Functional Testing User's Guide

12.12.12.12. Click OKOKOKOK to close the Specify Data Bank Variable Name dialog box. The variable name appears in the Value column of the AttributesAttributesAttributesAttributes tab.

13.13.13.13. Click OKOKOKOK to close the Event dialog box.

14.14.14.14. Click OKOKOKOK to close the Address Properties dialog box.

15.15.15.15. Select Edit Edit Edit Edit ���� Data Bank Wizard Data Bank Wizard Data Bank Wizard Data Bank Wizard.

16.16.16.16. Click Add VariableAdd VariableAdd VariableAdd Variable.

17.17.17.17. Enter the name of the variable that you specified in the AttributesAttributesAttributesAttributes tab and click OKOKOKOK.

Page 311: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 291291291291

18.18.18.18. Click the Data BindingData BindingData BindingData Binding tab.

19.19.19.19. Click SelectSelectSelectSelect.

20.20.20.20. Select the Data Bank file and click OpenOpenOpenOpen.

Page 312: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

292292292292 Functional Testing User's Guide

21.21.21.21. Select the name of the Data Bank field to bind to the variable.

22.22.22.22. Click Add BindingAdd BindingAdd BindingAdd Binding.

23.23.23.23. Click Fetch RecordFetch RecordFetch RecordFetch Record to cycle through the Data Bank field values.

24.24.24.24. Click OKOKOKOK to close the Data Bank.

25.25.25.25. Play back the Visual Script with the Data Bank.

Page 313: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

Chapter 8: Using Data Banks 293293293293

The Difference Between Play and Iterate Using Data Banks

PlayPlayPlayPlay IterateIterateIterateIterate

Use All RecordsUse All RecordsUse All RecordsUse All Records Plays back the Visual Script once using the current record (as specified in the Data Bank Wizard) in the Data Bank.

The next playback uses the next record in the Data Bank, and so on.

Plays back the Visual Script for each record in the specified range of the Data Bank file.

If Iterate over RangeIterate over RangeIterate over RangeIterate over Range is set to more than one, playback cycles through the range of records in the Data Bank for each iteration.

Use Current Record Use Current Record Use Current Record Use Current Record OnlyOnlyOnlyOnly

Plays back the Visual Script once using the current record (as specified in the Data Bank Wizard) in the Data Bank.

The next playback uses the same record in the Data Bank.

Plays back the Visual Script using the current record (as specified in the Data Bank Wizard or Iterations dialog box) in the Data Bank.

If Iterate over RecordIterate over RecordIterate over RecordIterate over Record is set to more than one, the current record is used for each iteration.

Page 314: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Data Banks

294294294294 Functional Testing User's Guide

[This page intentionally left blank]

Page 315: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

295295295295

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 9999 Using Admin Options

The Admin menu options let you manage the following types of information stored by Oracle Functional Testing for Web Applications:

♦ Manage the Text Matching test cases in the test library;

♦ Specify response actions for unexpected dialog boxes that appear during playback of a Visual Script;

♦ Specify user name and password information for testing sites that require a login for authenticating users;

♦ Create new workspaces;

♦ Delete workspaces, Visual Scripts and results logs.

The following sections explain the options.

Page 316: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Test Library Manager

296296296296 Functional Testing User's Guide

Using the Test Library Manager

The Test Library lets you perform administrative tasks on Text Matching test cases stored in the library.

Test Library Options

Selecting AdminAdminAdminAdmin ���� Test Library Manager Test Library Manager Test Library Manager Test Library Manager opens the Administer Test Library dialog box. The dialog box has the following columns and options:

NewNewNewNew – opens the Modify Text Matching Test dialog box for creating a new test case. The test case is added to the library, but not the Visual Script. You can select Text Matching test cases from the library when you insert a test case into the Visual Script.

DeleDeleDeleDeletetetete – removes a Text Matching test case from the library. Select the test case to remove and click DeleteDeleteDeleteDelete.

NameNameNameName – the name of the Text Matching test case.

TypeTypeTypeType – the Pass WherePass WherePass WherePass Where setting for the Text Matching test case (either “Present” or “Absent”).

TextTextTextText – the text string or variable name(s) to compare in the Web page or application source.

Page 317: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Test Library Manager

Chapter 9: Using Admin Options 297297297297

Adding Text Matching Tests Case to the Library

To add Text Matching test cases to the library:

1.1.1.1. Select AdminAdminAdminAdmin ���� Test Library Manager Test Library Manager Test Library Manager Test Library Manager.

2.2.2.2. Click NewNewNewNew.

3.3.3.3. Enter a test case name.

4.4.4.4. Select the Pass WhenPass WhenPass WhenPass When option.

5.5.5.5. Enter the text to match in the Selected TextSelected TextSelected TextSelected Text edit box.

6.6.6.6. Click OKOKOKOK in the Text Matching dialog box.

Removing Text Matching Test Cases from the Library

To delete a Test Matching test case from the library:

1.1.1.1. Select AdminAdminAdminAdmin ���� Test Library Manager Test Library Manager Test Library Manager Test Library Manager.

2.2.2.2. Select the test case to remove.

3.3.3.3. Click DeleteDeleteDeleteDelete.

4.4.4.4. Click OKOKOKOK.

Page 318: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

298298298298 Functional Testing User's Guide

Using the Dialog Manager

The Dialog Manager lets you specify actions to perform if an unexpected dialog box appears during playback of a Visual Script. You can define specific properties of dialog boxes, the priority of dialog boxes, an action to perform if a dialog box appears, and if the appearance of the dialog box should cause a fatal error.

The Dialog Manager has the following sections:

Overview of the Tool Buttons

The tool buttons provides options for capturing dialog information and changing evaluation priority. The following tool buttons are available:

New New New New – adds new dialog information to the list.

DeleteDeleteDeleteDelete – removes the currently selected dialog information from the Dialog Manager.

Point Point Point Point – opens a dialog box that shows the Caption and Text information for the dialog box below the mouse cursor. Click the mouse button on the selected dialog box to capture the information into the Dialog Manager.

Defined Dialogs

Dialog Information Details

Page 319: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

Chapter 9: Using Admin Options

Test Test Test Test – executes the actions defined in the ActionActionActionAction field. Use this button to verify that the defined Action properly handles a dialog box for unattended playback of Visual Scripts.

Move UpMove UpMove UpMove Up – moves the currently selected dialog box information up one position in the Priority.

Move DownMove DownMove DownMove Down – moves the currently selected dialog box information down one position in the Priority.

Overview of the Dialog List

The dialog list shows the currently defined dialog box information and the action to be performed if the dialog box appears during playback of a Visual Script. The Dialog Manager contains several pre-defined dialog boxes and actions for common Web dialog boxes. You can add your own definitions for dialog boxes that may be specific to your Web application.

The dialog list has the following columns:

DF

Action to Perform

Dialog Text

Dialog Caption

ialog Appearance Causes atal Error

299299299299

Page 320: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

300300300300

The list order specifies the priority in which the Dialog Manager checks the dialog list for an action to perform when an unexpected dialog box appears during playback of a Visual Script.

CaptionCaptionCaptionCaption – shows the caption text of the dialog boxes specified in the Dialog Manager. An asterisk indicates all characters.

TextTextTextText – shows the text of the dialog box. An asterisk indicates all characters.

ActionActionActionAction – shows the action to perform if the dialog box appears during playback of a Visual Script.

FatalFatalFatalFatal – shows if the appearance of the dialog box should be considered a fatal error. True indicates that the dialog box is considered a fatal error. False indicates that the dialog box is not considered a fatal error.

Overview of the Dialog Information

The dialog information group is where you specify dialog information to change or add to the dialog list of the Dialog Manager.

The dialog information group has the following options:

AP

Dialog Caption

D

AD

ction to erform

ialog Text

ction escription

Functional Testing User's Guide

You specify the Caption, Text, Action to perform, and if the dialog box is considered a fatal error. You can capture the Caption and Text information

Page 321: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

Chapter 9: Using Admin Options 301301301301

from any dialog box that is currently displayed on the screen using the dialog capture button.

CaptionCaptionCaptionCaption – enter the caption text of the dialog box. An asterisk indicates all characters.

TextTextTextText – enter the text of the dialog box. An asterisk indicates all characters.

ActionActionActionAction – select the action to perform if the dialog box appears during playback of a Visual Script. You can enter Data Bank variable names, text, and special keyboard actions into the ActionActionActionAction field. See Using Action Options in this chapter for additional information about the valid values.

Dialog is fatal, abort playbackDialog is fatal, abort playbackDialog is fatal, abort playbackDialog is fatal, abort playback – when selected, the appearance of the dialog box is considered a fatal error.

Overview of the Control Options

The control options let you enable or disable the Dialog Manager, view dialog box spy information, and test dialog box handling actions. The control options are as follows:

Use Dialog ManagerUse Dialog ManagerUse Dialog ManagerUse Dialog Manager – when selected, the Dialog Manager is enabled. The other available control options are enabled and the dialog box handling actions defined in the list will be used.

While IdlingWhile IdlingWhile IdlingWhile Idling – when selected, the Dialog Manager will handle dialog boxes even when Oracle Functional Testing for Web Applications is not in record or playback mode. The Dialog Manager actions will be used to handle dialog boxes while using the Oracle Functional Testing for Web Applications browser to navigate Web pages. When cleared, the Dialog Manager actions will only be used to handle dialog boxes during recording and playback of Visual Scripts.

Show Dialog InfoShow Dialog InfoShow Dialog InfoShow Dialog Info – when selected, the Dialog Manager opens a window for viewing status information for the Oracle Functional Testing for Web Applications Dialog Spy for testing and debugging purposes.

Stop After [#] TriesStop After [#] TriesStop After [#] TriesStop After [#] Tries – when selected, the Dialog Manager stops performing actions on the dialog box after the specified number of tries.

Page 322: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

302302302302 Functional Testing User's Guide

Monitor All WindowsMonitor All WindowsMonitor All WindowsMonitor All Windows – when selected, the Dialog Manager monitors all browser and Windows client/server dialog boxes in all processes. This option is used when playing back scripts in an external browser window.

Starting the Dialog Manager

To start the Dialog Manager:

1.1.1.1. Select AdminAdminAdminAdmin ���� Dialog ManaDialog ManaDialog ManaDialog Managergergerger.

2.2.2.2. Use the Dialog Manager options to prioritized evaluation order, specify new dialog boxes, or change existing dialog box information.

3.3.3.3. Click OK OK OK OK to save the changes.

Capturing Dialog Information

To capture dialog information:

1.1.1.1. Select AdminAdminAdminAdmin ���� Dialog ManagerDialog ManagerDialog ManagerDialog Manager to start the Dialog Manager.

2.2.2.2. Click the Point button. The Dialog Manager options a dialog box showing the Caption and Text information of the dialog box beneath the mouse cursor.

3.3.3.3. Click the left mouse button on the dialog box to capture. The Caption and Text information is captured directly from the displayed dialog box into the Dialog Manager.

4.4.4.4. Select or enter the Action to perform if the dialog appears during playback. You can enter Data Bank variable names and special keyboard actions into the ActionActionActionAction field. See Using Action Options in this chapter for additional information about the valid values.

5.5.5.5. Select or clear the Dialog is fatal, abort playbackDialog is fatal, abort playbackDialog is fatal, abort playbackDialog is fatal, abort playback check box if the appearance of the dialog box should indicate a fatal error.

6.6.6.6. Click NewNewNewNew or OK OK OK OK to save the changes.

Page 323: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

Chapter 9: Using Admin Options 303303303303

Specifying Dialog Information

To specify dialog information:

1.1.1.1. Select AdminAdminAdminAdmin ���� Dialog ManagerDialog ManagerDialog ManagerDialog Manager to start the Dialog Manager.

2.2.2.2. Enter the dialog Caption. An asterisk indicates all characters.

3.3.3.3. Enter the dialog text. An asterisk indicates all characters.

You can capture Caption and Text information directly from a displayed dialog box using the Select Dialog tool button.

5.5.5.5. Select or enter the Action to perform if the dialog appears during playback. You can enter Data Bank variable names and special keyboard actions into the ActionActionActionAction field. See Using Action Options in this chapter for additional information about the valid values.

6.6.6.6. Select or clear the Dialog is fatal, abort playbackDialog is fatal, abort playbackDialog is fatal, abort playbackDialog is fatal, abort playback check box if the appearance of the dialog box should indicate a fatal error.

7.7.7.7. Click NewNewNewNew or OK OK OK OK to save the changes.

Using Action Options

The Action field can have the following type of entries to handle dialog boxes that appear during playback of Visual Script: ♦ Switch tags ♦ Text ♦ Key tags

♦ Special action tags ♦ Variable tags ♦ Macro Tags

Enter the tags and text into the Action field in the order they should be performed to handle the dialog box. Spaces between tags are optional. For example:

[NEXTTAB] {ENTER}

This action switches the focus to the next item in the dialog box’s defined Tab order and then clicks the Enter key.

The following tables list the valid values for each action type.

Page 324: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

304304304304 Functional Testing User's Guide

Switch Tags Switch tags are used to change the focus within a dialog box. Enclose switch tags between square brackets. The following switch tags are defined:

SwitchesSwitchesSwitchesSwitches DescriptionDescriptionDescriptionDescription

[Label] Switch to next control labeled Label.

[DEFAULT] Switch to the default control

[NEXTTAB] Switch to next control in the Tab order.

[PREVTAB] Switch to previous control in the Tab order.

[TOPTAB] Switch to top-level dialog window.

Action Text The action field can contain text to enter into a dialog box control. Enclose text between single quotation marks.

TextTextTextText DescriptionDescriptionDescriptionDescription

'text ' Any text between single quotation marks.

\' Use the backslash character to include a single quotation mark within a text string.

Page 325: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

Chapter 9: Using Admin Options 305305305305

Key Tags Key tags are used to perform keyboard actions within a dialog box. Enclose key tags between curly braces. The following key tags are defined:

KeysKeysKeysKeys DescriptionDescriptionDescriptionDescription

+ Press and hold the Shift key. Used as a prefix for other keys (i.e. {+Enter}).

^ Press and hold the Crtl key. Used as a prefix for other keys (i.e. {^Enter}).

% Press and hold the Alt key. Used as a prefix for other keys (i.e. {%Enter}).

{key} Press any alphanumeric key. Keys {A}-{Z} and {0}-{9} are valid.

{DOWN} Press the down-arrow key.

{ENTER} Press the Enter key.

{ESC} Press the Esc key.

{ESCAPE} Press the Esc key.

{F#} Press a function number key. Keys {F1} through {F12} are valid.

{LEFT} Press the left-arrow key.

{RIGHT} Press the right-arrow key.

{SPACE} Press the Space key.

{SPC} Press the Space key.

{UP} Press the up-arrow key.

Page 326: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

306306306306 Functional Testing User's Guide

Special Action Tags Special action tags are used to perform other actions within a dialog box. Enclose special action tags between curly braces. The following special action tags are defined:

Special Actions Special Actions Special Actions Special Actions DescriptionDescriptionDescriptionDescription

{CANCEL} Click the CancelCancelCancelCancel button.

{CLICK} Click the dialog item with the focus.

{DEFAULT} Click the default button.

{OK} Click the OKOKOKOK button.

{NO} Click the NoNoNoNo button.

{WAIT:n} Wait for n milliseconds.

{YES} Click the YesYesYesYes button.

Variable Tags Variable tags are used to pass data from the Authentication Manager or a Data Bank to a dialog box. Enclose variable tags between double angle brackets. The following variable tags are defined:

Variable TagVariable TagVariable TagVariable Tag DescriptionDescriptionDescriptionDescription

<<var_name>> Any Data Bank variable name.

<<_username_>> Authentication Manager user name variable.

<<_password_>> Authentication Manager password variable.

Macro Tags Macro tags are used to pass Dialog Manager actions from a Data Bank to a dialog box. Enclose macro tags between double parenthesis. The following macro tag is defined:

Macro TagMacro TagMacro TagMacro Tag DescriptionDescriptionDescriptionDescription

((var_name)) Any name of a Data Bank variable specifying the actions to perform. The data string in the variable will be interpreted as an action to perform.

Page 327: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Dialog Manager

Chapter 9: Using Admin Options 307307307307

Editing Existing Dialog Information

To edit existing dialog information in the Dialog Manager:

1.1.1.1. Select AdminAdminAdminAdmin ���� Dialog ManagerDialog ManagerDialog ManagerDialog Manager to start the Dialog Manager.

2.2.2.2. Click the dialog box information to edit.

3.3.3.3. Edit the dialog Caption. An asterisk indicates all characters.

4.4.4.4. Edit the dialog Text. An asterisk indicates all characters.

5.5.5.5. Edit the Action to perform if the dialog appears during playback. You can enter Data Bank variable names and special keyboard actions into the ActionActionActionAction field. See Using Action Options in this chapter for additional information about the valid values.

6.6.6.6. Select or clear the Dialog is fatal, abort playbackDialog is fatal, abort playbackDialog is fatal, abort playbackDialog is fatal, abort playback check box if the appearance of the dialog box should indicate a fatal error.

7.7.7.7. Click NewNewNewNew or OK OK OK OK to save the changes.

Changing Dialog Evaluation Priority

To change the dialog box evaluation priority:

1.1.1.1. Select AdminAdminAdminAdmin ���� Dialog ManagerDialog ManagerDialog ManagerDialog Manager to start the Dialog Manager.

2.2.2.2. Select the dialog information in the list re-prioritize.

3.3.3.3. Click the appropriate tool button and click OK OK OK OK to save the changes.

Page 328: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Authentication Manager

308308308308 Functional Testing User's Guide

Using the Authentication Manager

The Authentication Manager lets you define user name and password information to allow automated testing of sites that require a login to authenticate users. The Authentication Manager dialog box lists the Authentication records available to Visual Scripts.

Selecting AdminAdminAdminAdmin ���� Authentication Manager Authentication Manager Authentication Manager Authentication Manager opens the Authentication Manager dialog box:

The dialog box lists the currently defined user names and passwords and has the following columns and options:

NewNewNewNew – adds new authentication information to the list.

DeleteDeleteDeleteDelete – removes the currently selected authentication information from the list.

URLURLURLURL – the full Uniform Resource Locator (URL) for the Web application that requires a user name and password.

UsernameUsernameUsernameUsername – the user name value to pass to the Web application.

PasswordPasswordPasswordPassword – the password value to pass to the Web application.

Page 329: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using the Authentication Manager

Chapter 9: Using Admin Options 309309309309

ConfirmConfirmConfirmConfirm – re-enter the password to confirm the password. Password values are hidden as all asterisks for security.

Username VariableUsername VariableUsername VariableUsername Variable – shows the name of the Data Bank variable, if any, that maps the User Name value.

Password VariablePassword VariablePassword VariablePassword Variable – shows the name of the Data Bank variable, if any, that maps the Password value.

Adding a Record

To add a record to the Authentication Manager:

1.1.1.1. Select AdminAdminAdminAdmin ���� Authentication ManagerAuthentication ManagerAuthentication ManagerAuthentication Manager.

2.2.2.2. Click NewNewNewNew.

3.3.3.3. Enter the URL, Username, and Password information.

4.4.4.4. (Optional) Enter Data Bank variable names for the user name and password. Enclose the Data Bank variable names within double angle brackets, as in <<varUserName>> and <<varPassword>>.

5.5.5.5. Click the OK OK OK OK or NeNeNeNewwww button.

Modifying a Record

To modify a record in the Authentication Manager:

1.1.1.1. Select AdminAdminAdminAdmin ���� Authentication ManagerAuthentication ManagerAuthentication ManagerAuthentication Manager.

2.2.2.2. Select the record to modify (in the URLURLURLURL column).

3.3.3.3. Edit the URL, Username, and Password as necessary.

4.4.4.4. (Optional) Edit Data Bank variable names for the User Name and Password. Enclose the Data Bank variable names within double angle brackets, as in <<varUserName>> and <<varPassword>>.

5.5.5.5. Click the OK OK OK OK or New New New New button.

Page 330: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Workspaces, Scripts, and Logs

313131310000 Functional Testing User's Guide

Removing a Record

To remove a record from the Authentication Manager:

1.1.1.1. Select AdminAdminAdminAdmin ���� Authentication ManagerAuthentication ManagerAuthentication ManagerAuthentication Manager.

2.2.2.2. Select the record to remove (in the URLURLURLURL column).

3.3.3.3. Click the DeleteDeleteDeleteDelete button.

4.4.4.4. Click OKOKOKOK.

Working with Workspaces, Scripts, and Logs

The Admin menu provides options for creating new workspaces and deleting workspaces, Visual Scripts, and results logs. The following sections explain each of the options.

Using the Workspace Manager

Selecting AdminAdminAdminAdmin ���� Workspace Manager Workspace Manager Workspace Manager Workspace Manager opens the New Workspace dialog box:

This dialog box lets you manage Oracle Functional Testing for Web Applications Workspaces.

Workspaces store project-related Visual Script files and results log files. You can use workspaces to organize these files.

Page 331: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Workspaces, Scripts, and Logs

Chapter 9: Using Admin Options 311311311311

<Existing Workspaces> – lists the currently defined Workspaces for Oracle Functional Testing for Web Applications.

NewNewNewNew – creates a new Workspace in the list. Type a name for the Workspace and press Enter.

DeleteDeleteDeleteDelete – deletes the currently selected Workspace.

CAUTIONCAUTIONCAUTIONCAUTION: Deleting a Workspace has the potential of erasing a large amount of data including Visual Script files and results logs. Be sure you really want to delete the information before proceeding.

NoteNoteNoteNote: You cannot delete the currently open Workspace. The DeleteDeleteDeleteDelete, RenameRenameRenameRename and OpenOpenOpenOpen buttons are disabled when the currently open Workspace is selected.

RenameRenameRenameRename – lets you change the name of the currently selected Workspace.

OpenOpenOpenOpen – opens the Workspace currently selected in the Existing Workspaces list. The Workspace will be opened when you click CloseCloseCloseClose.

Deleting Workspaces

Selecting AdminAdminAdminAdmin ���� Workspace Manager Workspace Manager Workspace Manager Workspace Manager opens the Workspace dialog box:

This dialog box lets you delete a workspace.

CAUTIONCAUTIONCAUTIONCAUTION: Deleting a workspace has the potential of erasing a large amount of data including Visual Script files and results logs. Be sure you really want to do this before proceeding.

Page 332: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Workspaces, Scripts, and Logs

312312312312 Functional Testing User's Guide

Select the workspace to delete and click DeleteDeleteDeleteDelete.

Oracle Functional Testing for Web Applications prompts you to confirm the deletion. Click YesYesYesYes in the confirmation dialog box to delete the workspace and associated files or click NoNoNoNo or CancelCancelCancelCancel to cancel.

Deleting Visual Scripts

Selecting AdminAdminAdminAdmin ���� Script Manager Script Manager Script Manager Script Manager opens the Script Management dialog box:

This dialog box lets you delete a Visual Script from the current workspace.

Select the Visual Script file to delete and click DeleteDeleteDeleteDelete.

Oracle Functional Testing for Web Applications prompts you to confirm the deletion. Click YesYesYesYes in the confirmation dialog box to delete the Visual Script or click NoNoNoNo or CancelCancelCancelCancel to cancel.

Page 333: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Workspaces, Scripts, and Logs

Chapter 9: Using Admin Options 313313313313

Deleting Logs

Selecting AdminAdminAdminAdmin ���� Result Log Manager Result Log Manager Result Log Manager Result Log Manager opens the following box:

This dialog box lets you delete a Results log from the current workspace.

Select the Results log to delete and click DeleteDeleteDeleteDelete.

Oracle Functional Testing for Web Applications prompts you to confirm the deletion. Click YesYesYesYes in the confirmation dialog box to delete the Results log or click NoNoNoNo or CancelCancelCancelCancel to cancel.

Page 334: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Workspaces, Scripts, and Logs

314314314314 Functional Testing User's Guide

[This page intentionally left blank]

Page 335: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

315315315315

C h a p t e r C h a p t e r C h a p t e r C h a p t e r 1 01 01 01 0 Using the Application Programming Interface

This chapter explains how to extend your Visual Scripts using the API. The chapter contains the following sections:

Overview of Testing ExtensibilityOverview of Testing ExtensibilityOverview of Testing ExtensibilityOverview of Testing Extensibility – provides an overview of the five levels of the testing extensibility capabilities of Oracle Functional Testing for Web Applications.

Visual Script ProgrammingVisual Script ProgrammingVisual Script ProgrammingVisual Script Programming – explains how Oracle Functional Testing for Web Applications executes code in Test Scriptlets.

About Visual Script NavigationAbout Visual Script NavigationAbout Visual Script NavigationAbout Visual Script Navigation – explains the underlying structure of how Visual Scripts record and playback pages and how the API can access the navigation between Visual Script pages.

About Thick Client and Thin ClientAbout Thick Client and Thin ClientAbout Thick Client and Thin ClientAbout Thick Client and Thin Client – explains the differences between regression and load testing client modes in Oracle Functional Testing for Web Applications and Oracle Load Testing for Web Applications.

Working with the Document ObjectsWorking with the Document ObjectsWorking with the Document ObjectsWorking with the Document Objects – explains how the API uses the Document Object Model of the HTML pages to access collections, elements, and properties that define a Web page.

How the API Accesses Web Page ObjectsHow the API Accesses Web Page ObjectsHow the API Accesses Web Page ObjectsHow the API Accesses Web Page Objects – explains how the API accesses document objects.

Getting Data Bank ValueGetting Data Bank ValueGetting Data Bank ValueGetting Data Bank Values s s s – explains how the API works with Data Banks.

Using Tests ScriptletsUsing Tests ScriptletsUsing Tests ScriptletsUsing Tests Scriptlets – explains how to use VBScript from within an Oracle Functional Testing for Web Applications Visual Script to access and change internal elements and properties of the Web page being played back by a Visual Script.

Debugging Tests ScriptletsDebugging Tests ScriptletsDebugging Tests ScriptletsDebugging Tests Scriptlets – explains how to use debuggers with Test Scriptlets.

Page 336: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Overview of Testing Extensibility

316316316316 Functional Testing User's Guide

External Program ControlExternal Program ControlExternal Program ControlExternal Program Control – explains the available COM objects provided with the Oracle Application Testing Suite for using external programs to control Oracle Functional Testing for Web Applications.

Overview of Testing Extensibility

Oracle Functional Testing for Web Applications provides full flexibility and extensibility to match your Web testing needs. Oracle Functional Testing for Web Applications provides five levels of extensibility, from the simplicity of Visual Scripts, to your own fully customized external application that controls Oracle Functional Testing for Web Applications. Each user of Oracle Functional Testing for Web Applications can define the type of tests needed for a specific Web application.

The levels of Oracle Functional Testing for Web Applications extensibility let you choose the level that fits a particular testing requirement without being burdened by unnecessary advanced features.

Oracle Functional Testing for Web Applications does not requires the use of any programming language for most of the common tests that a Web application requires.

When programming is required for more advanced testing, the Oracle Functional Testing for Web Applications extensibility options use industry-standard languages, such as VBScript, Visual Basic, C++, or Java. At no point is the use of any proprietary programming language required.

Page 337: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Overview of Testing Extensibility

Chapter 10: Using the Application Programming Interface 313131317777

Extensibility Levels Overview

This section provides an overview of the five levels of the testing extensibility capabilities of Oracle Functional Testing for Web Applications. The following illustration shows the five levels of extensibility of the Oracle Functional Testing for Web Applications:

The levels are as follows: 1.1.1.1. Visual Scripts with their built-in, default tests 2.2.2.2. User Defined Test Cases in the Visual Scripts 3.3.3.3. Test Scriptlets executed within the Visual Scripts 4.4.4.4. External program controlling Oracle Functional Testing for Web

Applications The following sections explain each level.

Page 338: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Overview of Testing Extensibility

318318318318 Functional Testing User's Guide

Level 1: Visual Scripts

Visual Scripts are the first and most basic of the five levels of extensibility of Oracle Functional Testing for Web Applications. Oracle Functional Testing for Web Applications uses an object-level recorder and Visual Scripts that represent test scripts graphically as objects in a hierarchical tree diagram. Nodes of the tree represent Web pages and objects that comprise the pages, such as HTML, forms, anchors, images, links, scripts, etc. The following illustration shows a sample of a recorded page in a Visual Script:

Visual Scripts include default tests that automatically compare recorded pages and objects when the Visual Scripts are played back against current versions of the Web pages. The default tests verify the existence of the following types of page items: ♦ Anchors ♦ ActiveX Controls ♦ Elements ♦ Forms ♦ Frames ♦ HTML ♦ Images ♦ Image Maps ♦ Links ♦ Java Applets ♦ Scripts

You can modify the default existence tests for a specific page, for all pages in a Visual Script, or a specific node in a Visual Script. You can turn off (or turn on again) default tests for specific nodes to indicate which areas of the Web application are expected to change and do not need precise comparison to the recorded baseline.

When a Web page or application changes, Oracle Functional Testing for Web Applications lets you update the recorded Visual Script to the new

Page 339: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Overview of Testing Extensibility

Chapter 10: Using the Application Programming Interface 319319319319

baseline with a single mouse click. Chapters 3 and 4 in this manual explain how to record and work with Visual Scripts.

Level 2: User-Defined Test Cases & Data Banks

Visual Scripts can be edited visually to augment the default tests with additional tests, such as text matching tests, form element tests, and server response time tests. These additional tests are one part of the second level of extensibility of the Oracle Functional Testing for Web Applications. The following illustration shows a sample Visual Script with a user-inserted text matching test case:

User-defined test cases can be added to Visual Scripts with a few mouse clicks. Oracle Functional Testing for Web Applications includes the following types of user-defined test cases that can be inserted quickly and easily into Visual Scripts:

♦ Text matchingText matchingText matchingText matching – verifies that specific text is either present or absent in a page. For example, you may want a test that verifies a search result page contains the text “Your search returned the following matches,” or that another page does not contain the message “Server Error.”

♦ Form elementForm elementForm elementForm element – verifies a specific parameter of a form element. For example, you may want a test that checks the content of a Web page form field.

♦ Server response timeServer response timeServer response timeServer response time – checks the server response time for a specific part of a transaction. For example, you may want a test that measures

Page 340: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Overview of Testing Extensibility

320320320320 Functional Testing User's Guide

and verifies the server response time for a specific Web transaction as seen by an end user.

Visual Scripts can also mask tests that are not important or are expected to indicate changes to the Web page or application.

Another feature of the second level of extensibility of Oracle Functional Testing for Web Applications is the ability to connect Data Banks to Visual Script parameters. When you need to test a Web application using various sets of input data, the Oracle Functional Testing for Web Applications Data Bank Wizard provides a convenient way to connect data sources to Visual Scripts and perform data-driven testing. The following illustration shows a sample Visual Script Parameter node with defined variables and an external Data Bank file:

Data Banks allow the test to run through several iterations with different sets of data, and optionally to perform result comparisons based also on variable data. Like the first level of extensibility, adding user-defined Test Cases and connecting Data Banks to the Visual Script are done without the need for programming.

Page 341: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Overview of Testing Extensibility

Chapter 10: Using the Application Programming Interface 321321321321

Extending Visual Script Capabilities with Programming

As powerful as Visual Scripts are, there may be circumstances where Web testing requires specialized capabilities to achieve specific test objectives. Some examples are communicating with external programs or databases, performing tests that use custom algorithms to verify page content, and performing conditional navigation of a Web site based upon dynamically changing data.

Oracle Functional Testing for Web Applications provides additional testing flexibility and extensibility through the Application Programming Interface (API). The API can be used with standard programming languages, such as VBScript, Visual Basic, Java, and C++ to extend the capabilities of Visual Scripts. The API has procedures and methods that let you access Web page objects, get Data Bank values, and change Visual Script navigation.

Oracle Functional Testing for Web Applications provides ways to extend Visual Script testing capabilities using the API with Test Scriptlets and External Programs. The following sections explain the programming extensibility capabilities of Oracle Functional Testing for Web Applications.

Level 3: Test Scriptlets

The third level of extensibility of Oracle Functional Testing for Web Applications uses Test Scriptlets. Test Scriptlets are VBScript code snippets that can be added as an internal part of the Oracle Functional Testing for Web Applications Visual Scripts. You create custom Test Scriptlets using Oracle Functional Testing for Web Applications and its built-in scripting environment.

Test Scriptlets are inserted into the Visual Script and are executed before playback of a Visual Script page or executed after playback of a Visual Script page.

Page 342: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Overview of Testing Extensibility

322322322322 Functional Testing User's Guide

The following illustration shows a sample Visual Script with a Test Scriptlet:

Test Scriptlets use the Visual Basic Scripting Edition (VBScript) scripting language, one of the scripting languages supported for Web pages. It is not necessary to learn a proprietary development language. VBScript is very similar to Visual Basic and will be familiar to anyone with prior programming experience.

Level 4: External Programs

The fourth level of extensibility of the Oracle Application Testing Suite allows custom external programs to control Oracle Functional Testing for Web Applications and drive functionality. This feature lets you integrate Oracle Functional Testing for Web Applications in a broader testing suite.

External programs that call the Oracle Application Testing Suite products can be written with any Component Object Model (COM)-enabled programming language or development environment. Typical development languages include Visual C/C++, Visual Basic, Java, etc.

Oracle Functional Testing for Web Applications is instantiated as COM server and the properties, methods, and events are available to any COM client program. The following illustration shows sample Visual Basic code laying back a Visual Script:

Page 343: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Overview of Testing Extensibility

Chapter 10: Using the Application Programming Interface 323323323323

The following Oracle Functional Testing for Web Applications methods are available to custom programs:

♦ Initialize instances of the full or minimum Oracle Functional Testing for Web Applications

♦ Open Workspaces

♦ Run Visual Scripts

♦ Execute code on Visual Script play back events

♦ Stop Visual Scripts

♦ Terminate the instance of Oracle Functional Testing for Web Applications

See the External Program Control section of this chapter for more information about creating external programs to drive Oracle Functional Testing for Web Applications. See the Command Reference in the Oracle

Page 344: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Overview of Testing Extensibility

324324324324 Functional Testing User's Guide

Functional Testing for Web Applications Application Programming Interface Reference for more information about the available properties, methods, and events in the API to control Oracle Functional Testing for Web Applications.

Page 345: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Visual Script Programming

Chapter 10: Using the Application Programming Interface 325325325325

Visual Script Programming

When you record a Visual Script, Oracle Functional Testing for Web Applications records the Web page source and the navigation between pages as part of the Visual Script. In addition to the default tests, you can insert Test Scriptlets into Visual Scripts.

Test Scriptlets

Test Scriptlets are VBScript code snippets that are an internal part of the Oracle Functional Testing for Web Applications Visual Scripts. You create custom Test Scriptlets using Oracle Functional Testing for Web Applications. Test Scriptlets can be inserted into the Visual Script as tests that get executed before playback of a Visual Script page or executed after playback of a Visual Script page.

Test Scriptlets use the rswObject object of the API. Variables are variants.

Page 346: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

About Visual Script Navigation

326326326326 Functional Testing User's Guide

About Visual Script Navigation Before you start working with the API, it is important to understand how Visual Scripts play back Web pages. The following illustration shows the internal and visual components of a Visual Script and the playback sequence.

During playback, the Visual Script executes the BeforePagePlay method before loading the Web page into the browser and before the previous Visual Script page navigation occurs. Custom code inserted into the BeforePagePlay method affects the navigation of the previous page of the Visual Script.

The Visual Script playback then compares the differences between the recorded page (Master page) and current page in the browser (Tested page).

The AfterPagePlay method executes after the page is loaded into the browser and after all default Existence test, Validation tests, and user-inserted test cases are executed. Custom code inserted into the AfterPagePlay method affects the navigation of the current page of the Visual Script. The navigation to the next page occurs after the AfterPlagePlay method executes.

With Test Scriptlets, you create your own VBScript code using a script editor in Oracle Functional Testing for Web Applications. A Test Scriptlet Before accesses the BeforePagePlay method and a Test Scriptlet After accesses the AfterPagePlay method.

Page 347: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

About Thick Client and Thin Client

Chapter 10: Using the Application Programming Interface 327327327327

The code used for Test Scriptlets can access the Document Object Model of the Web page, evaluate and modify elements and properties, access Data Bank values, and change Visual Script page navigation programmatically based upon specific conditions.

About Thick Client and Thin Client

Thick Client and Thin Client refer to the capabilities of the Web Browser control used to play back Visual Scripts. Thick Client is a fully functional browser control used for performing regression testing on Web applications. The Visual Scripts are played back using full browser capabilities. Thick Client mode requires more resources and is less scalable than Thin Client, and should be used for regression testing and for special cases in load testing. One reason for using Thick client in load testing is for Web pages that include scripts requiring large amounts of client-side processing.

Thin Client is a browser-control emulator that is used for load testing of a Web application. Thin Client is a less resource (i.e. CPU usage and memory consumption per process) intensive method that provides a high level of Web compatibility and Visual Script verification. Thin client mode consumes fewer system resources per process than Thick Client, and is able to run more virtual users on a given agent workstation.

When creating custom Test Scriptlets, it is important to know if the Visual Script will be played back in Thick Client (regression testing) or Thin Client (load testing). The API reference specifies which methods, properties, and procedures can be used with Thick Client and/or Thin Client modes.

Working with Document Objects

The API lets you access HTML Document Objects using Test Scriptlets in a Visual Script. The API provides methods that let you get document objects, find and manipulate Web page elements and properties, access Data Banks, and change page navigation.

To use the Test Scriptlets, it is important to be familiar with HTML, Dynamic HTML, the Document Object Model, and Web page scripting using VBScript or JavaScript. This section provides a brief overview of document objects and the object hierarchy. See Appendix B for a list of

Page 348: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Document Objects

328328328328 Functional Testing User's Guide

Web resources where you can find more information about Dynamic HTML, the Document Object Model, and Web page scripting.

About the Document Object Hierarchy

Web page documents are represented as a hierarchy of parent, child, and sibling objects. Objects are items that make up a Web page. The top-level object is the parent document. The parent document contains child objects, which in turn can also contain child objects. Objects on the same level of the hierarchy are sibling objects.

The following HTML sample shows how a page is defined in the HTML source. <HTML> <HEAD> <TITLE>Document Title</TITLE> </HEAD> <BODY> <DIV> <P><A HREF="contents.html">Contents</A></P> </DIV> <IMG SRC="contents.gif"> </BODY> </HTML>

The parent-child-sibling structure of the HTML elements can be represented in the following hierarchy:

HTML

BODY

TITLE

HEAD

DIVIMG

P

A

Document Object Hierarchy

HTML represents the top-level document with the child objects HEAD and BODY. The HEAD object is a child of HTML and contains the child property TITLE. The BODY object is the child of HTML and contains the child objects IMG and DIV, which are sibling objects. The DIV object

Page 349: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Document Objects

Chapter 10: Using the Application Programming Interface 329329329329

is the child of BODY and contains the child P, which in turn is the parent of A.

The HTML hierarchy can also be represented using “dot” notation, as follows:

documentObject.child.property For example, in the above hierarchy, the inner HTML of the document object can be represented as follows: document.body.innerhtml

Multiple objects of the same type in a Web page are grouped into collections. Objects within a collection can also be represented using dot notation and a zero-based index value, as follows: document.images(0) This represents the first image in the collection of images on the Web page in source order. When developing custom tests for use with Oracle Functional Testing for Web Applications Visual Scripts, you can use the object references to locate individual objects within a Web page. For example, you can use the object model to determine the number of links on a page.

Document objects contain a variety of collections, elements, methods, and properties that can be accessed and manipulated using the Document Object Model and Oracle Functional Testing for Web Applications API. The API provides methods for getting the Document Object Model of Web pages recorded to a Visual Script. However, not all objects have defined collections in the Dynamic HTML Object Model. See Appendix B for lists of collections, elements, and properties that can be used with HTML and Dynamic HTML.

About Document Object Methods

Document objects have methods associated with them. Methods define the actions that can be performed on document objects. For example, links can be clicked and forms can be submitted or reset.

When developing custom tests for use with Oracle Functional Testing for Web Applications Visual Scripts, you can use the methods to perform

Page 350: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Document Objects

330330330330 Functional Testing User's Guide

actions on a Web page in the Visual Script. For example, you can access and click links programmatically, as follows:

documentObject.links(0).click

This represents a mouse click on the first HREF link on the Web page in source order.

About Document Object Properties

Document objects also have properties associated with them. Properties provide specific details about the attributes of particular Web page element. For example, links have a destination URL as an HREF attribute. Other elements have a variety of properties, such as a name, colors, values, or inner text.

When developing custom tests for use with Oracle Functional Testing for Web Applications Visual Scripts, you can access the properties to query or set attributes of a Web page’s elements in the Visual Script. The properties are useful for checking various aspects of the Web page. You can query an element property using the following dot notation and a script variable:

varname = documentObject.child.property You can set an element property using the following dot notations:

documentObject.child.property = value

documentObject.Collection[("name")](index).property = value

For example, you can query links programmatically, as follows:

myval=documentObject.links(0).href

This gets the value of the HREF property of the first link on the page, in source order, and assigns it to the script variable myval. The following example Test Scriptlet displays a list of all of the links in a recorded Web page in the Oracle Functional Testing for Web Applications results log pane: 'setup the variables dim topdoc, numlinks, hrefVal, linkIndex, indexVal 'get the document object using API Set topdoc=om.getTopDocument()

Page 351: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Working with Document Objects

Chapter 10: Using the Application Programming Interface 331331331331

'determine how many links on the page 'from the "length" property of the object model numlinks=topdoc.links.length 'loop through the links and display link index and 'HREF value in Oracle Functional Testing for Web Applications results log pane if numlinks<>0 then for linkIndex = 0 to numlinks-1 hrefVal=topdoc.links(linkIndex).href indexVal="Link("+Cstr(linkIndex)+")" call testlog (indexVal,"",hrefVal) next end if

About Dynamic HTML Events

Events are actions that occur when a user interacts with a Web page in a browser. These include clicks on page, submitting a form, or moving the mouse over specific object. Dynamic HTML events fire “handlers” that provide some type of programmatic response in VBScript or JavaScript when the Web page is viewed in a browser. Examples of events in Dynamic HTML are onclick, onsubmit, and onmouseover. The events fire the user-defined handlers referenced by the events in the inline HTML. User defined handlers can be VBScript or JavaScript functions or inline property settings. Oracle Functional Testing for Web Applications records event handler actions based upon the settings you define in the Event Recording oEvent Recording oEvent Recording oEvent Recording options. You can also use the FireEvent method of the API to fire event handlers programmatically.

When developing custom tests for use with Oracle Functional Testing for Web Applications Visual Scripts, you can perform validation tests on client side JavaScript functions on a Web page. Use the parentwindow property of the document object to specify the function name and parameters, as follows:

varname = documentObject.parentwindow.functionName(params…) The following example Test Scriptlet code gets a value from a Data Bank and passes it to the Web page Java function validdate. If the validdate function returns True, the date value is valid, otherwise an

Page 352: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

How the API Accesses Web Page Objects

332332332332 Functional Testing User's Guide

error number and description are passed to Oracle Functional Testing for Web Applications. dim doc,retval,date set doc=om.gettopdocument call play.getdatabankvalue("datevariable",date) retval=doc.parentwindow.validdate(date) if not retval then err.number=9999 err.description="not a valid date" end if

How the API Accesses Web Page Objects

The API provides methods for getting document objects of Web pages recorded to Visual Scripts. You can also use the Document Object Model to access collections, elements, and properties that are part of the Web pages.

Visual Script Test Scriptlets use the API and the Document Object Model to access Web page objects, collections, and properties. The code executed by the Test Scriptlet is not part of the Web page and is not executed by the browser like scripts in the Web page source. The Test Scriptlets are part of the Visual Script and are executed by Oracle Functional Testing for Web Applications.

Test Scriptlets use the rswObject object of the API. Variables are variants.

Getting the Document Object

The API includes the following methods that get the document object of a Web page recorded to a Visual Script:

MethodMethodMethodMethod DescriptionDescriptionDescriptionDescription

FindDoc Find an HTML document by frame name, title, URL, or parent document.

FindElement Find an HTML element in the current Visual Script page by property, tag name, element range, or root element.

GetTopDocument Get the top document object of the current

Page 353: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

How the API Accesses Web Page Objects

Chapter 10: Using the Application Programming Interface 333333333333

page of the Visual Script.

Once an object variable has been set in the Test Scriptlet you can query or change HTML element properties programmatically.

Getting the Top Document Object You can use the GetTopDocument method of the API to get the document object. The following code snippet sets the document object to the variable topdoc. Dim topdoc Set topdoc=Om.GetTopDocument() GetTopDocument gets the document object for Web pages that are not in a Frameset and the top document object of Web pages in a Frameset.

You can use dot notation programming to access specific properties, such as the page title, Uniform Resource Locator, and the length of links or forms collections. For example the following code snippet sets the document title, URL, and links collection length to the variables docTitle, docUrl, and linksLength, respectively: dim topdoc, docTitle, docUrl, linksLength Set topdoc=Om.GetTopDocument() docTitle=topdoc.title docUrl=topdoc.url linksLength=topdoc.links.length See Appendix B for lists of collections, elements, and properties that can be used with HTML and Dynamic HTML document objects.

Getting Document Objects in a Frameset You can use the FindDoc method of the API to get the document object of an HTML document in a Frameset. The FindDoc method lets you specify which document by the frame Name value, the document title, or by the document URL. You can specify the name, title, or URL using Visual Basic Like operator pattern matching. The name, title, and URL parameters are case sensitive.

If the Visual Script page using the Test Scriptlet is part of a Frameset, and you want to get the document object of a page in another frame, you also have to specify the top document of the Frameset. The following code snippet gets the parent document object of the Frameset and then gets the

Page 354: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

How the API Accesses Web Page Objects

334334334334 Functional Testing User's Guide

document located in the Frame named “Contents” and sets it to the variable framedoc: Dim parentdoc, framedoc Set parentdoc=om.GetTopDocument() Set framedoc=Om.FindDoc("Cont*","*","*",parentdoc) You can leave out the optional parameters specified as any value using "*", as follows: Set framedoc=Om.FindDoc("Cont*",,,parentdoc) If the Visual Script page using the Test Scriptlet was recorded from a sub frame and you want to get the document object of the current Visual Script page in a sub frame, you do not need to specify the parent document object. The following code snippet gets the document object of the document with the <TITLE> "Introduction" to the variable framedoc: Dim framedoc Set framedoc=Om.FindDoc(,"Intro*")

Finding HTML Elements

You can use the FindElement method of the API to find a specific element within the HTML source of a recorded Visual Script page. You can use the object model to query or change HTML element properties programmatically. The following code snippet finds the INPUT element of name="FirstName" and sets the document object to the variable myElement: dim myElement, myElementVal Set myElement=om.Findelement("FirstName","INPUT","name") You can use the object model to set the value of Form INPUT elements. For example, the following code snippet sets the value of the FirstName INPUT element to “Chris”: myElement.value="Chris"

You can also use the object model to get the outer HTML value. For example, the following code snippet sets the outerhtml property to the variable myElementval: myElementVal=myElement.innerhtml

Page 355: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

How the API Accesses Web Page Objects

Chapter 10: Using the Application Programming Interface 335335335335

You can also use the object model to perform mouse clicks on HTML elements. The following code snippet finds the INPUT element of type="submit" and sets the document object to the variable myElement, and then performs a mouse click: dim myElement Set myElement=om.Findelement("submit","INPUT","type") myElement.click

Finding an Element Within a Specific Range You can also use the FindElement and FindElementValue methods to find elements within a specific range of the HTML source of a recorded Visual Script page. The following code snippet finds the value of the first OPTION element between INPUT NAME="email" and INPUT NAME="Submit": dim parentDoc, propPattern, elementValue dim fromElement, toElement Set parentDoc=om.getTopDocument() propPattern="*" 'set the "from element" as <INPUT NAME="email"> Set fromElement=om.findelement("email*","INPUT", "NAME","","",parentDoc) 'set the "to element" as <INPUT NAME="Submit"> Set toElement=om.findelement("Submit","INPUT", "NAME","","",parentDoc) 'find the first OPTION value between "from-to" elements elementValue=om.findelementValue(propPattern,"OPTION", "VALUE",fromElement,toElement,parentDoc) 'display the value in the Summary column of Oracle Functional Testing for Web Applications Call testlog ("","",elementValue)

Matching Patterns in the HTML Source You can use the MatchHtml method of the API to find specific string patterns within the HTML source of a page recorded to a Visual Script. With the MatchHtml method, you specify left and right text string patterns to search for and the method returns the text string between the specified patterns. The following code snippet finds the text string between the first instance of <A href= and >. The WriteToLog

Page 356: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

How the API Accesses Web Page Objects

336336336336 Functional Testing User's Guide

procedure displays the results in the Oracle Functional Testing for Web Applications Results log pane. dim topdoc, myMatch, resultb resultb=gen.matchHtml(myMatch, "<A href=",">","") Call testlog(,resultb,myMatch) resultb is a Boolean that returns True or False. The myMatch variable is used to store the text string returned from the HTML source.

You can find pattern matches in the HTML source of a specific frame by including the frame name in the MatchHtml method, as follows:

resultb=gen.matchHtml(myMatch, "<A href=",">","main") When specifying the left and right string patterns to match, you can use the question mark (?) and asterisk (*) wildcard characters. The question mark matches zero or one character. The asterisk matches zero or more characters. You use the wildcard character in place of character patterns that are part of the HTML source. The following example shows how the question mark and asterisk can be used to search for strings containing quotation marks in the HTML source:

resultb=gen.matchHtml(myMatch, "href=?index*",">","")

Setting Properties Using the Object Model

You can use the document object model to query or change HTML element properties programmatically. The following code snippet gets the top level document object and sets the values of the first and second check boxes of the first form of the Web page: Set topdoc=Om.GetTopDocument() topdoc.forms(0).elements("Interest")(0).checked=True topdoc.forms(0).elements("Interest")(1).checked=False .forms(0) represents the first forms collection of the Web page. .elements("Interest")(0) and .elements("Interest")(1) represent the first and second elements, named "Interest", of the elements collection of forms(0). .checked is the checked property of the elements. The forms and elements collections use a zero-based index to locate forms on a page and elements within the forms. The index

Page 357: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Getting Data Bank Values

Chapter 10: Using the Application Programming Interface 337337337337

is based on the source order of the FORM elements and each child INPUT element of each form in the Web page.

Getting Data Bank Values

The API provides the following methods for getting and setting Data Bank values that you can use to change HTML attributes, Form values, and other properties of a Web page:

MethodMethodMethodMethod DescriptionDescriptionDescriptionDescription

GetDatabankValue Get a value from a Data Bank file.

SetDatabankValue Set a value in a Data Bank variable.

Before you can access Data Bank values (from a file) using the API, you must create a Data Bank file containing the data you plan to use as part of testing. Data Bank files are comma-delimited ASCII files with the field names as column headers on the first line of the file. Subsequent lines of the file contain data. Oracle Functional Testing for Web Applications uses the \DataBank subdirectory of the installation directory (C:\OracleATS\OFT is the default) as the default location for Data Bank files.

After you create a Data Bank file, you must also map and bind the Data Bank field names to Visual Script variables using the Data Bank Wizard.

You can set Data Bank internal variables using the SetDatabankValue method. Internal Data Bank variables are mapped to Visual Script parameters.

Setting Up Data Bank Files

The content of the Data Bank files that you use with the API depends upon the results you want to achieve in testing your Web pages. You can set up a simple Data Bank file to populate a single Web page Form field, as follows: Search Lamps Plants Paints

Page 358: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Getting Data Bank Values

338338338338 Functional Testing User's Guide

Search is the name of the Data Bank field. Lamps, Plants, and Paints are the actual data values.

You can set up a Data Bank file to populate multiple Web page Form fields, as follows: FirstName,LastName,Mail,Phone John,Smith,[email protected],(781) 003-0000 Mary,Ellen,[email protected],(781) 003-0001

If a data value contains a comma, place quotation marks around the value, as follows: John,Smith,"Anytown, MA",(781) 993-8500

You can also combine Form field input values with multiple check box or option button settings, as follows: Search,Option1,Option2,Option3 Lamps,True,False,False Lamps,False,True,False Lamps,False,False,True Plants,True,False,False Plants,False,True,False Plants,False,False,True Paints,True,False,False Paints,False,True,False Paints,False,False,True After you create a Data Bank file, you must map and bind the Data Bank field names to Visual Script variables.

Setting Up Visual Script Variables

To access Data Bank values using the API, you need to map and bind Visual Script variables to field names in the Data Bank file. The procedure is the same as using Data Bank files with Visual Script parameters. The Working with Data Banks section of Chapter 8 in this manual explains how to map and bind Data Banks to Visual Scripts.

The names you use to define Visual Script variables in the Data Bank Wizard are the names you will reference using the GetDataBankValue and SetDataBankValue methods of the API.

Page 359: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Getting Data Bank Values

Chapter 10: Using the Application Programming Interface 339339339339

Getting Data Bank Values Using the API

Once you have created a Data Bank file and mapped and bound the Field names to Visual Script variables, you can use the GetDataBankValue method of the API to access the Data Bank values. You can use Data Bank values to change Web page attributes programmatically.

The following Test Scriptlet code snippet finds the INPUT element of name="search", sets the value using the Data Bank value, and then clicks the Form INPUT button of type=Submit. "var_Search" is the name of the Visual Script variable that is mapped and bound to the Data Bank field name using the Data Bank Wizard. The "var_Search" variable is defined as an external variable in the Data Bank Wizard. dim searchField, searchText, submitButton 'Indicate that we will replace the navigation 'for the previous page play.replaceNav 'Map and bind the Visual Script variable "var_Search" 'to the "Search" field in the Data Bank file using 'the Data Bank wizard 'Get the Data Bank value from the Visual Script "var_Search" and store the value in "searchText" call play.getdatabankvalue("var_Search",searchText) 'Get the Search Input Element Object using FindElement Set searchField=om.Findelement("Search","INPUT","name") 'Set the Data Bank value to the Form field value searchField.value=searchtext 'Get the Submit button Element Object using FindElement Set submitButton=om.Findelement("submit","INPUT","type") 'Click the Submit button submitButton.click The above code snippet uses the FindElement method of the API to locate the Form INPUT elements. You can also use the object model and dot notation programming to set the values explicitly. The following code snippet gets the Data Bank value for a form field and three option buttons. The code then sets the form element value, the option button values and clicks the Submit button using the object model. dim topdoc, searchText dim radio1, radio2, radio3

Page 360: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Getting Data Bank Values

340340340340 Functional Testing User's Guide

'Indicate that we will replace the navigation 'for the previous page play.replaceNav 'Get the Data Bank values call play.getdatabankvalue("var_option1",radio1) call play.getdatabankvalue("var_option2",radio2) call play.getdatabankvalue("var_option3",radio3) call play.getdatabankvalue("var_Search",searchtext) 'Get my Document Object Model through GetTopDocument() set topdoc=om.gettopdocument() 'Use VBScript Object Model navigation to set 'the form value explicitly. topdoc.forms(0).elements("Interest")(0).checked=radio1 topdoc.forms(0).elements("Interest")(1).checked=radio2 topdoc.forms(0).elements("Interest")(2).checked=radio3 topdoc.forms(0).elements("Search").value=searchText 'Submit the form to generate a navigation topdoc.forms(0).elements("Submmit").click

How Oracle Functional Testing for Web Applications Gets Data Bank Records

The current Data Bank record is determined by the record pointer of Oracle Functional Testing for Web Applications. The current record can be set using the Data Bank Wizard or the Iterate options.

When you play back a Visual Script, Oracle Functional Testing for Web Applications increments the current record pointer on each playback. After playing back the last record of the Data Bank file, the record pointer returns to the first record of the Data Bank file.

When you Iterate a Visual Script, Oracle Functional Testing for Web Applications plays back the Visual Script once for each record specified in the Iterate settings. If you set Iterations from the “First” to “Last” records in the Data Bank file, playback iterations stop after the last record in the Data Bank file.

Setting Data Bank Values Using the API

You can set the value of internal variables defined in the Data Bank Wizard. Internal Data Bank variable values can be passed to Visual Script parameters.

Page 361: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Test Scriptlets

Chapter 10: Using the Application Programming Interface 341341341341

You can use the SetDataBankValue method of the API to set the Data Bank variables to change Web page attributes programmatically.

The following code snippet sets text plus a random number as a login value and submits the value to a Web page form. The var_myValue variable is defined as an internal variable in the Data Bank Wizard. dim loginField, loginText, submitButton, setDb 'Map the Visual Script variable "var_myValue" 'as an Internal variable using the Data Bank wizard 'Specify any Expression as the internal 'variable value 'Define a random login value to set to the Visual 'Script variable Randomize setDb="Mylogin" & CStr(FormatNumber(Rnd*10,0)) 'Set the value call play.SetDatabankValue("var_myValue",setDb) 'Get the Data Bank value from the Visual 'Script variable "var_myValue" 'and store the value in "loginText" call play.getdatabankvalue("var_myValue",loginText) 'Get the Login Input Element Object using FindElement Set loginField=om.Findelement("Login", "INPUT","name") 'Set the Data Bank value to the Form field value loginField.value=loginText 'Get the Submit button Element Object using FindElement Set submitButton=om.Findelement("submit", "INPUT","type") 'Click the Submit button submitButton.click

Using Test Scriptlets

Oracle Functional Testing for Web Applications includes the following two menu options for adding Test Scriptlets to Visual Scripts:

♦ Selecting Tests Tests Tests Tests ���� Insert Insert Insert Insert Test Scriptlet Before Test Scriptlet Before Test Scriptlet Before Test Scriptlet Before adds a Test Scriptlet that will run before playing back the Visual Script page.

Page 362: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Test Scriptlets

342342342342 Functional Testing User's Guide

♦ Selecting Tests Tests Tests Tests ���� Insert Insert Insert Insert Test Scriptlet AfterTest Scriptlet AfterTest Scriptlet AfterTest Scriptlet After adds a Test Scriptlet that will run after playing back the Visual Script page.

When you add a Test Scriptlet to a Visual Script, the Oracle Functional Testing for Web Applications browser pane changes to a script-editing pane where you can define your own VBScript code. The following illustration shows the script-editing pane:

When you first add a Test Scriptlet test, the script-editing pane only contains the text “Your Script Here.” You enter your Test Scriptlet code and comments to define the test.

Script Editing Pane

Test Scriptlet in Visual Script

Page 363: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Test Scriptlets

Chapter 10: Using the Application Programming Interface 343343343343

The following illustration shows the script-editing pane with a VBScript code snippet:

Enter your VBScript code into the script-editing pane. Test Scriptlets use the rswObject object of the API. Variables are variants. Click DoneDoneDoneDone and Save the Visual Script when finished editing the Test Scriptlet.

The Oracle Functional Testing for Web Applications Reference contains a reference for the API methods and properties that you can use in your custom code. The following section provides additional information about creating and debugging Test Scriptlets.

Web Page Scripting vs. Test Scriptlets

Test Scriptlets use the Visual Basic Scripting Edition (VBScript) scripting language, one of the scripting languages supported for Web pages. However, the Test Scriptlet code is not part of the Web page and is not executed by the browser like scripts in the Web page source. The Test Scriptlets are part of the Visual Script and are executed by Oracle Functional Testing for Web Applications.

The Test Scriptlet code is executed by Oracle Functional Testing for Web Applications as in-line code. Function Procedures and Sub Procedures are not supported.

Test Scriptlet in Script Editing Pane

Page 364: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Using Test Scriptlets

344344344344 Functional Testing User's Guide

When writing code for Test Scriptlets, do not include Web page <SCRIPT> </SCRIPT> tags around the Test Scriptlet code.

Variables and Error Handling

When creating Test Scriptlets, the following statements are automatically defined for the Test Scriptlet internally within Oracle Functional Testing for Web Applications by default. Option Explicit on error resume next

It is not necessary to include these statements in your Test Scriptlets.

All variables are variants and must be declared. Variables can be shared between Tests Scriptlets.

Oracle Functional Testing for Web Applications displays compiler and run-time error messages in the Visual Script node and the Script editing pane. By default, Test Scriptlet execution continues even if a run-time error occurs. You can have Oracle Functional Testing for Web Applications halt execution on run-time errors by selecting Options Options Options Options ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script, opening the General section of the Playback options, and then selecting Always invoke script debugger on scripting Always invoke script debugger on scripting Always invoke script debugger on scripting Always invoke script debugger on scripting errorserrorserrorserrors. The on error resume next statement will not be added for the Test Scriptlet. Run-time errors that occur during playback of a Test Scriptlet will invoke the installed script debugger.

You can also build in error reporting for the custom tests you create for your Web application using the errNumber and errDescription properties of the API. The errNumber provides a way to indicate to Oracle Functional Testing for Web Applications that your custom test passed or failed.

Editing Test Scriptlets

After you add a Test Scriptlet to a Visual Script, you can edit the code at any time by double-clicking the Test Scriptlet Before or Test Scriptlet After node of the Visual Script. The Test Scriptlet opens in the Script editing pane.

Page 365: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Debugging Test Scriptlets

Chapter 10: Using the Application Programming Interface 345345345345

Debugging Test Scriptlets

You can invoke the debugger manually by inserting a Stop command into the Test Scriptlet code.

You can also enable the debugger in Oracle Functional Testing for Web Applications by selecting Options Options Options Options ���� New ScriptsNew ScriptsNew ScriptsNew Scripts or Current ScriptCurrent ScriptCurrent ScriptCurrent Script, opening the General section of the Playback options, and then selecting Always invoke script debugger on scripting errorsAlways invoke script debugger on scripting errorsAlways invoke script debugger on scripting errorsAlways invoke script debugger on scripting errors.

If you have Microsoft® Visual Studio installed, Oracle Functional Testing for Web Applications uses the Microsoft Development Environment for Test Scriptlet debugging. If you do not have Visual Studio installed, you can install the Microsoft Internet Explorer Script Debugger from Microsoft and Oracle Functional Testing for Web Applications will use that debugger. Oracle Functional Testing for Web Applications uses whichever debugging tool was last installed.

Debugging with the Microsoft Script Debugger

With Microsoft Script Debugger, if a Run-time exception error (or Stop command) occurs in a Test Scriptlet when playing back a Visual Script, the debugger opens the Test Scriptlet as a VBScript script block with Oracle Functional Testing for Web Applications as an attached process:

Page 366: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Debugging Test Scriptlets

346346346346 Functional Testing User's Guide

You can use the available features of the debugger to evaluate the Test Scriptlet code.

NoteNoteNoteNote: Any edits you make to fix problems in Test Scriptlet code must be made in the Oracle Functional Testing for Web Applications script-editing pane. The Test Scriptlets are saved as an internal part of the Oracle Functional Testing for Web Applications Visual Scripts, which the debugger cannot save.

The debugger provides options for stepping through code. The following sections provide basic information about using the step and view local variable capabilities. For additional information about using the Microsoft Script Debugger, refer to the Microsoft online help topics for the debugger.

Stepping Through Scripts You can use the step options of the debugger to view the execution of individual lines of code in a Test Scriptlet. The following options are available:

Step IntoStep IntoStep IntoStep Into – steps into the function or sub procedure. Since Tests Scriptlets in Oracle Functional Testing for Web Applications do not support

Page 367: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Debugging Test Scriptlets

Chapter 10: Using the Application Programming Interface 347347347347

functions or sub procedures, this command simply executes the current script command.

SSSStep Overtep Overtep Overtep Over – steps over the current command and executes the next command in the script.

Step OutStep OutStep OutStep Out – steps out of a function or sub procedure. Since Tests Scriptlets in Oracle Functional Testing for Web Applications do not support functions or sub procedures, this command simply executes the current script command.

Stopping Debugging While debugging in the Microsoft Script Debugger, Oracle Functional Testing for Web Applications is in a suspended state. The current Visual Script playback is halted at the point where the Test Scriptlet started the debugger. You must stop the Microsoft Script Debugger to restore Oracle Functional Testing for Web Applications to a running state and continue the Visual Script playback.

Debugging with the Microsoft Development Environment

With Microsoft Visual Studio installed, if a Run-time exception error (or Stop command) occurs in a Test Scriptlet when playing back a Visual Script, the following message appears:

Click YesYesYesYes to debug the Test Scriptlet. The debugger then displays a message asking if you would like to open a project for debugging:

Page 368: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Debugging Test Scriptlets

343434348888 Functional Testing User's Guide

Click NoNoNoNo. The debugger opens the Test Scriptlet as a VBScript script block with Oracle Functional Testing for Web Applications as an attached process:

You can use the available features of the debugger to evaluate the Test Scriptlet code.

NoteNoteNoteNote: Any edits you make to fix problems in Test Scriptlet code must be made in the Oracle Functional Testing for Web Applications script-editing pane. The Test Scriptlets are saved as an internal part of the Oracle Functional Testing for Web Applications Visual Scripts, which the debugger cannot save.

The debugger provides options for stepping through code, viewing variable values, setting watches, and viewing threads and processes. The following sections provide basic information about using the step and view local variable capabilities. For additional information about using the Microsoft Development Environment, refer to the Microsoft online help topics for the debugger.

Page 369: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Debugging Test Scriptlets

Chapter 10: Using the Application Programming Interface 349349349349

Viewing Local Variable Values The View Locals option of the debugger lets you view the values of local variables. You can also use the Locals window view the hierarchy of objects. The following illustration shows the Locals window with two objects and four variables.

Oracle Functional Testing for Web Applications automatically creates the RswObject when you playback a Visual Script. RswObject is part of the API and has several properties that you can access programmatically using Test Scriptlets. The following illustration shows the expanded RswObject tree.

See the API Command Reference in the Oracle Functional Testing for Web Applications Reference for more information about using the RswObject properties.

The API provides methods for accessing document objects of Web pages recorded to a Visual Script. You can use the Locals window to view the

Page 370: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Debugging Test Scriptlets

350350350350 Functional Testing User's Guide

hierarchy of the document object and the values of various properties of the Web page. The following illustration shows the object model of a Web page document that was accessed using the GetTopDocument method of the API:

Stepping Through Scripts You can use the step options of the debugger to view the execution of individual lines of code in a Test Scriptlet. The following options are available:

Run to CursorRun to CursorRun to CursorRun to Cursor – executes the script to the current cursor location. Place the cursor on the line where you want execution to halt and select this option.

Step IntoStep IntoStep IntoStep Into – steps into the function or sub procedure. Since Tests Scriptlets in Oracle Functional Testing for Web Applications do not support functions or sub procedures, this command simply executes the current script command.

Step OverStep OverStep OverStep Over – steps over the current command and executes the next command in the script.

Step OutStep OutStep OutStep Out – steps out of a function or sub procedure. Since Tests Scriptlets in Oracle Functional Testing for Web Applications do not support functions or sub procedures, this command simply executes the current script command.

Detaching the Process While debugging in the Microsoft Development Environment, Oracle Functional Testing for Web Applications is in a suspended state. The

Page 371: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

External Program Control

Chapter 10: Using the Application Programming Interface 351351351351

current Visual Script playback is halted at the point where the Test Scriptlet started the debugger. You must detach the Oracle Functional Testing for Web Applications process from the Microsoft Development Environment before closing the debugger. Detaching the process restores Oracle Functional Testing for Web Applications to a running state and continues the Visual Script playback.

External Program Control

This section explains how to extend your testing using External programs to control Oracle Functional Testing for Web Applications. The Oracle Functional Testing for Web Applications Application Programming Interface Reference provides a reference to the properties, methods, and events available in the API.

Oracle Functional Testing for Web Applications includes the following COM applications and type libraries that you can use for programmatic play back of Visual Scripts:

RswMint.Exe – the minimum tester used as the Oracle Load Testing for Web Applications thick client agent. Webanlst.Exe – the full Oracle Functional Testing for Web Applications application.

RswIProgsLib.dll – the Oracle Functional Testing for Web Applications programming interface type library.

Utilities.dll – additional utility methods for database, file IO, FTP, email, and random data generation.

The following sections explain how to create Oracle Functional Testing for Web Applications objects and start the applications using Visual Basic.

Page 372: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

External Program Control

352352352352 Functional Testing User's Guide

Webanlst.Exe COM Server

Webanlst.Exe is the application that contains the properties, methods, and events available for accessing the full Oracle Functional Testing for Web Applications application from an external program. Webanlst.Exe contains the following class: ProgT Webanlst.Exe is installed and registered by the Oracle Application Testing Suite setup procedure in the installation directory (C:\OracleATS\OFT is the default). The following sections show a basic example of how to create and set an object instance, open a workspace, and playback a Visual Script. You can use the features and capabilities of your development environment to drive Oracle Functional Testing for Web Applications functionality. The Oracle Functional Testing for Web Applications Application Programming Interface Reference lists the properties, methods, and events available in the API that you can use to access Oracle Functional Testing for Web Applications features.

RSWMint.Exe COM Server

RswMint.Exe is the application that contains the events, methods, and properties available for accessing the Oracle Functional Testing for Web Applications Minimum Tester (mint) from an external program. RswMint.Exe contains the following class: ProgX RswMint.Exe is installed and registered by the Oracle Application Testing Suite setup procedure in the Oracle Application Testing Suite installation directory (C:\OracleATS\OFT is the default). The Oracle Functional Testing for Web Applications Application Programming Interface Reference lists the available properties, methods, and events.

RswIProgsLib Type Library

Oracle Functional Testing for Web Applications includes a type library that you must reference in your application. RswIProgslib.dll library is installed and registered by the Oracle Application Testing Suite setup procedure in the installation directory (C:\OracleATS\OFT is the default). The

Page 373: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

External Program Control

Chapter 10: Using the Application Programming Interface 353353353353

RswIProgsLib type library contains the properties and methods for the following properties of the ProgT and ProgX classes, as follows:

ProgT/ProgX PropertyProgT/ProgX PropertyProgT/ProgX PropertyProgT/ProgX Property ClassClassClassClass Gen IProg

Om IProgOm

Play IProgPlay

ATSUtilities Type Library

The ATSUtilities Type Library is the interface to the utility methods available for Test Scriptlets and External Program Control. The type library contains the following classes: Db FileIO Ftp Mail Random Utilities.dll is installed and registered by the Oracle Application Testing Suite setup procedure. The Utilities.dll is installed in the default installation directory (C:\OracleATS\OFT is the default). The Oracle Functional Testing for Web Applications Application Programming Interface Reference lists the available properties, methods, and events.

Referencing the Object

To use the Oracle Application Testing Suite COM server applications and type libraries, create a project in Visual Basic, select ProjectProjectProjectProject ���� ReferencesReferencesReferencesReferences, and then select the appropriate check boxes. The following table lists the Visual Basic project reference names for the Oracle Application Testing Suite applications and type libraries:

COM Server/Type LibraryCOM Server/Type LibraryCOM Server/Type LibraryCOM Server/Type Library VB Project ReferenceVB Project ReferenceVB Project ReferenceVB Project Reference Webanlst.exe Oracle Function Testing RSWMint.exe mint RswIprogLib.dll Rsw IProgs Lib Utilities.dll ATSUtilities

Page 374: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

External Program Control

354354354354 Functional Testing User's Guide

Defining Object Variables

When creating an external program to drive the full Oracle Functional Testing for Web Applications application, you must create an object with events from the Webanlst.ProgT class or mint.ProgX class, as follows: Option Explicit Dim WithEvents objectName As server.class Where:

objectName is any user defined object name.

server is the name of the Oracle Functional Testing for Web Applications COM server application. The server name for the full Oracle Functional Testing for Web Applications application is webanlst. The server name for the minimum Oracle Functional Testing for Web Applications application is mint.

class is the name of the object. The class name for the full Oracle Functional Testing for Web Applications application is ProgT. The class name for the minimum Oracle Functional Testing for Web Applications application is ProgX.

The following example creates the object variable f_tester as the object name for the full Oracle Functional Testing for Web Applications: Option Explicit Dim WithEvents f_tester As webanlst.ProgT The following example creates the object variable m_tester as the object name for the minimum Oracle Functional Testing for Web Applications: Option Explicit Dim WithEvents m_tester As mint.ProgX When using the utilities type library, you must create an object from the ATSUtilities library. The following example creates m_util as a Random class object variable: Option Explicit Dim m_util As ATSUtilities.Random

Page 375: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

External Program Control

Chapter 10: Using the Application Programming Interface 355355355355

Assigning the Object Reference

Create a procedure and assign the object reference to the variable using the Set statement, as follows: Private Sub Form_Load() Call Initialize End Sub Private Sub Initialize() 'Assign full Oracle Functional Testing for Web Applications Set f_tester = New webanlst.progT 'Assign minimum Oracle Functional Testing for Web Applications Set m_tester = New mint.progX 'Assign utilities for db access Set m_util = New ATSUtilities.Random End Sub

Opening Workspaces

Once you create and set the object, you can use the features of the API and your development environment to open a workspace. The following sample code opens the RSWDemo workspace on the button click: Private Sub cmdOpenWorkspace_Click() f_tester.play.openWorkspace "RSWDemo" End Sub

Playing Back a Visual Script

Once you open a workspace you can playback Visual Scripts. The following sample code opens and plays back the tutor1 Visual Script on the button click: Private Sub cmdPlayback_Click() List1.AddItem "Playback Started " & Time f_tester.play.openScript "tutor1" f_tester.play.doScript End Sub

Monitoring Script Events

You can monitor page and Visual Script play back events using the Event procedures in the progT and progX classes. The following sample code

Page 376: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

External Program Control

356356356356 Functional Testing User's Guide

writes the Visual Script name, page number, result, and play back duration to a list box using the PageEnd event: Private Sub f_tester_PageEnd(ByVal playIndex As Integer, _ ByVal currentScriptName As String, _ playOutcomeNumber As Integer, _ playOutcomeDescription As String, _ playOutcomeActions As Long, _ playErrTypeSet As Long, _ ByVal lastDuration As Long, _ errNumber As Long, _ errDescription As String) List1.AddItem "played page: " + CStr(playIndex) List1.AddItem "Script name: " + currentScriptName List1.AddItem "Result: " + playOutcomeDescription List1.AddItem "Time (Sec): " + CStr(lastDuration/1000) End Sub

Closing Oracle Functional Testing for Web Applications

You can use the Quit method of RswIProgslib.IProg to close the full Oracle Functional Testing for Web Applications application, as follows:

objectName.gen.quit Where:

objectName is the user defined object name for the webanlst.ProgT object.

The following example closes the full Oracle Functional Testing for Web Applications:

f_tester.gen.quit

Releasing the Object Variables

When finished using the object variables for testing, clear the variables that reference the minimum tester or the full Oracle Functional Testing for Web Applications objects. Use the Set statement and the Nothing keywords, as follows:

Set objectName = Nothing Where:

Page 377: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

External Program Control

Chapter 10: Using the Application Programming Interface 357357357357

objectName is the user defined object name for the mint.ProgX or webanlst.ProgT objects.

The following example clears the object variable f_tester as the object name for the full Oracle Functional Testing for Web Applications:

Set f_tester = Nothing

The following example clears the object variable m_tester as the object name for the minimum Oracle Functional Testing for Web Applications:

Set m_tester = Nothing

About Minimum Oracle Functional Testing for Web Applications

The minimum Oracle Functional Testing for Web Applications is an Agent running in Thick Client mode. The agent runs the Visual Script in a browser window that appears after you perform some Oracle Functional Testing for Web Applications action programmatically.

The Agent appears as a taskbar icon when you create the mint.ProgX object. The browser window appears when you open a workspace and playback a Visual Script.

The Agent and browser window automatically close when you clear the mint.ProgX object variable programmatically.

About Full Oracle Functional Testing for Web Applications

The full Oracle Functional Testing for Web Applications is the Oracle Functional Testing for Web Applications application and user interface. The full Oracle Functional Testing for Web Applications appears as a task bar icon when you perform some Oracle Functional Testing for Web Applications action programmatically, such as open a workspace and play back a Visual Script.

You can use the Quit method of RswIProgslib.IProg to close the full Oracle Functional Testing for Web Applications application before you clear the Webanlst.ProgT object variable and close your custom application.

Page 378: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

External Program Control

358358358358 Functional Testing User's Guide

[This page intentionally left blank]

Page 379: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

359359359359

A p p e n d i x A p p e n d i x A p p e n d i x A p p e n d i x AAAA Internet Status Codes

Server Status Codes

The following are the numeric codes that may be returned as Internet Status and error codes in the Oracle Load Testing for Web Applications Autopilot and the Oracle Functional Testing for Web Applications Resource Validation test.

Information Codes 00 ContinueContinueContinueContinue

The client can continue the request to the server.

101 Switching ProtocolsSwitching ProtocolsSwitching ProtocolsSwitching Protocols The server has changed the application protocol being used on this connection at the request of the client via the Upgrade message header field.

Success Codes 200 OKOKOKOK

The request completed successfully.

201 CreatedCreatedCreatedCreated The request has been fulfilled and resulted in a new resource being created.

202 AcceptedAcceptedAcceptedAccepted The request has been accepted for processing, but the processing has not been completed.

203 NonNonNonNon----Authoritative InformationAuthoritative InformationAuthoritative InformationAuthoritative Information The returned meta information in the entity-header is not the definitive set as available from the origin server, but is gathered from a local or a third-party copy.

Page 380: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Server Status Codes

360360360360 Functional Testing User's Guide

204 No ContentNo ContentNo ContentNo Content The server has fulfilled the request but does not need to return new information.

205 Reset ConReset ConReset ConReset Contenttenttenttent The server has fulfilled the request and the client should reset the document view which caused the request to be sent to allow the user to initiate another input action.

206 Partial ContentPartial ContentPartial ContentPartial Content The server has fulfilled the partial GET request for the resource.

Redirection Codes 300 Multiple ChoicesMultiple ChoicesMultiple ChoicesMultiple Choices

The requested resource corresponds to ambiguous or multiple choices.

301 Moved PermanentlyMoved PermanentlyMoved PermanentlyMoved Permanently The requested resource has been assigned a new permanent Uniform Resource Identifier (URI) and any future references to the resource should use one of the returned URIs.

302 Moved TemporarilyMoved TemporarilyMoved TemporarilyMoved Temporarily The requested resource resides temporarily under a different Uniform Resource Identifier (URI).

303 See OtherSee OtherSee OtherSee Other The response to the request can be found under a different Uniform Resource Identifier (URI) and should be retrieved using a GET method on that resource.

304 Not ModifiedNot ModifiedNot ModifiedNot Modified The client requested a resource that has not been modified.

305 Use ProxyUse ProxyUse ProxyUse Proxy The requested resource must be accessed through the proxy given by the Location field.

306 Not UsedNot UsedNot UsedNot Used Used in a previous version of the HTTP specification but is no longer used and the code is reserved.

Page 381: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Server Status Codes

Appendix A: Internet Status Codes 361361361361

307 Temporary RedirectTemporary RedirectTemporary RedirectTemporary Redirect The requested resource resides temporarily under a different Uniform Resource Identifier (URI).

Failure Codes 400 Bad RequesBad RequesBad RequesBad Request

The request could not be understood by the server due to invalid syntax.

401 UnauthorizedUnauthorizedUnauthorizedUnauthorized The requested resource requires user authentication.

402 Payment RequiredPayment RequiredPayment RequiredPayment Required Not implemented. Reserved for future use.

403 ForbiddenForbiddenForbiddenForbidden The server understood the request, but is refusing to fulfill it.

404 Not FoundNot FoundNot FoundNot Found The server has not found anything matching the Request-URI (Uniform Resource Identifier).

405 Method Not AllowedMethod Not AllowedMethod Not AllowedMethod Not Allowed The method in the Request-Line is not allowed for the resource identified by the Request-URI.

406 Not AcceptableNot AcceptableNot AcceptableNot Acceptable The response from the request has content characteristics that are not acceptable to the accept headers sent by the client.

407 Proxy AuthentProxy AuthentProxy AuthentProxy Authentication Requiredication Requiredication Requiredication Required The client must first authenticate itself with the proxy.

408 Request TimeRequest TimeRequest TimeRequest Time----outoutoutout The client did not produce a request within server timeout limit.

409 ConflictConflictConflictConflict The request could not be completed due to a conflict with the current state of the resource. The user should resolve the conflict and resubmit the request.

410 GoneGoneGoneGone The requested resource is no longer available at the server and no forwarding address is known.

Page 382: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Server Status Codes

362362362362 Functional Testing User's Guide

411 Length RequiredLength RequiredLength RequiredLength Required The server refuses to accept the request without a defined Content-Length.

412 Precondition FailedPrecondition FailedPrecondition FailedPrecondition Failed The precondition given in one or more of the request-header fields evaluated False when tested on the server.

413 Request Entity Too LargeRequest Entity Too LargeRequest Entity Too LargeRequest Entity Too Large The server is refusing to process a request because the request entity is larger than the server is willing or able to process.

414 RequestRequestRequestRequest----URI Too LongURI Too LongURI Too LongURI Too Long The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.

415 Unsupported Media TypeUnsupported Media TypeUnsupported Media TypeUnsupported Media Type The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.

416 Requested Range Not SatisfiableRequested Range Not SatisfiableRequested Range Not SatisfiableRequested Range Not Satisfiable A request included a Range request-header field, and none of the range-specifier values in this field overlap the current extent of the selected resource, and the request did not include an If-Range request-header field.

417 Expectation FailedExpectation FailedExpectation FailedExpectation Failed The expectation given in an Expect request-header field could not be met by this server, or, if the server is a proxy, the server has unambiguous evidence that the request could not be met by the next-hop server.

Server Error Codes 500 Internal Server ErrorInternal Server ErrorInternal Server ErrorInternal Server Error

The server encountered an unexpected condition that prevented it from fulfilling the request.

501 Not ImplementedNot ImplementedNot ImplementedNot Implemented The server does not support the functionality required to fulfill the request.

Page 383: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Internet Codes

Appendix A: Internet Status Codes 363363363363

502 Bad GatewayBad GatewayBad GatewayBad Gateway The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.

503 Service UnavailableService UnavailableService UnavailableService Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.

504 Gateway TimeGateway TimeGateway TimeGateway Time----outoutoutout The server, while acting as a gateway or proxy, did not receive a time-out while waiting for a response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.

505 HTTP Version not supportedHTTP Version not supportedHTTP Version not supportedHTTP Version not supported The server does not support, or refuses to support, the HTTP protocol version that was used in the request message.

Internet Codes

Internet Error Codes 12001 Out of HandlesOut of HandlesOut of HandlesOut of Handles

No more Internet handles could be generated at this time.

12002 TimeoutTimeoutTimeoutTimeout The request has timed out.

12003 Extended ErrorExtended ErrorExtended ErrorExtended Error An extended error was returned from the server. This is typically a string or buffer containing a verbose error message.

12004 Internal ErrorInternal ErrorInternal ErrorInternal Error An internal error has occurred.

12005 Invalid URLInvalid URLInvalid URLInvalid URL The Uniform Resource Locator (URL) is invalid.

12006 Unrecognized SchemeUnrecognized SchemeUnrecognized SchemeUnrecognized Scheme The Uniform Resource Locator (URL) scheme could not be recognized or is not supported.

Page 384: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Internet Codes

364364364364 Functional Testing User's Guide

12007 Name Not ResolvedName Not ResolvedName Not ResolvedName Not Resolved The server name could not be resolved.

12008 Protocol Not FoundProtocol Not FoundProtocol Not FoundProtocol Not Found The requested protocol could not be located.

12009 Invalid OptionInvalid OptionInvalid OptionInvalid Option A request to InternetQueryOption or InternetSetOption specified an invalid option value.

12010 Bad Option LengthBad Option LengthBad Option LengthBad Option Length The length of an option supplied to InternetQueryOption or InternetSetOption is incorrect for the type of option specified.

12011 Option Not SettableOption Not SettableOption Not SettableOption Not Settable The request option cannot be set, only queried.

12012 ShutdownShutdownShutdownShutdown The Win32 Internet function support is being shut down or unloaded.

12013 Incorrect User NameIncorrect User NameIncorrect User NameIncorrect User Name The request to connect and log on to an FTP server could not be completed because the supplied user name is incorrect.

12014 Incorrect PasswordIncorrect PasswordIncorrect PasswordIncorrect Password The request to connect and log on to an FTP server could not be completed because the supplied password is incorrect.

12015 Login FailureLogin FailureLogin FailureLogin Failure The request to connect to and log on to an FTP server failed.

12016 Invalid OperationInvalid OperationInvalid OperationInvalid Operation The requested operation is invalid.

12017 Operation CanceledOperation CanceledOperation CanceledOperation Canceled The operation was canceled, usually because the handle on which the request was operating was closed before the operation completed.

12018 Incorrect Handle TypeIncorrect Handle TypeIncorrect Handle TypeIncorrect Handle Type The type of handle supplied is incorrect for this operation.

12019 Incorrect Handle StateIncorrect Handle StateIncorrect Handle StateIncorrect Handle State The requested operation cannot be carried out because the handle supplied is not in the correct state.

Page 385: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Internet Codes

Appendix A: Internet Status Codes 365365365365

12020 Not Proxy RequestNot Proxy RequestNot Proxy RequestNot Proxy Request The request cannot be made via a proxy.

12021 Registry Value Not FoundRegistry Value Not FoundRegistry Value Not FoundRegistry Value Not Found A required registry value could not be located.

12022 Bad Registry ParameterBad Registry ParameterBad Registry ParameterBad Registry Parameter A required registry value was located but is an incorrect type or has an invalid value.

12023 No Direct AccessNo Direct AccessNo Direct AccessNo Direct Access Direct network access cannot be made at this time.

12024 No ContextNo ContextNo ContextNo Context An asynchronous request could not be made because a zero context value was supplied.

12025 No CallNo CallNo CallNo Callbackbackbackback An asynchronous request could not be made because a callback function has not been set.

12026 Request PendingRequest PendingRequest PendingRequest Pending The required operation could not be completed because one or more requests are pending.

12027 Incorrect FormatIncorrect FormatIncorrect FormatIncorrect Format The format of the request is invalid.

12028 Item Not FoundItem Not FoundItem Not FoundItem Not Found The requested item could not be located.

12029 Cannot ConnectCannot ConnectCannot ConnectCannot Connect The attempt to connect to the server failed.

12030 Connection AbortedConnection AbortedConnection AbortedConnection Aborted The connection with the server has been terminated.

12031 Connection ResetConnection ResetConnection ResetConnection Reset The connection with the server has been reset.

12032 Force RetryForce RetryForce RetryForce Retry Calls for the Win32 Internet function to redo the request.

12033 Invalid Proxy RequestInvalid Proxy RequestInvalid Proxy RequestInvalid Proxy Request The request to the proxy was invalid.

Page 386: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Internet Codes

366366366366 Functional Testing User's Guide

12034 Need UINeed UINeed UINeed UI A user interface or other blocking operation has been requested.

12035 Not Defined This error code is not defined in WININET.

12036 Handle ExistsHandle ExistsHandle ExistsHandle Exists The request failed because the handle already exists.

12037 Sec Cert Date InvalidSec Cert Date InvalidSec Cert Date InvalidSec Cert Date Invalid SSL certificate date that was received from the server is bad. The certificate is expired.

12038 Sec Cert CN InvalidSec Cert CN InvalidSec Cert CN InvalidSec Cert CN Invalid SSL certificate common name (host name field) is incorrect.

12039 HTTP to HTTPS on RedirHTTP to HTTPS on RedirHTTP to HTTPS on RedirHTTP to HTTPS on Redir The application is moving from a non-SSL (Secure Socket Layer) to an SSL connection because of a redirect.

12040 HTTPHTTPHTTPHTTPS to HTTP on RedirS to HTTP on RedirS to HTTP on RedirS to HTTP on Redir The application is moving from an SSL (Secure Socket Layer) to a non-SSL connection because of a redirect.

12041 Mixed SecurityMixed SecurityMixed SecurityMixed Security Indicates that the content is not entirely secure. Some of the content being viewed may have come from unsecured servers.

12042 Chg Post is Non SecureChg Post is Non SecureChg Post is Non SecureChg Post is Non Secure The application is posting and attempting to change multiple lines of text on a server that is not secure.

12043 Post is Non SecurePost is Non SecurePost is Non SecurePost is Non Secure The application is posting data to a server that is not secure.

12044 ClieClieClieClient Auth Cert Needednt Auth Cert Needednt Auth Cert Needednt Auth Cert Needed An SSL protected resource on a Web server requires a valid client certificate.

12045 Invalid CAInvalid CAInvalid CAInvalid CA A server SSL certificate was issued by an unknown or invalid certificate authority.

12046 Client Auth Not SetClient Auth Not SetClient Auth Not SetClient Auth Not Setupupupup Client authorization is not setup up on this computer.

Page 387: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Internet Codes

Appendix A: Internet Status Codes 367367367367

12047 Async Thread FailedAsync Thread FailedAsync Thread FailedAsync Thread Failed The application could not start an asynchronous thread.

12048 Redirect Scheme ChangeRedirect Scheme ChangeRedirect Scheme ChangeRedirect Scheme Change The function could not handle the redirection, because the scheme changed (for example, HTTP to FTP).

12049 Dialog PendingDialog PendingDialog PendingDialog Pending Another thread has a password dialog box in progress.

12050 Retry DialogRetry DialogRetry DialogRetry Dialog The dialog box should be retried.

12051 Not Defined This error code is not defined in WININET.

12052 HTTPS to HTTP Submit RedirHTTPS to HTTP Submit RedirHTTPS to HTTP Submit RedirHTTPS to HTTP Submit Redir The data being submitted to an SSL connection is being redirected to a non-SSL connection.

12053 Insert CDROMInsert CDROMInsert CDROMInsert CDROM The request requires a CD-ROM to be inserted in the CD-ROM drive to locate the resource requested.

FTP API Error Codes The following are the error codes returned by the Internet API used to access FTP protocols.

12110 Transfer in ProgressTransfer in ProgressTransfer in ProgressTransfer in Progress The requested operation cannot be made on the FTP session handle because an operation is already in progress.

12111 FTP DroppedFTP DroppedFTP DroppedFTP Dropped The FTP operation was not completed because the session was aborted.

12112 No Passive ModeNo Passive ModeNo Passive ModeNo Passive Mode Passive mode is not available on the server.

Gopher API Error Codes 12130 Protocol ErrorProtocol ErrorProtocol ErrorProtocol Error

An error was detected while parsing data returned from the Gopher server.

Page 388: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Internet Codes

368368368368 Functional Testing User's Guide

12131 Not FileNot FileNot FileNot File The request must be made for a file locator.

12132 Data ErrorData ErrorData ErrorData Error An error was detected while receiving data from the Gopher server.

12133 End of DataEnd of DataEnd of DataEnd of Data The end of the data has been reached.

12134 Invalid LocatorInvalid LocatorInvalid LocatorInvalid Locator The supplied locator is not valid.

12135 Incorrect Locator TypeIncorrect Locator TypeIncorrect Locator TypeIncorrect Locator Type The type of the locator is not correct for this operation.

12136 Not Gopher PlusNot Gopher PlusNot Gopher PlusNot Gopher Plus The requested operation can only be made against a Gopher+ server or with a locator that specifies a Gopher+ operation.

12137 Attribute Not FoundAttribute Not FoundAttribute Not FoundAttribute Not Found The requested attribute could not be located.

12138 Unknown LocatorUnknown LocatorUnknown LocatorUnknown Locator The locator type is unknown.

HTTP API Error Codes 12150 Header Not FoundHeader Not FoundHeader Not FoundHeader Not Found

The requested header could not be located.

12151 Downlevel ServerDownlevel ServerDownlevel ServerDownlevel Server The server did not return any headers.

12152 Invalid Server ResponseInvalid Server ResponseInvalid Server ResponseInvalid Server Response The server response could not be parsed.

12153 Invalid HeaderInvalid HeaderInvalid HeaderInvalid Header The supplied header is invalid.

12154 Invalid Query RequestInvalid Query RequestInvalid Query RequestInvalid Query Request The request made for HTTP Query Info is invalid.

12155 Header Already ExistsHeader Already ExistsHeader Already ExistsHeader Already Exists The header could not be added because it already exists.

Page 389: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Internet Codes

Appendix A: Internet Status Codes 369369369369

12156 Redirect FailedRedirect FailedRedirect FailedRedirect Failed The redirection failed because either the scheme changed (for example, HTTP to FTP) or all attempts made to redirect failed (default is five attempts).

12157 Security Channel ErrorSecurity Channel ErrorSecurity Channel ErrorSecurity Channel Error The application experienced an internal error loading the SSL libraries.

12158 Unable to Cache FileUnable to Cache FileUnable to Cache FileUnable to Cache File The function was unable to cache the file.

12159 TCP/IP not InstalledTCP/IP not InstalledTCP/IP not InstalledTCP/IP not Installed The required protocol stack is not loaded and the application cannot start WinSock.

12160 Not RedirectedNot RedirectedNot RedirectedNot Redirected The HTTP request was not redirected.

12161 Cookie Needs ConfirmationCookie Needs ConfirmationCookie Needs ConfirmationCookie Needs Confirmation The HTTP cookie requires confirmation.

12162 Cookie DeclinedCookie DeclinedCookie DeclinedCookie Declined The HTTP cookie was declined by the server.

12163 DisconnectedDisconnectedDisconnectedDisconnected The Internet connection has been lost.

12164 Server UnreachableServer UnreachableServer UnreachableServer Unreachable The Web site or server indicated is unreachable.

12165 Proxy Server UnreachableProxy Server UnreachableProxy Server UnreachableProxy Server Unreachable The designated proxy server cannot be reached.

12166 Bad Auto Proxy ScrBad Auto Proxy ScrBad Auto Proxy ScrBad Auto Proxy Scriptiptiptipt There was an error in the automatic proxy configuration script.

12167 Unable to Download ScriptUnable to Download ScriptUnable to Download ScriptUnable to Download Script The automatic proxy configuration script could not be downloaded.

12168 Redirect Needs ConfirmationRedirect Needs ConfirmationRedirect Needs ConfirmationRedirect Needs Confirmation The redirection requires user confirmation.

12169 Sec Invalid CertSec Invalid CertSec Invalid CertSec Invalid Cert SSL certificate is invalid.

Page 390: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Internet Codes

370370370370 Functional Testing User's Guide

12170 Sec Cert RevokedSec Cert RevokedSec Cert RevokedSec Cert Revoked SSL certificate was revoked.

12171 Failed Due to Security CheckFailed Due to Security CheckFailed Due to Security CheckFailed Due to Security Check The function failed due to a security check.

Additional Information

For additional information about HTTP Status Codes and the Win32® Internet API Constants, see the following Web resources:

Section 10 of the Hypertext Transfer Protocol – HTTP/1.1 Request for Comments: 2616:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

MSDN Knowledge Base article Q193625:

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q193625

Page 391: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

371371371371

A p p e n d i x A p p e n d i x A p p e n d i x A p p e n d i x BBBB HTML and DHTML Resources

This appendix lists the HTML elements and DHTML objects, collections, and properties that can be used when creating Web pages. It is not a complete HTML and DHTML reference. The lists are provided as a convenient resource when using the Application Programming Interface (API) to create Test Scriptlets for Visual Scripts. See the links in the Web Resources section below for more complete and detailed information about the Document Object Model, HTML, and Dynamic HTML.

Web Resources

The following Web resources provide more information about Dynamic HTML, the Document Object Model, and Web page scripting.

Document Object Model Introduction http://www.w3.org/TR/REC-DOM-Level-1/introduction.html

Document Object Model, HTML, Dynamic HTML http://msdn.microsoft.com/en-us/default.aspx

Page 392: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Elements Defined by HTML

372372372372 Functional Testing User's Guide

Elements Defined by HTML

The following table lists the Elements defined by HTML:

!DOCTYPE A ACRONYM

ADDRESS APPLET AREA

B BASE BASEFONT

BDO BGSOUND BIG

BLOCKQUOTE BODY BR

BUTTON CAPTION CENTER

CITE CODE COL

COLGROUP COMMENT custom

DD DEL DFN

DIR DIV DL

DT EM EMBED

FIELDSET FONT FORM

FRAME FRAMESET HEAD

Hn HR HTML

HTML Comment I IFRAME

IMG INPUT INPUT type=button

INPUT type=checkbox INPUT type=file INPUT type=hidden

INPUT type=image INPUT type=password INPUT type=radio

INPUT type=reset INPUT type=submit INPUT type=text

INS ISINDEX KBD

LABEL LEGEND LI

LINK LISTING MAP

MARQUEE MENU META

NOBR NOFRAMES NOSCRIPT

OBJECT OL OPTION

P PARAM PLAINTEXT

Page 393: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Objects Defined by Dynamic HTML

Appendix B: HTML and DHTML Resources 373373373373

PRE Q RT

RUBY S SAMP

SCRIPT SELECT SMALL

SPAN STRIKE STRONG

STYLE SUB SUP

TABLE TBODY TD

TEXTAREA TFOOT TH

THEAD TITLE TR

TT U UL

VAR WBR XML

XMP

Objects Defined by Dynamic HTML

The following table lists the Objects defined by Dynamic HTML:

!DOCTYPE A ACRONYM

ADDRESS APPLET AREA

attribute B BASE

BASEFONT BDO BGSOUND

BIG BLOCKQUOTE BODY

BR BUTTON CAPTION

CENTER CITE clientInformation

clipboardData CODE COL

COLGROUP COMMENT currentstyle

custom dataTransfer DD

DEL DFN DIR

DIV DL document

DT EM EMBED

event external FIELDSET

FONT FORM FRAME

Page 394: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Objects Defined by Dynamic HTML

374374374374 Functional Testing User's Guide

FRAMESET HEAD history

Hn HR HTML

I IFRAME IMG

INPUT INS ISINDEX

KBD LABEL LEGEND

LI LINK LISTING

location MAP MARQUEE

MENU META navigator

NEXTID NOBR NOFRAMES

NOSCRIPT OBJECT OL

OPTION P PARAM

PLAINTEXT PRE Q

RT RUBY rule

runtimeStyle S SAMP

screen SCRIPT SELECT

selection SMALL SPAN

STRIKE STRONG style

STYLE stylesheet SUB

SUP TABLE TBODY

TD TEXTAREA TextNode

TextRange TextRectangle TFOOT

TH THEAD TITLE

TR TT U

UL userProfile VAR

WBR window XML

XMP

Page 395: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Collections Exposed by Dynamic HTML

Appendix B: HTML and DHTML Resources 375375375375

Collections Exposed by Dynamic HTML

The following table lists the Collections exposed by the Dynamic HTML Object Model:

all anchors applets

areas attributes behaviorUrns

bookmarks boundElements cells

childNodes children controlRange

elements embeds filters

forms frames images

imports links mimeTypes

options plugins rows

rules scripts stylesheets

tBodies TextRectangle

Properties in Dynamic HTML

The following table lists the Properties in the Dynamic HTML Object Model:

!important @charset @font-face

@import @media accessKey

action activeElement align

aLink aLinkColor alt

altHTML altKey appCodeName

appMinorVersion appName appVersion

autocomplete availHeight availWidth

background backgroundAttachment backgroundColor

backgroundImage backgroundPosition backgroundPositionX

backgroundPositionY backgroundRepeat balance

behavior bgColor bgProperties

border borderBottom borderBottomColor

Page 396: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Properties in Dynamic HTML

376376376376 Functional Testing User's Guide

borderBottomStyle borderBottomWidth borderCollapse

borderColor borderColorDark borderColorLight

borderLeft borderLeftColor borderLeftStyle

borderLeftWidth borderRight borderRightColor

borderRightStyle borderRightWidth borderStyle

borderTop borderTopColor borderTopStyle

borderTopWidth borderWidth bottom

bottomMargin boundingHeight boundingLeft

boundingTop boundingWidth browserLanguage

bufferDepth button cancelBubble

canHaveChildren caption cellIndex

cellPadding cellSpacing checked

classid className clear

clientHeight clientLeft clientTop

clientWidth clientX clientY

clip clipBottom clipLeft

clipRight clipTop closed

code codeBase codeType

color colorDepth cols

colSpan compact complete

content cookie cookieEnabled

coords cpuClass cssText

ctrlKey cursor data

dataFld dataFormatAs dataPageSize

dataSrc defaultCharset defaultChecked

defaultSelected defaultStatus defaultValue

defer designMode dialogArguments dialogHeight

dialogLeft dialogTop dialogWidth

dir direction disabled

Page 397: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Properties in Dynamic HTML

Appendix B: HTML and DHTML Resources 377377377377

display documentElement domain

dropEffect dynsrc effectAllowed

encoding event expando

face fgColor fileCreatedDate

fileModifiedDate fileSize fileUpdatedDate

filter firstChild font fontFamily

fontSize fontSmoothingEnabled fontStyle

fontVariant fontWeight form frame

frameBorder frameSpacing fromElement

hash height hidden

host hostname href

hspace htmlFor htmlText

httpEquiv id imeMode

indeterminate index innerHTML

innerText isMap isTextEdit

keyCode lang language

lastChild lastModified layoutGrid

layoutGridChar layoutGridCharSpacing layoutGridLine

layoutGridMode layoutGridType left

leftMargin length letterSpacing

lineBreak lineHeight link

linkColor listStyle listStyleImage

listStylePosition listStyleType loop

lowsrc margin marginBottom

marginHeight marginLeft marginRight

marginTop marginWidth maxLength

media menuArguments method

Methods multiple name

nameProp nextSibling nodeName

Page 398: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Properties in Dynamic HTML

378378378378 Functional Testing User's Guide

nodeType nodeValue noHref

noResize noShade noWrap

object offscreenBuffering offsetHeight

offsetLeft offsetParent offsetTop

offsetWidth offsetX offsetY

onLine opener outerHTML

outerText overflow overflowX

overflowY owningElement padding

paddingBottom paddingLeft paddingRight

paddingTop pageBreakAfter pageBreakBefore

palette parent parentElement

parentNode parentStyleSheet parentTextEdit

parentWindow pathname pixelBottom

pixelHeight pixelLeft pixelRight

pixelTop pixelWidth platform

pluginspage port posBottom

posHeight position posLeft

posRight posTop posWidth

previousSibling propertyName protocol

qualifier readOnly readyState

reason recordNumber recordset

referrer rel repeat

returnValue returnValue rev

right rightMargin rowIndex

rows rowSpan rubyAlign

rubyOverhang rubyPosition rules

scopeName screenLeft screenTop

screenX screenY scroll

scrollAmount scrollDelay scrollHeight

Page 399: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Properties in Dynamic HTML

Appendix B: HTML and DHTML Resources 379379379379

scrolling scrollLeft scrollTop

scrollWidth search sectionRowIndex

selected selectedIndex selectorText

self shape shiftKey

size sourceIndex span

specified src srcElement

srcFilter srcUrn start

status styleFloat systemLanguage

tabIndex tableLayout tagName

tagUrn target text

textAlign textAutospace textDecoration

textDecorationLineThrough textDecorationNone textDecorationOverline

textDecorationUnderline textIndent textJustify

textTransform tFoot tHead

title toElement top

topMargin trueSpeed type

unicodeBidi uniqueID units

updateInterval URL urn

useMap userAgent userLanguage

vAlign vAlign value

vcard_name verticalAlign visibility

vLink vlinkColor volume

vspace whiteSpace width

wordBreak wordSpacing wrap

x XMLDocument y

zIndex

Page 400: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Methods in Dynamic HTML

380380380380 Functional Testing User's Guide

Methods in Dynamic HTML

The following table lists the Methods exposed by the Dynamic HTML Object Model:

add addBehavior AddChannel

AddDesktopComponent AddFavorite addImport

addReadRequest addRule alert

appendChild applyElement assign

attachEvent AutoCompleteSaveForm AutoScan

back blur clear

clearAttributes clearData clearInterval

clearRequest clearTimeout click

cloneNode close collapse

compareEndPoints componentFromPoint confirm

contains createCaption createControlRange

createElement createRange createStyleSheet

createTextNode createTextRange createTFoot

createTHead deleteCaption deleteCell

deleteRow deleteTFoot deleteTHead

detachEvent doReadRequest doScroll

duplicate elementFromPoint empty

execCommand execScript expand

findText firstPage focus

forward getAdjacentText getAttribute

getAttribute getBookmark getBoundingClientRect

getClientRects getData getElementById

getElementsByName getElementsByTagName getExpression

go hasChildNodes ImportExportFavorites

inRange insertAdjacentElement insertAdjacentHTML

Page 401: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Methods in Dynamic HTML

Appendix B: HTML and DHTML Resources 381381381381

insertAdjacentText insertBefore insertCell

insertRow isEqual IsSubscribed

item javaEnabled lastPage

mergeAttributes move moveBy

moveEnd moveRow moveStart

moveTo moveToBookmark moveToElementText

moveToPoint namedRecordset navigate

NavigateAndFind nextPage open

parentElement pasteHTML previousPage

print prompt queryCommandEnabled

queryCommandIndeterm queryCommandState queryCommandSupported

queryCommandValue recalc refresh

releaseCapture reload remove

removeAttribute removeBehavior removeChild

removeExpression removeNode removeRule

replace replaceAdjacentText replaceChild

replaceNode reset resizeBy

resizeTo scroll scrollBy

scrollIntoView scrollTo select

select setAttribute setCapture

setData setEndPoint setExpression

setInterval setTimeout ShowBrowserUI

showHelp showModalDialog showModelessDialog

splitText start stop

submit swapNode tags

taintEnabled urns write

writeln

Page 402: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Events in Dynamic HTML

382382382382 Functional Testing User's Guide

Events in Dynamic HTML

The following table lists the Events are exposed by the Dynamic HTML Object Model:

onabort onafterprint onafterupdate

onbeforecopy onbeforecut onbeforeeditfocus

onbeforepaste onbeforeprint onbeforeunload

onbeforeupdate onblur onbounce

oncellchange onchange onclick

oncontextmenu oncopy oncut

ondataavailable ondatasetchanged ondatasetcomplete

ondblclick ondrag ondragend

ondragenter ondragleave ondragover

ondragstart ondrop onerror

onerrorupdate onfilterchange onfinish

onfocus onhelp onkeydown

onkeypress onkeyup onload

onlosecapture onmousedown onmousemove

onmouseout onmouseover onmouseup

onpaste onpropertychange onreadystatechange

onreset onresize onrowenter

onrowexit onrowsdelete onrowsinserted

onscroll onselect onselectstart

onstart onstop onsubmit

onunload

Page 403: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

383383383383

A p p e n d i x A p p e n d i x A p p e n d i x A p p e n d i x CCCC Regular Expressions

A regular expression is a text pattern consisting of ordinary characters, such as the letters A-Z, and special characters, known as metacharacters. These characters define a pattern that will be compared to a body of text in order to find a match. The regular expression is a template for matching a character pattern to the string being searched.

Following are some examples of expressions:

JScriptJScriptJScriptJScript VBScVBScVBScVBScriptriptriptript MatchesMatchesMatchesMatches

/^\[\t]*$/ "^\[\t]*$" Matches a blank line.

/\d{2}-\d{5}/ "\d{2}-\d{5}" Validates an ID number consisting of 2 digits, a hyphen, and another 5 digits.

/<(.*)>.*<\/\1>/ "<(.*)>.*<\/\1>" Matches an HTML tag.

MetaCharacters

This appendix lists the metacharacters and how they work.

CharacterCharacterCharacterCharacter DescriptionDescriptionDescriptionDescription

\ Marks the next character as either a special character, a literal, a backreference, or an octal escape. For example, 'n' matches the character “n”. '\n' matches a newline character. The sequence '\\' matches “\” and '\{' matches “{”

Page 404: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

MetaCharacters

384384384384 Functional Testing User's Guide

CharacterCharacterCharacterCharacter DescriptionDescriptionDescriptionDescription

^ Only matches the position at the beginning of the string. If the RegExp object’s Multiline property is set, ^ also matches the position following '\n' or '\r'.

$ Only matches the position at the end of the string. If the RegExp object's Multiline property is set, $ also matches the position preceding '\n' or '\r'.

* Matches the preceding characters zero or more times. For example, 'to*' matches “t” and “too”. * is equivalent to {0,}.

+ Matches the preceding characters one more times. For example, 'to+' matches “to” and “too”, but not “t”. + is equivalent to {1,}.

? Matches the preceding subexpression zero or one time. For example, 'to(es)?' matches the “do” in “to” or “toes”. ? is equivalent to {0,1}.

{n} Matches exactly n times, where n is a nonnegative integer. For example, 'f{2,}' does not match the “o” in “often”, but matches the two f’s in “suffer”.

{n,} Matches at least n times, where n is a nonnegative integer. For example, 'a{2,}' does not match the “a” in “age” and matches all the a’s in “aaaaaaah”. 'a{1,}' is equivalent to 'a+'. 'a{0,}' is equivalent to 'a*'.

{n,m} Matches at least n and at most m times. m and n are nonnegative integers, where n <= m. For example, 'a{1,3}' matches the first three a’s in “aaaaaaah”. 'a{0,1}' is equivalent to 'a?'. Do not separate the comma and the number with a space.

Page 405: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

MetaCharacters

Appendix C: Regular Expressions 385385385385

CharacterCharacterCharacterCharacter DescriptionDescriptionDescriptionDescription

? When this character immediately follows any of the other quantifiers (*, +, ?, {n}, {n,}, {n,m}), the matching pattern matches as little of the searched string as possible, whereas the default pattern matches as much of the searched string as possible. For example, in the string “aaaa”, 'a+?' matches a single “a”, while 'a+' matches all 'a’s.

. Matches any single character except the newline character. To match any character including the '\n', use a pattern such as '[.\n]'.

(pattern) Matches the pattern and captures the match. The captured match can be retrieved from the resulting Matches collection, using the SubMatches collection in VBScript or the $0…$9 properties in JScript. To match parentheses characters (), use '\(' or '\)'.

(?:pattern) Matches the pattern but does not capture the match, that is, the match is not stored for possible later use. This is useful for combining parts of a pattern using the “or” character (|). For example, 'continu(?|al)' is a more economical expression than 'continual|continuous'.

(?=pattern) Positive lookahead matches the search string at any point where a string-matching pattern begins. The match is not captured for later use. For example, 'Windows(?=95|98|INT|2000)' matches “Windows” in “Windows 2000” but not “Windows” in “Windows 3.1”. Lookaheads do not consume characters, that is, after a match occurs, the search for the next match begins immediately following the last match, not after the characters that comprised the lookahead.

Page 406: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

MetaCharacters

386386386386 Functional Testing User's Guide

CharacterCharacterCharacterCharacter DescriptionDescriptionDescriptionDescription

(?!pattern) Negative lookahead matches the search string at any point where a string not matching pattern begins. The match is not captured for possible later use. For example, 'Windows(?!95|98|INT|2000)' matches “Windows” in “Windows 3.1” but does not match “Windows” in “Windows 2000”. Lookaheads do not consume characters, that is, after a match occurs, the search for the next match begins immediately following the last match, not after the characters that comprised the lookahead.

x|y Matches either x or y. For example, 'm|house' matches “m” or “house”. '(m|h)ouse' matches “mouse”or “house”.

[xyz] A character set. Matches any one of the enclosed characters. For example, '[abc]' matches the ‘b’ in “absolute”.

[^xyz] A negative character set. Matches any character not enclosed. For example, '[^abc]' matches the ‘s’ in “absolute”.

[a-z] A range of characters. Matches any character in the specified range. For example, '[a-z]' matches any lowercase alphabetic character in the range ‘a’ through ‘z’.

[^a-z] A negative range characters. Matches any character not in the specified range. For example, '[^a-z]' matches any character not in the range ‘a’ through ‘z’.

\b Matches a word boundary, that is, the position between a word and a space. For example, 'ous\b' matches the ‘ous’ in “raucous” but not the ‘ous’ in “house”.

\B Matches a non-word boundary. 'ous\B' matches the ‘ous’ in “house” but not the ‘ous’ in “raucous”.

Page 407: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

MetaCharacters

Appendix C: Regular Expressions 387387387387

CharacterCharacterCharacterCharacter DescriptionDescriptionDescriptionDescription

\cx Matches the control character indicated by x. For example, \cM matches a Control-M or carriage return character. The value of x must be in the range of A-Z or a-z. If not, c is assumed to be a literal ‘c’ character.

\d Matches any digit. Equivalent to [0-9].

\D Matches any non-digit. Equivalent to [^0-9].

\f Matches a form-feed character. Equivalent to \x0c and \cL.

\n Matches a newline character. Equivalent to \x0a and \cJ.

\r Matches a carriage return character. Equivalent to \x0d and \cM.

\s Matches any white space character including space, tab, form-feed, etc. Equivalent to [\f\n\r\t\v].

\S Matches any nonwhite space character. Equivalent to [^\f\n\r\t\v].

\t Matches a tab character. Equivalent to \x09 and \cI.

\v Matches a vertical tab character. Equivalent to \x0b and \cK.

\w Matches any word character including underscore. equivalent to '[A-Za-z0-9_]'.

\W Matches any nonword character. Equivalent to '[^A-Za-z0-9_]'.

\xn Matches n, where n is a two-digit hexadecimal escape value. For example, '\x41' matches “A”. '\x041' is equivalent to '\x04' & “1”. Allows ASCII codes to be used in regular expressions.

Page 408: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

MetaCharacters

388388388388 Functional Testing User's Guide

CharacterCharacterCharacterCharacter DescriptionDescriptionDescriptionDescription

\num Matches num, where num is a positive integer. A reference back to captured matches. For example, '(.)\1' matches two consecutive identical characters.

\n Identifies either an octal escape value or a backreference. If \n is preceded by at least n captured subexpressions, n is a backreference. Otherwise, n is an octal escape value if n is an octal digit (0-7).

\nm Identifies either an octal escape value or a backreference. If \nm is preceded by at least nm captured subexpressions, nm is a backreference. If \nm is preceded by at least n captures, n is a backreference followed by literal m. If neither of the preceding conditions exist, \nm matches octal escape value nm when n and m are octal digits (0-7).

\nml Matches octal escape value nml when n is an octal digit (0-3) and m and l are octal digits (0-7).

\un Matches n, where n is a Unicode character expressed as four hexadecimal digits. For example, \u00A9 matches the copyright symbol ().

Page 409: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Oracle Application Testing Suite File Types

389389389389

A p p e n d i x A p p e n d i x A p p e n d i x A p p e n d i x DDDD Oracle Application Testing Suite File Types

This appendix lists the file types and extensions used by the Oracle Application Testing Suite applications.

ExtensionExtensionExtensionExtension DescDescDescDescriptionriptionriptionription

.cfg Configuration files used by Oracle Application Testing Suite applications.

.css Cascading Style Sheet file. Used by Oracle Functional Testing for Web Applications HTML-formatted reports.

.csv Comma Separated Value file. Used as Oracle Functional Testing for Web Applications Data Bank files.

.dat Data files used to store current settings for Oracle Functional Testing for Web Applications Admin and Options settings.

.htm,

.html Hypertext Markup Language files. Oracle Application Testing Suite files include Result log files and sample Web application files.

.ini Initial settings files for the Oracle Application Testing Suite applications and individual Workspaces.

.jar Java application files used by Oracle Application Testing Suite and various third party applications.

.js JavaScript files used by Oracle Application Testing Suite HTML applications.

.lic Oracle Application Testing Suite license file.

Page 410: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Functional Testing User's Guide

390390390390 Functional Testing User's Guide

ExtensionExtensionExtensionExtension DescriptionDescriptionDescriptionDescription

.log Log file generated by an Oracle Application Testing Suite application.

.map e-Spider map file.

.mdb Microsoft Access database file.

.mgp Machine Group files. Defines a list of remote agent machine names.

.mib Management Information Base file. Used by Oracle Load Testing for Web Applications Simple Network Management Protocol (SNMP) data sources to define the objects (i.e. counters) for the device.

.mjs Job Scheduler schedule file.

.mom Oracle Functional Testing for Web Applications Visual Script file for Microsoft Internet Explorer.

.mom.lck Lock file for Oracle Functional Testing for Web Applications Visual Scripts. Indicates the Visual Script is in use by another user.

.oca Control TypeLib Cache files used by Oracle Application Testing Suite applications.

.pdf Documentation files in Adobe® Acrobat® Portable Document Format.

.pem Proxy certificate files used by Oracle Application Testing Suite.

.prf Oracle Load Testing for Web Applications database file used for storing user-defined profiles, agent machine names, and synchronization points. Oracle Load Testing for Web Applications saves a database.prf file in each workspace.

.wg Oracle Load Testing for Web Applications Thin Client file. Corresponds to Oracle Functional Testing for Web Applications Visual Script file.

Page 411: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Oracle Application Testing Suite File Types

391391391391

ExtensionExtensionExtensionExtension DescriptionDescriptionDescriptionDescription

.xls Microsoft Excel Workbook file. Generated to open report graphs in the Microsoft Excel application.

.xml Extensible Markup Language files. Used for the schedule summary file.

Page 412: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Functional Testing User's Guide

392392392392 Functional Testing User's Guide

[This page intentionally left blank]

Page 413: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

393393393393

Index Accept

All Tested Pages, 17 Tested Page, 234

ActiveX Recording, 45 Visual Script Node, 131

Add Authentication, 308, 309 Data Bank Mapping, 265 Data Bank Variable, 264 DHTML Event Handlers, 91 Dialog Information to List, 298 Form Element Test, 214 Server Response Test, 210 to Test Library, 199, 207

Address e-Spider, 254 Properties, 157 Visual Script Node, 131

Address of email, 81 Admin

Authentication Manager, 307–10 Delete Log, 313 Delete Visual Script, 312 Delete Workspace, 311 Dialog Manager, 297–307 Menu Option, 18 New Workspaces, 310 Options, 295 Test Library, 295–97

All Details, 240 All Events, 158 Anchor Transitions, 42 Anchors Node, 131 Append

Forms Pages to e-Spider, 37 Page to e-Spider Tree, 256 Page to Tree, 253 Page to Visual Script, 134

Scripts to Jobs, 74 to Results Log, 240, 241

Applets Using Data Banks, 288

Application Programming Interface, 5, 315

Arrow Icon, 132 ASCII files

Export Visual Scripts, 133 Assign Object Reference, 355 Authentication Manager

Add Record, 308, 309 Map Password to Variable, 309 Map User Name to Variable, 309 Menu Option, 19 Modify Record, 309 Password, 309 Realm, 308 Remove Record, 308, 310 User Name, 308 Variables, 309

Auto Bind, 267, 268 Auto Map, 267

Unique Vars per Page, 268 Auto Pages, 43 Automatic Test Generation, 3 Automatic Tests, 139–41

All Pages, 139 Existence Test, 141 Single Page, 140 Specific Node, 140

Automatically dismiss dialogs during playback, 98

Automatically generate Thin Client scripts, 107

Automatically invoke script debugger on scripting errors, 98

Automatically run resource validation after playback, 151

Page 414: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

394394394394 Functional Testing User's Guide

Automatically Run Resource Validation After Playback, 98

Base Event on Index, 158 Basic Node Properties, 156 Browser

Errors, 105 Menu Option, 16 Options, 17 Pane, 10, 22 Timeout, 86

Caption, 300, 301 Capture Dialog Information, 302 Capture original, 87 Capture processed, 87 Change

Error Recovery Settings, 106 Results Report Settings, 248 Script Pane Width, 129

Checkmark Icon, 132 Clear

Data Bank File, 266 Output Window, 243 Results Window, 13

Close Data Bank Wizard, 281 e-Spider, 252 Oracle Functional Testing for Web

Applications, 12 Visual Script, 11

Collapse Page, 129–31 Script, 13, 129–31

COM Server RSWIProgsLib.dll, 352 RSWMint.exe, 352 Webanlst.exe, 352

Comments in Visual Script, 137 Comparison Exclusions

Range of HTML Source, 127 URL Parameter Values, 124 URL Parameters, 122 URL Sub Paths, 125 User Defined Content Comparison

Filters, 121 Configure Mail Server, 18 Configuring

Mail Server, 28

Content Missing, 105 New, 105 Severe Changes, 105

Continue Spider, 253 Cookies

Delete persistent before playback, 100 Properties, 160 Use distinct directory, 100 Visual Script Node, 131

Copy Page in Visual Script, 134 Correlation Library, 108 Create Debug File for Load, 86 Current

Form Element Value, 213 Page for Server Response Test, 209 Record Number, 66, 265, 267 Record only, 100 Record Only, 66

Current Page menu option, 14 Custom Object Test

Error Recovery, 104 Custom Parser, 110 Custom Scripts, 117 Custom Variable Test

Error Recovery, 105 Custom Variables, 142 Data Bank Wizard, 263 Data Banks

Actual Data, 201 Add Mapping, 203, 265, 272 Add Variable, 203, 204, 205, 264, 270 Auto Bind, 267, 268 Auto Map, 267 Bindings, 204, 267, 278 Clear File Selection, 266 Create Files, 337 Current Record Number, 66, 265, 267 Databank Variable Name, 289 Data-Driven Test, 200–206 Delete Variable, 265 Difference Between Play and Iterate,

293 Edit File, 266 End at Record, 66 Fetch Record, 205, 265, 267 Field Name, 267

Page 415: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

Index 395395395395

Field Number, 267 Field Value, 267 Fields, 202, 267 Filename, 66 Files, 202, 268 Generate Data, 284 Get Values, 337 Goto Record, 265, 282 Input Data, 201 Internal Variables, 272 Iterate, 65, 206 Iterate All Records, 66 Iterate Current Record, 66, 293 Iterate over Range, 67, 69, 282, 293 Iterate with, 65 Iterate without, 65, 66 Jobs Properties, 76 Map Variables, 269 Mappings, 265 Menu Option, 12 Parameter Name, 265 Parameters, 264 Playback, 293 Playback Range, 281 Playback with, 67, 99 Recorded Value, 264, 265 Script Variables, 338 Select File, 266, 278 Specific Record, 282 Start at Record, 66 Synthesize Data, 267 Tested Value, 265 Update File, 266 Use all records, 99 Use All Records, 293 Use current record only, 100 Use Current Record Only, 293 Variable Name, 265, 267 Variable Value, 265 Variables, 203, 264, 267 Verify Data-Driven Test, 200–206 with Java Applets, 288 Wizard, 5, 263

Databank Variable Name, 289 Default

to Script Name, 239 to Workspace Name, 239

Default Tests, 139–41 All Pages, 139 Don’t test (Item), 140 Error Recovery, 104 Single Page, 140 Specific Node, 140

Define Object Variable, 354 Delay

Before Playback, 158 Between Iterations, 66 Constant, 102 Event Playback, 102 Maximum, 101 Play with Recorded, 101 Recorded, 102

Delete Log File, 245, 313 Page from e-Spider, 253, 257 Persistent cookies before playback, 100 Test from Library, 208 Test from Script, 208, 211 Variable, 265 Visual Script, 138, 312 Visual Script Page, 136 Workspace, 28, 311

DHTML, 101, 331 Event Handlers, 39 Recording Options, 89

Dialog Action, 300 Action Options, 303 Caption, 300, 301 Evaluation Priority, 307 Specify information, 303 Text, 300, 301 Unexpected, 299

Dialog Manager Action, 300 Action Op, 303 Add to List, 298 Caption, 300, 301 Capture information, 298, 302 Change Priority, 299, 307 Dialog List, 299 Dialog Spy, 301 Edit Information, 307 Fatal Error, 300, 301

Page 416: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

396396396396 Functional Testing User's Guide

Menu Option, 19 Monitor All Windows, 302 Priority, 300, 307 Select Dialog, 298, 302 Show Dalog Info, 301 Specify Dialog, 303 Start, 302 Stop After [#] Tries, 301 Test Actions, 299 Text, 300, 301 Tool Buttons, 298 Toolbar, 298 Use Dialog Manager, 301 Using, 297–307 While Idling, 301

Dialog Spy, 301 DIME support, 110 Disable Failing Default Tests, 17 Discard

All Tested Pages, 17, 234 Tested Page, 234

Do Not Log, 240 Document Objects

Accessing, 332 Find HTML Element, 334 Getting, 332 in Frameset, 333 Match HTML Pattern, 335 Methods, 329 Properties, 330 Set Properties, 336 Top Document, 333 Working with, 327

Duration Node, 131 Dynamic HTML, 101, 331 Edit

Dialog Information, 307 Menu Option, 12 Server Response Test, 211 Text Matching Test, 207 Visual Script, 134–38

Edit Data Bank File, 266 Elapsed Time, 236, 237

During Playback, 185 During Recording, 185, 210

E-mail Job Details, 80 Enable Siebel CAS recorder, 108

Enable Siebel Support, 107 End

at Record, 66 Server Response Test on Page, 185,

210, 211 Error

Fatal Dialog Boxes, 300, 301 Number from Server, 187 String from Server, 187 Type, 105

Error Codes, 359 Error Recovery

Browser Errors, 105 Change Settings, 106 Custom Object Test, 104 Custom Variable Test, 105 Default Page Test, 104 Error Type, 105 Form Element Test, 105 Missing Content, 105 Navigation Failure, 105 New Content, 105 Options, 104 Page Timeout, 105 Resource Validation Test, 105 Server Response Tests, 104 Severe Content Changes, 105 Skip Remaining Iterations, 105 Skip Remaining Pages, 105 Table Test, 104 Text Matching Test, 104

e-Spider Address, 254 Append Form Pages, 37 Append Page to Tree, 253, 256 Basics, 251–55 Continue, 253 Delete Page, 253, 257 Edit Menu, 253 Exclude URLs, 253, 258 Exisitng Map File, 261 Export Site Map As, 252, 262 F Flag, 254 File menu, 252 Generate Visual Script, 253, 260 Help menu, 254 Ignore All but Current Page, 259

Page 417: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

Index 397397397397

Ignore All Other Pages, 253 Ignore Page, 253, 259 Main window, 252 Map Files, 261 Map Tree, 254 Menu option, 18 Minus Icon, 254 Modify Excluded URL, 259 New Map, 261 New Site Map, 252 Node icons, 254 Open Site Map, 252 Pause, 256 Plus Icon, 254 Record Scripts, 36 Red border Flag, 254 Resume, 256 Run Menu, 253 Save Map, 38, 261 Save Map File, 38 Save Site Map, 252 Save Site Map As, 252 Start, 253, 255 Status Bar, 255 Stop, 253, 256 T Flag, 254 Tools Menu, 253 X Flag, 254

Event Failure, 103 Event Handlers, 89 Event Name, 90 Event Properties, 161 Events

Dynamic HTML, 101 Java, 101 Playback Options, 101

Exclude URLs, 253, 258 Execute Test, 184 Existence Tests

Specific Node, 141 Existing Map File, 261 Existing Workspaces, 311 Exit

e-Spider, 252 Oracle Functional Testing for Web

Applications, 12 Expand

Page, 129–31 Script, 13, 129–31

Export e-Spider Site Map, 252, 262 Resource Validation, 149 Results Log File, 244 Results Log Pane, 11, 242 Visual Scripts, 11, 133

Expression Data Banks, 272–78 Form Element test, 215

Extensibility Client Types, 327 Data Bank Variables, 338 Data Banks, 337 Document Objects, 327, 332 DOM Methods, 329 DOM Properties, 330 Dynamic HTML Events, 331 HTML Elements, 334 Level 1 Visual Scripts, 317–19 Level 2 Data Banks, 319–20 Level 2 Test Cases, 319–20 Level 3 Test Scriptlets, 321–22 Level 4: External Programs, 323 Overview, 317 Set Properties, 336 Web Page Objects, 332

External Program Control Assign Object Reference, 355 Closing Oracle Functional Testing for

Web Applications, 356 Define Object Variables, 354 Full Tester, 357 Minimum Tester, 357 Monitor Script Events, 355 Open workspace, 355 Play Back Script, 355 ProgT Class, 352 ProgX Class, 352 Reference Object, 353 Release Object Variables, 356 RSWIProgsLib.dll, 352 RSWMint.exe, 352 Using, 351 Webanlst.exe, 352

External Window, 42

Page 418: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

398398398398 Functional Testing User's Guide

F Flag, 254 Failed to find element, 159 Failed to play event, 159 Failure Codes, 361 Failure Flag, 132 Failures Only, 240 Fatal Error, 300, 301 Fetch Record, 265, 267 Fields

Binding, 267, 278 Data Bank, 267 Data Generation, 285 Name, 267 Number, 267 Value, 267

File Data Bank, 266, 268, 278 e-Spider Map, 38, 261 e-Spider Menu, 252 Menu Option, 11 Visual Script, 61

Find Next Failure, 17, 232 Previous Failure, 17, 232

Flags in e-Spider Map, 254 in Visual Script, 132

Flash Recording, 45

Form Element Test, 212–13 Error Recovery, 105 Expressions, 215 Insert into script, 214 Properties, 171, 172 Property Must Always be a Number,

213 Property Must Always be a String, 213 Property Must Always be Empty, 213 Property Must Always be in Range,

213 Property Must Equal Variable, 213 Property Must Satisfy Expression, 213 Test Expression, 213

Forms Element Properties, 171 Element Test Properties, 172 Node Properties, 174

Visual Script Node, 131 Frames Node, 131 Framset, Getting Document Objects, 333 From Current Page menu option, 14 FTP API Error Codes, 367 Full Tester, 357 General Playback options, 97 Generate

Visual Script in e-Spider, 253, 260 Generate additional checkpoints against

Siebel Protocol, 107 Generate Data, 284, 285 Generate Transformed Script for Load, 86 Global Settings Manager, 17 Go

Back, 16 Forward, 16 Home, 16

Gopher API Error Codes, 367 Goto Record, 265, 267, 282 Help Menu, 19 Hide passwords, 86 Hide Results Log Pane, 240 Highlight mode, 102 Host Not Reachable, 177 HTML

Find Element, 334 Find Element in Range, 335 Match Pattern, 335 Node Properties, 175 Set Properties, 336 Source, 176 Test On, 199 View Differences, 232 Visual Script Node, 131

HTML Capture, 87 HTMLSummary, 81 HTTP API Error Codes, 368 Icons

Arrow, 132 Checkmark, 132 F Flag, 254 Job, 132 Minus Sign, 132, 254 Page, 132 Plus Sign, 132, 254 Red and Yellow Flag, 132

Page 419: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

Index 399399399399

Red border, 254 Red Flag, 132 Script, 132 T Flag, 254 X Flag, 254 Yellow Flag, 132, 254

Ignore All but Current Page, 259 All Other Pages, 253 Failure-Flag Icon in Script, 132 Page in e-Spider, 253, 259 Page-Flag Icon in e-Spider, 254 Specific Failure, 235 Test Case, 235 Test-Flag Icon in Script, 132

Images Available, 177 Host Not Reachable, 177 Link Not Reachable, 177 Node Properties, 176 Playback Value, 177 Unknown, 177 Visual Script Node, 131

Information Codes, 359 Insert

Form Element Test, 15, 214 Page to Visual Script, 135 Server Response Test, 15, 210 Siebel Test, 15 Table Test, 15 Test Scriptlet After, 15, 216 Test Scriptlet Before, 15, 216 Text Matching Test, 15, 200 WinForms Test, 15

Installation, 9 Internet Error Codes, 363 Introduction, 1 Iterate, 65

Current Record Number, 66 Data Bank Filename, 66 Data Banks, 65, 206 Delay Between Iterations, 66 End at Record, 66 Menu Option, 14 Number of Iterations, 66 Over Range, 67 Run Resource Validation, 153

Start at Record, 66 Use All Records, 66 Use Current Record Only, 66 with Data Banks, 65 without Data Bank, 65, 66

Iterate menu option, 14 Java

Agent Options, 115 Applet Options, 114 Console, 16, 25 Custom Scripts, 117 Data Bank Applets, 288 Databank Variable Name, 289 Event Playback Options, 101 Microsoft Applet Support, 115 Options, 115 Show Plugin Console, 16 Sun Plugin Applet Support, 115

Java Applets Node Properties, 177 Visual Script Node, 131

JavaScript Differences, 233 Job Scheduler

Menu Option, 18 Jobs

Address of email, 81 Append scripts, 74 Creating, 32, 74 Data Bank Settings, 76 E-mail Details, 80 HTML Summary in email, 81 Log Messages, 79 Mail Servrel, 81 Opening, 75 Properties, 75 Running, 82 Saving, 82 Severity Mapping, 77 Subject of email, 81 Text Log in email, 81

Links Available, 180 Host Not Reachable, 180 Node Properties, 178 Not Reachable, 177, 180 Playback Value, 179 Visual Script Node, 131

Page 420: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

400400400400 Functional Testing User's Guide

Locate Test Result, 231 Logging Mode, 240 Logs

Append to, 241 Clear Window, 243 Delete File, 245, 313 Export to ASCII, 242, 244 File Name, 239 Hide Pane, 240 Job Messages, 79 Options, 239 Overwrite File, 242 Save File, 242 Show Pane, 240 View Saved File, 243

Mail Server Configuring, 28

Mail Server, 81 Main Window

Features, 10 Title bar, 10 URL Dropdown, 10

Manage Job Files, 19 Result Log File, 19 Visual Script, 18

Manual Navigation, 41, 42 Manual Recording, 32 Map

Create New File, 261 Files in e-Spider, 261 Password to Variable, 309 Save Files, 261 User Name to Variable, 309 Variable to Script Parameter, 265, 272

Maximum Delay (seconds), 101 Number of Threads, 154 Time Allowed for Playback, 185, 211

Menu Options Accept All Tested Pages, 17 Admin Menu, 18 Append, 12 Authentication Manager, 19 Browser Menu, 16 Browser Options, 17 Clear Results Window, 13

Close Script, 11 Collapse Script, 13 Configure Mail Server, 18 Data Bank Wizard, 12 Dialog Manager, 19 Disable Failing Default Tests, 17 Discard All Tested Pages, 17 Edit Menu, 12 e-Spider, 18 Expand Script, 13 Export Output Log As, 11 Export Script As, 11 File Menu, 11 Find Next Failure, 17 Find Previous Failure, 17 From Current Page, 14 Global Settings Manager, 17 Go Back, 16 Go Forward, 16 Go Home, 16 Help Menu, 19 Insert Form Element Test, 15 Insert Server Response Test, 15 Insert Siebel Test, 15 Insert Table Test, 15 Insert Test Scriptlet After, 15, 216 Insert Test Scriptlet Before, 15, 216 Insert Text Matching Test, 15 Insert WinForms Test, 15 Iterate, 14 Job Manager, 19 Job Scheduler, 18 Navigate Manually, 14 New Job, 12 New Script, 11 Open Script, 11 Open Workspace, 11 Options Menu, 17 Oracle Load Testing for Web

Applications, 18 Oracle Load Testing for Web

Applications Navigation Editor, 18 Overview, 11 Page Settings Manager, 18 Page Snapshot, 13 Playback, 14 Playback Currrent Page, 14

Page 421: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

Index 401401401401

Properties, 12 Record, 13 Record Currrent Page, 14 Resize Results Window, 13 Resize Visual Script View, 13 Resource Validation, 14 Result Log Manager, 19 Results Menu, 16 Run Menu, 13 Save Output Log As, 11 Save Script, 11 Save Script As, 11 Save Web Page As, 11 Script Comments, 12 Script Manager, 18 Search the World Wide Web, 16 Settings Manager, 17 Show Applet Resource, 16 Show Java Console, 16 Show Plugin Java Console, 16 Start Playback, 14 Start Recording, 13 Start Windows Event Recorder, 13 Stop (browser), 16 Stop Playback, 14 Stop Recording, 13 Stop Windows Event Recorder, 13 Test Library Manager, 19 Tests Menu, 14 Tools Menu, 18 Up to Current Page, 14 View Menu, 13 View Playback Report, 16 View Results Log, 16 Web Services Script, 14, 18 Workspace Manager, 18 Workspace Settings Manager, 17

Microsoft Development Environment, 347

Microsoft Java Applet Support, 115 Microsoft Script Debugger, 345 Minimum Tester, 357 Minimum Time Allowed for Playback,

185, 210 Minus Icon, 132, 254 Modify

Authentication, 309

Excluded URL, 259 Move

Down, 299 Script Page, 134 Up, 299

MTOM support, 110 Name of Data Bank file, 66 Navigate Manually menu option, 14 Navigation Editor, 18 Navigation Failure, 105 Netscape

Generate Visual Scripts, 13 New

Job, 12, 74 Map File, 261 Site Map, 252 Visual Script, 11 Workspace, 26, 310

Node Properties, 156 Viewing, 155–56

Number of Iterations, 66 Object

Properties, 180 Object Identification, 91 Objects

Assign References, 355 Closing Oracle Functional Testing for

Web Applications, 356 Define References, 353 Define Variables, 354 Release Variables, 356

Open Jobs, 75 Site Map, 252 Visual Script, 11 Workspace, 11, 27

Options .NET WinForms, 110 Advanced, 106 Custom Scripts, 117 Event, 101–3 Event Recording, 89 Java, 115 Java Agent, 115 Java Applet, 114

Menu Option s, 17 Object Identification, 91

Page 422: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

402402402402 Functional Testing User's Guide

Playback, 97 Proxy, 92 Recording, 84 Resource Validation, 153 Siebel Support, 106 Web Services, 108 WinForms, 110

Oracle Functional Testing for Web Applications Automatic Test Generation, 3 Data Bank Wizard, 5 Features, 1 Installation, 9 Real Time Test Results Analysis, 6 Specialized Web Server Testing, 5 System Requirements, 6 Visual Scripts, 4

Oracle Load Testing for Web Applications Menu option, 18 Navigation Editor, 18

Overwrite Log, 240, 242 Page

Append to Visual Script, 134 Copy in Visual Script, 134 Delete from Visual Script, 136 End Server Response Test on, 210 Insert into Visual Script, 135 Move in Visual Script, 134 Node Properties, 181 Properties, 181 Request, 237 Response, 237 Retrieval, 210 Snapshot, 34 Specification, 210 Start Server Response Test on, 210 Timeout, 105 Visual Script Icon, 132

Page Settings Manager, 18 Page Snapshot menu option, 13 Pages with META Refresh, 43 Parameter

Data Banks, 264 Mapped to Variable, 183 Name, 265 Properties, 182

Recorded Value, 182 Tested Value, 182 Use Default value on play back, 183 Visual Script Node, 131

Parser, Web Services, 109 Pass When, 199 Password, 309 Pattern Definition, 285 Pause e-Spider, 256 Play with Recorded Delay Between Pages,

101, 237 Playback, 62

Automatically dismiss dialogs, 98 Automatically invoke script debugger

on scripting errors, 98 Automatically Run Resource

Validation After, 98 Comparison Exclusions, 118–28 Current Page, 14 Delete persistent cookies before, 100 Different URL, 72 Entire Visual Script, 63 Exclude a Range of HTML Source,

127 Exclude URL Parameter Values, 124 Exclude URL Parameters, 122 Exclude URL Sub Paths, 125 From Current Page, 14 Highlight mode, 102 Iterations, 65 Maximum delay (seconds), 101 Menu Option, 14 Multiple Times, 65 Recorded Delay, 64 Results pane, 24, 73, 236 Skip Auto Pages in Thin Load, 100 Specific Data Bank Record, 70 Specific Script Page, 63 Start, 14 Start New Browser Session Before, 100 Stop, 14 Timeout on page after, 97 Unexpected Windows and Dialogs, 83 Up to Current Page, 14 Use all records, 99 Use current record only, 100 Use distinct cookie directory, 100

Page 423: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

Index 403403403403

User Defined Content Comparison Filters, 121

Value, 177 Viewing Results, 24, 73, 236 Visual Scripts, 62 with Data Bank, 65, 67, 99 with Recorded Delay Between Pages,

101 without Data Bank, 65, 66

Playback Current Page menu option, 14 Playback Options

Automatically dismiss dialogs, 98 Automatically invoke script debugger

on scripting errors, 98 Automatically Run Resource

Validation After Playback, 98 Data Banks, 99 Delete persistent cookies before

playback, 100 General settings, 97 Maximum delay (seconds), 101 Play with Recorded Delay Between

Pages, 101 Resource Validation, 150 Script settings, 99 Skip Auto Pages in Thin Load, 100 Start New Browser Session Before

Playback, 100 Timeout on page after, 97 Use all records, 99 Use current record only, 100 Use distinct cookie directory, 100 with Data Bank, 99

Playback Report Viewing, 16

Plus Icon, 132, 254 Prepend Workstation Name, 239 Priority, 300, 307 Profiles

Creating, 194 Selecting, 193

Programming Access Top Document, 333 Access Web Page Objects, 332 Client Types, 327 Data Bank Records, 340 Data Bank Values, 337, 339, 340

Document Objects, 329, 332 Document Objects Properties, 330 Dynamic HTML Events, 331 Find Element in Range, 335 Find HTML Element, 334 Frameset Objects, 333 Match HTML Pattern, 335 Set Properties, 336 Test Scriptlets, 341 Test Scriptlets vs. Web Page, 343

Programming Interface, 5, 315 ProgT Class, 352 ProgX Class, 352 Properties

Action, 174 Actions, 157 Address, 157 All Events, 158 Attribute Name, 178, 181 Attribute Value, 178, 181 Available Images, 177 Available Link, 180 Base Event on Index, 158 Basic Node Properties, 156 Client Requests, 160 Cookies, 160 Current Value, 171 Delay Before Playback, 158 Elapsed Time During Playback, 185 Elapsed Time During Recording, 185 Encoding, 174 End Test on This Page, 185 Error Number from Server, 187 Error String from Server, 187 Event, 161 Execute Existence test, 156 Execute Validation Test, 177, 179 Form, 174 Form Element, 171 Form Element Test, 172 Host Not Reachable, 177, 180 HTML, 175 HTML Source, 176 Image, 176 Java Applets, 177 Link, 178 Link Not Reachable, 177, 180

Page 424: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

404404404404 Functional Testing User's Guide

Mapped to Variable, 183 Maximum Time Allowed for Playback,

185 Menu Option, 12 Method, 174 Minimum Time Allowed for Playback,

185 Object, 180 Page, 156 Page Properties, 181 Parameter, 182 Playback Value, 177, 179 Property, 171 Recorded Duration, 158 Recorded Value, 182 Result, 156 Return Values, 187 Script Node, 183 Script Source, 184 Selected Event, 158 Selected Text, 189 Server Response, 184 Server Responses, 160 Soap, 186 Start Test on This Page, 185 Target, 175 Test Scriptlet, 187 Tested Duration, 158 Tested Value, 182 Text Matching Test, 188 Time Specifications, 185 Title, 156 Type, 156 Unknown image, 177 URL, 157 Viewing, 155–56

Proxy Options, 92 Realm, 308 Record

ActiveX, 45 Anchor Transitions, 42 Auto Pages, 43 Current Page, 14 DHTML Event Handlers, 39, 89 External Window, 42 Flash, 45 Jobs, 32

Manual Navigation, 41 Manually, 32 Menu Option, 13 Navigate Manually, 14 Object Identification, 91 Page Snapshot, 13, 34 Pages with META Refresh, 43 Proxy Options, 92 Start, 13 Stop, 13 Unexpected Windows and Dialogs, 83 User Authentication, 44 Visual Scripts, 32–39 Web Services, 46 Window Events, 46 with e-Spider, 36, 255–60

Record all list selections by index, 85 Recorded Duration, 158 Recorded Value, 265 Recording Options, 84

Event Recording, 89 General, 84 Visual Script, 87

Records Current Number, 265, 267 Fetch, 265, 267 Goto Specific, 265, 267

Red Flag, 132 Redirection Codes, 360 Regenerate load script after each playback,

86 Regenerate Thin Client Script, 108 Release Object Variables, 356 Remove

Authentication, 308, 310 Page from e-Spider, 257 Page from Script, 136 Test from Library, 208 Test from Script, 208, 211

Request, 237 Reset Siebel State, 108 Resize

Output Log View, 73 Resize Results Window, 13 Results Window, 24 Visual Script View, 13, 21

Resource Validation

Page 425: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

Index 405405405405

Menu Option, 14 Select from Results Log, 241

Resource Validation Test Error Recovery, 105 Export Results, 149 For Every Host, 154 Maximum number of threads, 153 Options, 153 Perform after each iteration, 153 Playback Options, 150 Running, 148–54 Specific Node, 152 Start Manually, 148 Timeout in seconds, 154

Response, 237 Results Log

All Details, 240 Append to Log, 240, 241 Clear Output Window, 243 Column Headings, 236, 243 Default Script Name, 239 Delete File, 245, 313 Do Not Log, 240 Export, 242 Export Saved Files, 244 Failures Only, 240 File Name, 239 Hide Pane, 240 Logging Mode, 240 Options, 239 Overwrite Log, 240, 242 Prepend Worksatation Name, 239 Report, 240 Save to File, 242 Select Resource Validation, 241 Select Script Page, 240 Show Pane, 240 Timelines, 237 Use Specified Name, 239 View Saved Files, 243 Workspace Name, 239

Results Menu, 16 Results Report

Change Settings, 248 Options, 246, 247

Resume Spider, 256 Retry Event if Failed, 103

Rollover Parser, 110 RSWIProgsLib.dll, 352 RSWMint.exe, 352 Run Job, 82 Run Menu, 13 Satisfy Expression, 213 Save

e-Spider Map File, 261 Job, 82 Output Log As, 11 Results Log, 242 Site Map, 252 Site Map As, 252 Visual Script, 11, 61 Visual Script As, 11 Web Page As, 11

Script Comments, 12 Script Node

Properties, 183 Script Source, 184

Script Playback options, 99 Script Source, 184 Scriptlet Editing Pane, 23 Scripts Node, 131 Search the World Wide Web, 16 Select Data Bank File, 266, 278 Select Dialog, 298, 302 Select Test Criteria, 213 Select Test From Library, 199, 208 Selected Event, 158 Selected Property, 213 Selected Text, 199

Absent, 199 Present, 199

Server Error Codes, 362 Server Response Test, 208–11

Current Page, 209 Delete from Script, 211 Edit Attributes, 211 Elapsed Time During Playback, 185 Elapsed Time During Recording, 185 End Test on This Page, 185, 210 Error Recovery, 104 Execute Test, 184 Insert into Visual Script, 210 Maximun Time Allowed for Playback,

185

Page 426: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

406406406406 Functional Testing User's Guide

Minimum Time Allowed for Playback, 185

Name, 210 Page Specification, 210 Properties, 184 Start Test on This Page, 185, 210 Time Specifications, 185

Server Status codes, 359 Settings Manager, 17

Changing Across Visual Scripts, 192 Changing Settings, 190 Creating Profiles, 194 Menu option, 17 Selecting Profiles, 193 Using, 189

Severity Mapping, 77 Show Applet Resource, 16 Show Dalog Info, 301 Show Java Console, 16 Show Plugin Java Console, 16 Show Results Log Pane, 240 Siebel

Correlation Library, 108 methods to be databanked, 108

Siebel Options, 106 Siebel Test

Choose What to Test, 228 Insert, 226 Properties, 228 Property Name, 229 Property Value, 229 Text, 228 Wizard Options, 226

Site Map Export, 252, 262 New, 252 Open, 252 Save, 252 Save As, 252

Site Map Tree, 254 Skip

Remaining Iterations on Error, 105 Remaining Pages on Error, 105

Skip Test Flag, 132 Soap

Properties, 186 Specify Comparison Condition, 213

Spider. See e-Spider Start

at Record, 66 Dialog Manager, 302 e-Spider, 253, 255 New Browser Session Before Playback,

100 Server Response Test on Page, 185,

210 Start Playback menu option, 14 Start Recording menu option, 13 Start Windows Event Recorder menu

option, 13 Status Bar, 24, 255 Stop

Browser, 16 e-Spider, 253, 256

Stop Playback menu option, 14 Stop Recording menu option, 13 Stop Windows Event Recorder menu

option, 13 Subject of email, 81 Success Codes, 359 Sun Plugin Applet Support, 115 SwA support, 110 Synthesize Data, 284 Synthesize Data Bank File, 267 System Requirements, 6 T Flag, 254 Table Test

Error Recovery, 104 Insert, 218 Wizard Options, 218

Test Actions, 299 Test Cases

Add Text Matching, 200 Add to Library, 207 Delete from Library, 208 Delete Server Response, 211 Delete Text Matching, 208 Edit Server Response, 211 Edit Text Matching, 207 Form Element, 212–13 Server Response, 208–11 Text Matching, 198–99 Use from Library, 208 Verify Data-Driven Test, 201

Page 427: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

Index 407407407407

Test Library Add Test, 199, 207, 297 Delete Test, 208, 297 Options, 296 Select Test, 199, 208 Using, 295–97

Test Library Manager Menu Option, 19

Test on HTML, 199 Test Results

Accept Tested Pages, 234 All Details, 240 Append to Log, 240, 241 Clear Output Window, 243 Column Headings, 236, 243 Default Script Name, 239 Delete Log File, 245 Discard Tested Pages, 234 Do Not Log, 240 Export Results, 242 Export Saved Files, 244 Falilures Only, 240 Find Next Failure, 232 Find Previous Failure, 232 Form Element Test, 213 Hide Pane, 240 HTML Differences, 232 Ignore Specific Failure, 235 Ignore Test Case, 235 JavaScript Differences, 233 Locate in Script, 231 Log File Name, 239 Loging Mode, 240 Options, 239 Overwrite Log, 240, 242 Prepend Workstation Name, 239 Report, 240 Save to File, 242 Select Resource Validation, 241 Select Script Page, 240 Show Pane, 240 Summary, 236 Text Matching Test, 199 Timelines, 237 Use Specified Name, 239 VBScript Differences, 233 View Saved Files, 243

Workspace Name, 239 Test Results Log

Delete Log File, 313 Test Scriptlets

Debugging, 345 Detach Process, 350 Editing, 344 Error Handling, 344 MS Development Evironment, 347 MS Script Debugger, 345 Properties, 187 Scriptlet Editing Pane, 23 Single Step, 346, 350 Using, 341 Variables, 344 View Locals, 349 vs. Web Page Scripts, 343

Tested Duration, 158 Tested Value, 265 Tests Menu, 14 Tests Node, 131 Text Log in email, 81 Text Matching Test, 198–99

Data-Driven Test, 200–206 Delete from Script, 208 Edit Attributes, 207 Error Recovery, 104 Expected Results, 201 Insert into Script, 200 Properties, 188 Selected Text, 189 Variables, 206

Think Time, 237 Time Specifications, 185 Timelines for Results, 237 Timeout

Event Failure, 103 Resource Validation, 154 Web Page, 97

Toggle Script View, 129 Toolbar

Browser Navigation Options, 16 Data Bank Wizard, 12 Dialog Manager, 298 Edit Options, 253 Edit Options, 12 File Options, 252

Page 428: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

408408408408 Functional Testing User's Guide

File Options, 11 Help Options, 19 Playback Options, 14 Record Options, 13 Resize Results Window, 13 Resize Visual Script View, 13 Resource Validation, 14 RSW e-Spider, 252–54 Test Case Options, 15

Tools Menu, 18 Unexpected Windows and Dialogs, 83 Unique Vars per Page, 268 Up to Current Page menu option, 14 Update Data Bank File, 266 URL Dropdown, 10 Use all records, 99 Use All Records, 66 Use Constant Delay, 102 Use current record only, 100 Use Current Record Only, 66 Use distinct cookie directory, 100 Use Recorded Delay, 102 Use Specified Log Name, 239 User Authentication, 44 User Name, 308 Validation Tests

Export Results to File, 149 Maximum number of threads, 153 Maximum Number of threads, 154 Maximum Timeout in seconds, 154 Options, 153 Perform after each iteration, 153 Playback Options, 150 Running, 148–54 Specific Node, 152 Start Manually, 148 XML Schema, 154

Variable Add, 270 Authentication, 309 Bind Data Banks, 278 Data Bank Binding, 267 Delete, 265 in Text Matching Test, 206 Internal, 272 Map Data Banks, 269 Name, 265

Value, 265 VBScript Differences, 233 View

Playback Report, 16 Playback Results, 73 Resize Results Window, 13 Resize Visual Script, 13 Results Log, 16, 243 Visual Scripts, 129

View Menu, 13 Visual Scripts

Accept Tested Pages, 234 ActiveX Node, 131 Address Node, 131 Address Properties, 157 Anchors Node, 131 Append Page, 134 Append to Job, 74 Arrow Icon, 132 Auto Pages, 43 Automatic Tests, 139–41 Automatically dismiss dialogs, 98 Automatically invoke script debugger

on scripting errors, 98 Automatically Run Resource

Validation After Playback, 98 Change Pane Width, 129 Checkmark Icon, 132 Collapse Tree, 129–31 Comments, 12, 137 Cookies Node, 131 Cookies Properties, 160 Copy Page, 134 Custom Variables, 142 Default Tests, 139–41 Delete, 312 Delete Page, 136 Delete persistent cookies before

playback, 100 Delete Visual Script, 138 Discard Tested Pages, 234 Duration Node, 131 Edit Tree, 134–38 Event Properties, 161 Expand Nodes, 130 Expand Tree, 129–31 Export to File, 133

Page 429: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

Index 409409409409

Find Next Failure, 232 Find Previous Failure, 232 Flag Icons, 20, 132 Form Element Properties, 171 Form Element Test Properties, 172 Form Node, 131 Form Properties, 174 Frames Node, 131 HTML Differences, 232 HTML Node, 131 HTML Properties, 175 Ignore Specific Failure, 235 Ignore Test Case, 235 Image Properties, 176 Images Node, 131 Insert Page, 135 Java Applet Node, 131 Java Applet Properties, 177 JavaScript Differences, 233 Job Icon, 132 Link Properties, 178 Links Node, 131 Locate Failures, 232 Maximum Delay (seconds), 101 Minus Icon, 132 Modify Default Tests, 139–41 Move Page, 134 Navigation, 326 Node Properties, 156 Node Types, 131–32 Object Properties, 180 Overview, 4 Page Icon, 132 Page Properties, 181 Pages with META Refresh, 43 Parameter Properties, 182 Parameters Node, 131 Play with Recorded Delay Between

Pages, 101 Playback, 62, 63 Playback Iterations, 65 Playback Multiple Times, 65 Playback On Different URL, 72 Playback Specific Page, 63 Playback Specific Record, 70 Playback with Data Bank, 67, 99 Playback with Recorded Delay, 64

Plus Icon, 132 Programming, 325 Record, 32–39 Record Anchor Transitions, 42 Red Flag, 132 Results Log, 24, 236 Results Timelines, 237 Saving, 61 Script Icon, 132 Script Node Properties, 183 Scripts Node, 131 Select Page from Results Log, 240 Server Response Properties, 184 Settings Manager, 189 Shortcut Menu, 20 Skip Auto Pages in Thin Load, 100 Soap Properties, 186 Start New Session Before Playback,

100 Stripped Flags, 20 Test Scriptlet Properties, 187 Tests Node, 131 Text Matching Properties, 188 Timeout on page after, 97 Type of Information, 131 Use all records, 99 Use current record only, 100 Use distinct cookie directory, 100 User Authentication, 44 VBScript Differences, 233 View Node Properties, 155–56 View Pane, 19 with Client Types, 327 Working with, 129 Yellow Flag, 132

Visual Test Results Analysis, 6 Web Server Testing, 5 Web Services

Addressing, 58 Editing, 52 Methods, 50 Recording, 46 Security, 58 SOAP/HTTP Traffic, 49 Testing Methods, 57 Wizard, 47 WSDL Address, 49

Page 430: Oracle Functional Testing for Web Applications …ocom/documents...Contents vi vi ``` Functional Testing User's Guide Chapter 4 Working with Visual Scripts 129 Viewing Visual Scripts.....129

Index

410410410410 Functional Testing User's Guide

Web Services Options, 108 Web Services Script menu option, 14, 18 Webanlst.exe, 352 While Idling, 301 Window Events Recording, 46 WinForms Options, 110 WinForms Test

Choose What to Test, 224 Insert, 222 Properties, 224 Property Name, 224 Property Value, 224 Text, 224 Wizard Options, 222

Wizard Address of email, 81 HTML Summary in email, 81

Mail Server, 81 Send Text Log, 81 Subject of email, 81

Workspace Manager Menu Option, 18

Workspace Settings Manager, 17 Workspaces

Add New, 26 Delete, 28, 311 Existing, 311 New, 26, 310 Open, 27

WSDL Parser, 109 X Flag, 254 XML Schema

Validation, 154 Yellow Flag, 132, 254