1 Getting Started With OpenScript

OpenScript is an updated scripting platform for creating automated extensible test scripts in Java. Combining an intuitive graphical interface with the robust Java language, OpenScript serves needs ranging from novice testers to advanced QA automation experts.

OpenScript is built on a standards-based platform and provides the foundation for OpenScript Modules and Application Programming Interfaces (APIs). OpenScript APIs are used to build scripts for testing Web applications. The OpenScript API consists of a set of procedures that can be used to customize the scripts within the development environment. The API can also be used by advanced technical users to enhance scripts for unique testing needs.

1.1 OpenScript Features

OpenScript is the next generation environment for developing Oracle Application Testing Suite scripts for Web application testing. OpenScript provides the following features:

  • Scripting Workbench - OpenScript provides an Eclipse -based scripting Workbench where you can create and run your automated test scripts. Users can use the Tree View graphical scripting interface for creating and editing scripts through the UI. Users can also switch to the Java Code View programming interface and leverage the integrated Eclipse IDE for creating and editing their scripts programmatically.

    Functional test scripts created in OpenScript can be played back to test and validate application functionality. Load test scripts created in OpenScript will run in Oracle Load Testing for application load testing, allowing users to simulate hundreds our thousands of users executing scripts at the same time.

  • Test Modules - The OpenScript Test Modules provide application-specific test automation capabilities. Each Test Module is custom built to test a specific application or protocol. OpenScript includes several functional and load testing modules for testing Web-based applications. Additional modules can be developed for the OpenScript platform.

    OpenScript's Test Module interface is completely open and extendable by end-users. Users can leverage the Test Module API to build their own modules for testing specific applications or can extend an existing module to add custom functionality.

  • Graphical/Tree View Scripting Interface - The OpenScript Tree View scripting interface provides a graphical representation of the test script. Multiple script windows can actually be open at the same time. Within each script window, the Tree View is broken down into 3 main script sections:

    • Initialize: For script commands that only execute once on the first iteration

    • Run: Main body of the script for commands that will run on every iteration

    • Finish: For script commands that only execute once on the last iteration

    Within each section, script Steps and Navigation nodes can be created automatically during script recording or manually through the Tree View user interface. Additional script commands will also be represented as nodes in Tree View including test cases, data inputs, log messages, etc. Each Tree View node has a corresponding representation in the Java Code View.

  • Programming/Code View Scripting Interface - The OpenScript Java Code View scripting interface provides a Java representation of the test script. This view provides full access to Eclipse IDE for creating, editing & debugging script code. Script commands in Java are mapped to a corresponding representation in the Tree View. Users can edit their script in either the code or tree view and changes will be automatically reflected in both views.

  • Properties View & Results View - The OpenScript Properties View allows users to view detailed properties for selected script nodes in the Tree View. The Results View shows detailed step-by-step results of script playback which are linked to the OpenScript display window.

  • Data Parameterization - OpenScript allows users to parameterize script data inputs to perform data driven testing. OpenScript uses the following types of data sources:

    • Databank - one or more external comma-separated value (CSV) or text (TXT) files that provides inputs to script parameters. Multiple Databank files can be attached to a single script and users can specify how OpenScript assigns data during script playback. Script playback iterations can cycle through the Databank sequentially, randomly, and by shuffling the data. Databanks can be used with functional and load test scripts. See Section 4.2, "Using Script Databanks" for additional information.

    • Database - a SQL query that extracts data from an Oracle Database in the same format as a Databank CSV or TXT file. See Section 4.2, "Using Script Databanks" for additional information.

    • Data Table - a spreadsheet table that specifies the data by row and column. The data in the table can be entered manually of imported from an Excel spreadsheet file. The Data Table API provides methods for accessing the data in the table programmatically. See Section 4.3, "Using Data Tables" for additional information.

    • Shared Data Service - a Shared Data Module API that provides methods for sharing data between Virtual User agents using a shared data queue or hash map. See Chapter 21, "Using the Shared Data Module" for additional information.

    Users can select any data inputs for their script and then substitute a variable to drive the input from the data source during playback.

  • Correlation - The OpenScript Correlation interface allows users to create correlation libraries to automatically parameterize dynamic requests during playback. Correlation libraries contain rules for automatically handling dynamic request parameters such as urls, query strings and post data for the load testing modules.

  • OpenScript Preferences - The OpenScript Preferences interface is where users specify settings to control script recording, script playback, correlation and general preferences for the OpenScript Workbench.

  • Multi-User Execution - launch more than one OpenScript instance under separate named Windows user accounts. Playback for multiple scripts is supported using any of the following:

    • OpenScript Playback button

    • Command-Line Interface

    • Oracle Load Testing

    • Oracle Test Manager

1.2 Installing OpenScript

To install OpenScript:

Note:

OpenScript requires Administrator Privileges to be installed and uninstalled. It does not require Administrator Privileges to run.
  1. Go to: http://www.oracle.com/technetwork/oem/app-test/index.html.

  2. Download the product Zip file from the Web site and save it to a temporary directory on your hard disk. See the Oracle Application Testing Suite Release Notes for additional information about the product zip files.

  3. Unzip the download Zip file and run setup.bat.

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

    Note:

    A product establishes its Default Repository in $installDir/OFT, where $installDir is the directory where Oracle Application Testing Suite is installed or, if Oracle Application Testing Suite is not installed, where OpenScript is installed.

    During the Oracle Application Testing Suite installation, you will be required to enter a master password to be used with Oracle Application Testing Suite products. Remember this password. It will be required to log in to the Administrator, Oracle Load Testing, and Oracle Test Manager. The password is not required for OpenScript.

  5. Select OpenScript from the Oracle Application Testing Suite start menu to start the OpenScript Workbench.

1.3 Starting the OpenScript Workbench

To start the OpenScript workbench:

From the Start menu:

  • Select Programs from the Start menu and then select OpenScript from the Oracle Application Testing Suite menu.

1.4 Overview of the OpenScript Main Window (Workbench)

The OpenScript main window (Workbench) is where you perform the majority of your test development activities. The main window consists of the perspectives used for developing scripts. OpenScript includes a Tester Perspective and a Developer Perspective. The menu bar, toolbar, and the views and editors vary depending upon which perspective is being used. The following sections describe the functionality and various elements of the OpenScript Workbench.

Some dialogs and views require the user to hit the popup menu keyboard button in order to access some features in the UI that are normally accessible using the right-click menu.

1.4.1 Tester Perspective

The OpenScript Tester Perspective provides a convenient way to record and edit scripts and view the playback results. The Tester Perspective opens the following views by default.

  • Script View: Shows the recorded script in two tabs: Tree View and Java Code. The Tree View tab shows the steps and pages and the Initialize, Run, and Finish nodes of each step using a graphical tree view. The Java Code tab shows the underlying Java code used for the script. The Assets view tab shows the script assets (databanks, jar files, Object libraries and child scripts) that have been added to the script.

  • Details View: Shows the content details for URL navigations or pages added to the script.

  • Problems View: Shows any problems in the script code that may produce errors or prevent compiling the script.

  • Properties View: Shows the properties for the selected node in the script.

  • Console View: Shows the playback command output and status information for the script. Script log message also appear in the Console.

  • Results View: Shows the results of script playback.

The following views are also available from the View menu but do not open by default:

  • Error Log View: Shows the error log information for the project and script.

  • Data Table View: Shows a spreadsheet-like data table for Functional testing scripts.

  • Object Details View: Shows the attributes and values for the object selected in the browser connected to the view.

  • Script Variables View: Shows the name and value of script variables. The script variables are only shown when a running script is paused during playback.

  • Treeview Breakpoint View: Shows the location of breakpoints set in the script tree view.

The views are described in more detail in the following sections.

1.4.2 Developer Perspective

The OpenScript Developer Perspective provides advanced options for developers when creating and editing scripts using the advanced features of OpenScript and the Eclipse development platform. The Developer Perspective opens the following views by default:

  • Navigator and Package Explorer Views: Shows hierarchical views of the script project resources. You can open the resource files in an editor to view and edit the contents.

  • Script View: Shows the recorded script in two tabs: Tree View and Java Code. The Tree View tab shows the steps and pages and the Initialize, Run, and Finish nodes of each step using a graphical tree view. The Java Code tab shows the underlying Java code used for the script. The Assets view tab shows the script assets (databanks, jar files, Object libraries and child scripts) that have been added to the script.

  • Debug View: Shows the debugging options and provides options for stepping through code.

  • Variables and Breakpoint Views: Shows the script variables and breakpoints set in the code.

  • Problems View: Shows any problems in the script code that may produce errors or prevent compiling the script.

  • Declaration View: shows the source of the element selected in the Java code view.

The following views are also available but do not open by default:

  • Details View: Shows recorded page details in three tabs: HTML, Browser, and Header. The HTML tab shows the page HTML source. The Browser tab shows the page. The Header tab shows the page response header.

  • Properties View: Shows the properties for the selected node in the script.

  • Console View: Shows the playback command output and status information for the script. Script log message also appear in the Console.

  • Results View: Shows the results of script playback.

  • Error Log View: Shows the error log information for the project and script.

  • Data Table View: Shows a spreadsheet-like data table for Functional testing scripts.

  • Object Details View: Shows the attributes and values for the object selected in the browser connected to the view.

  • Script Variables View: Shows the name and value of script variables. The script variables are only shown when a running script is paused during playback.

  • Treeview Breakpoint View: Shows the location of breakpoints set in the script tree view.

The views are described in more detail in the following sections.

1.4.3 OpenScript Menu Options

The menu options that appear change depending upon which perspective is set in the Workbench (Tester or Developer) and which view is the active view. Specific test modules may also add or remove menu options.

1.4.3.1 File

  • New - opens the New Project wizard. You can select the type of project including OpenScript scripts, jobs and modules

  • Open Script - opens a window for selecting the OpenScript Repository, workspace, and script to open.

  • Open Object Library - opens a dialog box for selecting the object library file to open. This option only appears for functional test scripts.

  • Open File - opens a window for selecting the file to open.

  • Close - closes the script editor.

  • Close All - closes all script editors.

  • Save - saves the data in the currently active editor.

  • Save As - saves the data in the currently active editor using a new name.

  • Save All - saves the data in all open editors.

  • Restart - restarts the OpenScript application and the Eclipse IDE.

  • Import Script - opens a window for importing an archived OpenScript script project from a .zip file.

  • Export Script - opens a window for exporting the OpenScript script project to an archive .zip file.

  • Exit - exits OpenScript.

  • [Recent files list] - shows the most recent script files/repository location opened on OpenScript Click a file name to open it in OpenScript. You can set the number of files in the list using the Workbench Preferences (select Preferences from the Window menu in the Developer Perspective. Expand the General preferences and then select Editors).

The following options are also available in the Developer Perspective:

  • Revert - reverts changes to the last saved file contents.

  • Move - opens a dialog box for selecting where to move the resource.

  • Rename - opens a dialog box for specifying a new name for the resource.

  • Refresh - refreshes the resources in the Navigator or Package view.

  • Convert Line Delimiters To - opens a sub menu for selecting the type of line delimiters for the conversion: Windows, UNIX, or Mac OS.

  • Print - prints the contents of the selected editor view.

  • Switch Workspace - opens a dialog box for selecting the workspace to use.

  • Restart - restarts OpenScript.

  • Import - opens a window for selecting the type of project to import.

  • Export - opens a window for exporting the type of project to export.

  • Properties - opens the properties information for the selected resource.

1.4.3.2 Edit

  • Undo - undoes the last action.

  • Redo - redoes the last action.

  • Cut - cuts the selected text/data to the clipboard.

  • Copy - copies the selected text/data to the clipboard.

  • Paste - pasted text/data on the clipboard to cursor location.

  • Delete - deletes the selected text/data.

  • Select All - selects all text/data in the currently active editor.

  • Find/Replace - opens a dialog box for setting the text search and replace options. The menu option is available when an editor is open.

  • Search - opens a dialog box for specifying the search criteria.

The following options are also available when the Java Code editor is open in the Script view.

  • Expand Selection To - opens a sub menu for selecting which element to use to expand the selection.

  • Find/Replace - opens a dialog box for specifying the text to find and replace. You can specify the search direction, scope, and search options.

  • Find Next - finds the next instance of the Find text specified in the Find/Replace settings.

  • Find Previous - finds the previous instance of the Find text specified in the Find/Replace settings.

  • Incremental Find Next - finds the next instance of the Find text specified in the Find/Replace settings.

  • Incremental Find Previous - finds the previous instance of the Find text specified in the Find/Replace settings.

  • Add Bookmark - opens a dialog box for specifying the bookmark name.

  • Add Task - opens a dialog box for defining a task to perform on a resource.

  • Smart Insert Mode - when selected, code typing aids such as automatic indentation and closing of brackets are enabled in the code view.

  • Show Tooltip Description - opens a description for the current selection in the Code View.

  • Content Assist - opens a context assist menu to bring up Java code assist proposals and templates. See the Templates preference page for available templates (Window > Preferences > Java > Editor > Templates) and go to the Editor preference page (Window > Preferences > Java > Editor > Code Assist) for configuring the behavior of code assist.

  • Word Completion - completes typing of a partial word.

  • Quick Fix - If the cursor is located at a location with problem indication this opens a context assist dialog at the current cursor to present possible corrections.

  • Set Encoding - opens a dialog box for setting the type of text file encoding.

1.4.3.3 Search

  • Search - opens a dialog box for specifying the search criteria.

  • File - opens a dialog box for specifying the file search criteria.

  • Text - opens a sub menu for selecting the text search location.

1.4.3.4 Script

  • Add - opens a sub menu for adding options to the script tree.

  • Record - starts the selected OpenScript script recorder.

  • Playback - plays back the currently open OpenScript

  • Iterate - plays back the script repeatedly, with or without a Databank.

  • Pause/Resume - pauses and resumes script playback. These options are only active during script playback.

  • Stop - stops the OpenScript script recorder.

  • Step - runs the currently selected node and moves the execution point to the next sibling node. If the selected node has a child node, the execution pointer is moved to the first child node. This option is only active during script playback and script execution is suspended while stepping through the script code.

  • Step Into - steps into the function or sub procedure. This option is only active during script playback and script execution is suspended while stepping through the script code. The execution pointer is moved into the beginning of the function.

  • Configure Recorders - opens a window for pausing and restarting the current script recorder. This option is only available while in Record mode.

  • Set Record Section - opens a submenu for selecting the section of the script where script recording will begin. The selected section will be highlight in bold in the script tree. The Run section is the default. The submenu has the following options:

    • Initialize - starts script recording in the Initialize section of the script.

    • Run - starts script recording in the Run section of the script.

    • Finish - starts script recording in the Finish section of the script.

  • Add Step Group - opens a dialog box for manually adding a Step Group to a script. This option is only available when a script is open.

  • Revert all Navigations to Recorded - reverts changes back to the recorded version of the script.

  • Update Step Groups - opens a dialog box for specifying the Update Step Group options.

  • Create/Update Step Groups - creates step groups in the script based on page navigations.

  • Correlate Script - opens a dialog box for selecting a defined correlation library to manually apply to the script. Correlation libraries are used to convert dynamic data in page navigations to variable values for script playback. Use the Correlation options in the OpenScript Preferences to define the correlation libraries and rules.

  • Script Properties - opens a window for setting script-related properties such as correlation, modules, and step groups. Script properties will vary depending upon the script type.

The Script menu includes additional options for functional test scripts:

  • Select Browser - opens a submenu for selecting the browser to use for recording functional test scripts. The list of browsers shows all running browsers that belong to the current user that are not in record, capture, or playback status. When you record, playback, or capture, OpenScript will use the selected browser. The default browser is the browser instance started by OpenScript.

  • Inspect Path - starts the object capture mode and opens a browser for selecting the object path to capture. The object path is used by functional test scripts for object identification.

  • Apply Object Libraries - opens a dialog box for selecting an object library to apply to the current functional test script.

  • Add Object Test - opens a dialog box for defining an object test for a functional test script.

  • Add Table Test - opens a dialog box for defining a table test for a functional test script.

  • Add Text Matching Test - opens a dialog box for defining a Text Matching test for a functional test script.

  • Add Capture Page - opens a dialog box for specifying a page to capture for a functional test script. The Capture Page option captures a screenshot and the page HTML.

1.4.3.5 View

  • Tester Perspective - changes the Workbench to the Tester Perspective.

  • Developer Perspective - changes the Workbench to the Developer Perspective.

  • Reset Perspective - resets the current perspective to the default settings.

  • Error Log - toggles the Error Log View. When selected, the Error Logs view is displayed. When cleared, the Error Log View is hidden.

  • Properties - toggles the Properties View. When selected, the Properties view is displayed. When cleared, the Properties View is hidden.

  • Problems - toggles the Problems View. When selected, the Problems view is displayed. When cleared, the Problems View is hidden.

  • Details - toggles the Details View. When selected, the Details view is displayed. When cleared, the Details View is hidden.

  • Console - toggles the Console View. When selected, the Console view is displayed. When cleared, the Console View is hidden.

  • Results - toggles the Results View. When selected, the Results view is displayed. When cleared, the Results View is hidden.

  • Data Table - toggles the Data Table View. When selected, the Data Table view is displayed. When cleared, the Data Table View is hidden.

  • Object Details - toggles the Object Details View. When selected, the Object Details view is displayed. When cleared, the Object Details View is hidden.

  • Script Variables - toggles the Script Variables View. When selected, the Script Variables view is displayed. When cleared, the Script Variables view is hidden.

  • Treeview Breakpoint - toggles the breakpoint indicators in the script tree view and the Treeview Breakpoint view. When selected, any breakpoints set in the script are displayed and the Treeview Breakpoint view is shown. When cleared, the breakpoints in the script tree and the Treeview Breakpoint view are hidden.

  • OpenScript Preferences - opens the OpenScript Preferences dialog box for specifying default settings and options.

1.4.3.6 Run

  • Resume - resumes suspended code execution or script playback.

  • Suspend - suspends the current code execution or script playback.

  • Terminate - ends the current code execution or script playback.

  • Step Into - single steps code execution into the highlighted statement or method. The Step options are active in debug mode.

  • Step Over - single steps code execution over the current statement or method to the next statement or method.

  • Step Return - steps code execution out of the current method and stops after exiting the current method.

  • Run to Line - resumes execution until the specified line is executed. Used When a thread is suspended.

  • Use Step Filters - toggles step filters on and off. When set to on, all step functions apply step filters.

  • External Tools - opens a sub menu for selecting the external tools option.

The following options are also available in the Developer Perspective:

  • Run - runs the last launched code or script playback.

  • Debug - opens the debug configuration options for the last launched code or script playback. You can customize the debug configuration before launching the code or script playback for debugging.

  • Run History - opens a sub menu listing run configurations. Selecting a run configuration shows the run history in the debug view.

  • Run As - opens a sub menu listing available external run tools. External tools need to be configured to appear on the sub menu by selecting External Tools from the Run menu.

  • Run Configurations - opens the run configuration options for the last launched code or script playback. You can customize the run configuration before launching the code or script playback.

  • Debug History - opens a sub menu listing debug configurations. Selecting a debug configuration shows the run history in the debug view.

  • Debug As - opens a sub menu listing available external run tools. External tools need to be configured to appear on the sub menu by selecting External Tools from the Run menu.

  • Debug Configurations - opens the debug configuration options for the last launched code or script playback. You can customize the debug configuration before launching the code or script playback.

1.4.3.7 Tools

  • Manage Scripts - opens a window for managing OpenScript scripts.

  • Manage Folders - opens a window for managing folders used for OpenScript Workspaces.

  • Manage Repositories - opens a window for managing OpenScript Repositories.

  • Remove Unchanging Variables - opens a window for selecting and removing script variables that it is known will never change. Removing unchanging variables can improve script playback performance because unchanging variables will not need to be evaluated during script playback.

  • Import Database File - opens the Import Database File Wizard for importing a Database Replay capture file, SQL statements from a plain SQL and PL/SQL statements .SQL script file, or SQL statements captured and stored in an SQL Tuning Set (STS) in Oracle Database to generate an OpenScript load testing script.

  • Merge Object Libraries - opens a dialog box for specifying two Object Library files to merge and the resulting output file.

  • Parameterize URLs - opens a window for specifying a variable name to use to replace a URL.

  • Generate XPaths - opens a dialog box for generating an XPath from an XML file.

  • Export Playback Settings - opens a file save dialog box for specifying the folder and file name of the playback properties file to save.

  • Import Oracle Real User Experience Insight (RUEI) Session Log - opens a dialog box for selecting a RUEI captured user session .tab log file and specifying the script creation options. The imported RUEI session log files record to HTTP-based OpenScript scripts.

  • Convert to Function Library - converts the current script to a function library script. A dialog box opens for specifying a Package and Class Name for the function library. The option is only enabled if the current script is not a function library script. See Section 3.3.6, "Using a Script as a Dedicated Function Library" for additional information about function library scripts.

  • Migrate Scripts - opens the Script Migration Manager for migrating pre-version 9.10 scripts to the current version. The Script Migration Manager provides options for migrating top-level scripts and locating all dependent child scripts.

1.4.3.8 Help

  • Welcome opens the welcome page with links to the Workbench product documentation.

  • OpenScript Diagnosis Tool - opens the Diagnosis Wizard for verifying the connection status of the OpenScript Internet Explorer Browser Helper Object (BHO), Firefox extensions, and Forms Internet Explorer helper object.

  • Help Contents - opens the help table of contents.

  • Search - opens the help search view.

  • Dynamic Help - opens the available help topics for the currently active view and perspective.

  • Key Assist - opens the list of keyboard shortcuts.

  • Tips and Tricks - opens the help tip and tricks window.

  • Cheat Sheets - opens the Cheat Sheets view.

  • About OpenScript - provides version and copyright information and configuration details.

1.4.3.9 Navigate

The Navigate menu appears when the Developer perspective is open.

  • Go Into - refocuses the active view so that the current selection is at the root. This allows web browser style navigation within hierarchies of artifacts.

  • Go To - opens a sub menu with options for selecting the location to which to navigate. The sub menu options change depending upon the current view.

  • Open Type - opens a dialog box for selecting the type library to open in an editor view.

  • Open Type in Hierarchy - opens a dialog box for selecting the type library to open in a hierarchy view.

  • Open Resource - opens a dialog box for selecting the resource file to open in an editor view.

  • Show In - opens a sub menu for selecting where to show the statement or method selected in the code view: Package Explorer, Navigator, or Outline view.

  • Next Annotation - moves the selection to the next annotation in the Code View.

  • Previous Annotation - moves the selection to the next annotation in the Code View.

  • Last Edit Location - moves the selection to the location of the last edit made in the Code View.

  • Go to Line - opens a dialog box for specifying the Java code line number to go to when in the Java Code view.

  • Back - moves the selection back through the list of locations previously selected in the Code view.

  • Forward - moves the selection forward through the list of locations previously selected in the Code view.

Additional menu options may appear depending upon the current Java Code editor selection.

1.4.3.10 Project

The Project menu appears when the Developer perspective is open.

  • Open Project - opens the project selected in the Navigator View.

  • Close Project - closes the project selected in the Navigator View.

  • Build All - builds all projects. This option is only available if the Build Automatically option is not selected.

  • Build Project - builds the current project. This option is only available if the Build Automatically option is not selected.

  • Build Working Set - opens a sub menu for selecting or creating a working set of projects. Working set projects are only available if the Build Automatically option is not selected.

  • Clean - opens a dialog box for selecting the project to clean of build problems.

  • Build Automatically - toggles the automatic build option on and off.

  • Generate Javadoc - opens the Generate Javadoc window.

  • Properties - opens the properties window for the current project.

1.4.3.11 Window

  • New Window opens a new OpenScript window.

  • New Editor opens a new editor view of the current file.

  • Open Perspective opens a sub menu for selecting the perspective to open.

  • Show View opens a sub menu for selecting the view to show.

  • Customize Perspective opens a window for selecting the shortcuts and commands to customize.

  • Save Perspective As opens a dialog box for specifying a name for the saved perspective.

  • Reset Perspective resets the current perspective to the default settings.

  • Close Perspective closes the currently open perspective.

  • Close All Perspectives closes all perspectives.

  • Navigation opens a sub menu for selecting navigation options.

  • Preferences opens a window for specifying the project preferences.

1.4.4 OpenScript Tool Bar

The following toolbar buttons are available in the Tester and Developer Perspectives:

  • New - opens a Wizard for creating new OpenScript scripts or Java platform objects and resources.

  • Open - opens a dialog box for selecting an existing OpenScript script.

  • Save - saves the changes in the currently active editor. The button is only active if an editor is open with changes to be saved.

  • Print - prints the information in the currently selected editor. The button is only active if an editor with printable content is open.

  • Record - starts OpenScript script recording using the selected script recorder. Clicking the menu button opens the a menu listing the available recorder types.

  • Playback - starts playback of the currently open Visual Script.

  • Iterate - opens a dialog box for specifying the playback iterations options.

  • Pause/Resume - pauses and resumes script playback. These buttons are only active during script playback.

  • Stop - stops OpenScript script recording.

  • Step - runs the currently selected node and moves the execution point to the next sibling node. If the selected node has a child node, the execution pointer is moved to the first child node. This button is only active during script playback and script execution is suspended while stepping through the script code.

  • Step Into - steps into the function or sub procedure. This button is only active during script playback and script execution is suspended while stepping through the script code. The execution pointer is moved into the beginning of the function.

  • Select Browser - opens a submenu for selecting the browser to use for recording functional test scripts. The list of browsers shows all running browsers that belong to the current user that are not in record, capture, or playback status. When you record, playback, or capture, OpenScript will use the selected browser. The default browser is the browser instance started by OpenScript.

  • Configure Recorders - opens a window for pausing and restarting the current script recorder. This option is only available while in Record mode.

  • Set Record Section - opens a submenu for selecting the section of the script where script recording will begin. The selected section will be highlight in bold in the script tree. The Run section is the default.

    • Initialize - starts script recording in the Initialize section of the script.

    • Run - starts script recording in the Run section of the script.

    • Finish - starts script recording in the Finish section of the script.

  • Add Step Group - opens a dialog box for manually adding a Step Group to a script. This option is only available when a script is open.

  • Inspect Path - starts the object capture mode and opens a browser for selecting the object path to capture. The object path is used by functional test scripts for object identification.

  • Add Object Test - opens a dialog box for defining an object test for a functional test script.

  • Add Table Test - opens a dialog box for defining a table test for a functional test script.

  • Add Text Matching Test - opens a dialog box for defining a Text Matching test for a functional test script.

  • Add Capture Page - opens a dialog box for specifying a page to capture for a functional test script.

  • Toolbar - opens the floating toolbar.

  • Debug - opens a dialog box for specifying a debug configuration. This button is only available when the Developer Perspective is open.

  • Run - Runs the selected configuration type or application. This button is only available when the Developer Perspective is open.

  • Run External Tools - Runs an external application. This button is only available when the Developer Perspective is open.

  • New Java Project - opens a window for creating a new Java project.This button is only available when the Developer Perspective is open.

  • New Java Package - opens a window for creating a new Java package. This button is only available when the Developer Perspective is open.

  • New Java Class - opens a window for creating a new Java class. This button is only available when the Developer Perspective is open.

  • Open Type - opens a window for specifying the type library to open. This button is only available when the Developer Perspective is open.

  • Search - opens a dialog box for specifying search options.

  • Next Annotation - goes to the next annotation in the Java code. This button is only available when the Developer Perspective is open. and a Java Code view is open.

  • Previous Annotation - goes to the previous annotation in the Java code. This button is only available when the Developer Perspective is open. and a Java Code view is open.

  • Last Edit Location - opens the edit view that was open and goes to the last edit location. This button is only active when a Java Code view is open.

  • Back to (location) - browses back to the last OpenScript script view. This button is only available when the Developer Perspective is open.

  • Forward - browses forward to the previous OpenScript script view. This button is only available when the Developer Perspective is open.

1.4.5 Script View

Shows the recorded script in three tabs: Tree View, Java Code, and Assets. The Tree View tab shows the steps and pages and the Initialize, Run, and Finish nodes of each step using a graphical tree view. The Java Code tab shows the underlying Java code used for the script. The Assets view tab shows the script assets (databanks, jar files, Object libraries and child scripts) that have been added to the script.

The script view is where you perform the majority of script editing actions. The Script view has the following tab views:

1.4.5.1 Tree View

The Tree View shows the script navigations and data as nodes in a collapsible tree view. The Tree View corresponds to the Java Code view. Any changes in the Tree View will be automatically updated in the Java Code view. The Tree View has the following standard nodes:

  • Initialize - specifies script actions to perform once at the beginning of script playback.

  • Run - specifies script actions to perform one or more times during script playback depending upon databanks or other custom programming.

  • Finish - specifies script actions to perform once at the end of script playback.

Use the Record options and right-click shortcut menu to add options to script nodes or modify the properties of script nodes in the Tree View.

1.4.5.2 Java Code

The Java Code view shows the script navigations and data as Java programming code. The Java Code view corresponds to the Tree View. Any changes in the Code View will be automatically updated in the Tree View. The Java Code view has the following standard procedures:

  • initialize() - corresponds to the Initialize node of the Tree View and executes any custom code added once at the beginning of script playback.

  • run() - corresponds to the Run node of the Tree View and executes recorded and custom code one or more times during script playback depending upon databanks or other custom programming.

  • finish() - corresponds to the Finish node of the Tree View and executes any custom code added once at the end of script playback.

Use Ctrl-space to open an Intellisense window listing available procedures. See the API Reference in the OpenScript Platform Reference help for additional programming information.

1.4.5.3 Assets

The Assets view tab shows the script assets (databanks, jar files, Object libraries and child scripts) that have been added to the script. If assets have been added to a script, the tree shows a plus/minus next to the asset name for expanding or collapsing the asset tree. The Assets tab has the following options:

  • Databanks: Lists the Databank assets added to a script.

  • Object Libraries: Lists the Object Library assets added to a script.

  • Jar files: Lists generic Jar file assets added to a script.

  • Script: Lists the child script assets added to a script.

  • Add: Opens a file selection dialog box for selecting the file to add as an asset. Expand the My Repositories tree to navigate to a workspace folder containing the file. For Databanks, a submenu opens for selecting CSV file or database-type databanks. For CSV file databanks, you select the file. For database-type databanks, you specify the database driver and connection information.

    Note:

    Any scripts you plan to run, along with any associated assets, in the Oracle Load Testing application must be stored in a repository/workspace that can be accessed by the Oracle Load Testing Controller. If you create new repositories in OpenScript, you should also add the new repositories in Oracle Load Testing.
  • Edit: Opens a file selection dialog box for changing which file is added as an asset.

  • Open: Opens the selected asset file in the appropriate editor.

  • Remove: Removes the selected asset file from the Assets tree. The file still exists in repository/workspace.

1.4.5.4 Assets

The Assets view tab shows the script assets (databanks, jar files, Object libraries and child scripts) that have been added to the script.The Java Code view has the following standard procedures:

  • Databanks - lists the databanks that have been added to the script.

  • run() - corresponds to the Run node of the Tree View and executes recorded and custom code one or more times during script playback depending upon databanks or other custom programming.

  • finish() - corresponds to the Finish node of the Tree View and executes any custom code added once at the end of script playback.

Use Ctrl-space to open an Intellisense window listing available procedures. See the API Reference in the OpenScript Platform Reference help for additional programming information.

1.4.6 Details View

The Details view shows the content details for URL navigations added to the script. The Details view may have the following tab views depending upon the selected script node and type of script:

  • ScreenShot - shows a screen capture of the web page.

  • Browser - shows the Browser rendered page for the script navigation selected in the tree view.

  • HTML - shows the HTML source for the script navigation selected in the tree view.

  • Headers - shows the Request Header and Response Header source for the script navigation selected in the tree view.

  • Comparison - shows the recorded and playback text for the Content, Request Header, or Response Header selected in the Compare list. The Comparison tab appears only after a script is played back and a navigation is selected in the Results View.

  • Results Report - shows the results report for the script playback. The Results Report tab appears only after a script is played back and a navigation is selected in the Results View.

1.4.7 Problems View

The Problems view shows any problems in the script code that may produce errors or prevent compiling the script. The Problems view shows the following information:

  • # error, # warnings, # infos - shows the number of errors, warning messages, and information messages in the problems view.

  • Description - shows a description of the errors, warning messages, and information messages.

  • Resource - shows the name of the resource file where the error, warning, or information message was generated.

  • Path - shows the script name, workspace, and repository path where the resource file is located.

  • Location - shows the location/line number where the error, warning, or information message was generated.

The following toolbar button is available in the Problems View:

  • Configure the filters to be applied to this view - opens a dialog box for configuring the filters to apply to the Problems View.

1.4.8 Properties View

The Properties view shows the properties for the selected node in the script. The Properties view shows the following information:

  • Property - shows the names of the properties for the script node. The properties vary depending upon which type of script node is selected.

  • Value - shows the value of the script node properties. Property values can be edited in the properties view.

The following toolbar buttons are available in the Properties View:

  • Show Categories - toggles the property categories.

  • Show Advanced Properties - toggles the advanced properties.

  • Restore Default Value - restores any changed property values to the default values.

1.4.9 Console View

The Console view shows the playback command output and status information for the script. Script log message also appear in the Console. See the Process Console View topics in the reference section of the Java development user guide online help for additional information about console toolbar options.

1.4.10 Results View

The Results view shows the playback results for the script. The Results View shows the following information:

  • Name - shows the test date or navigation name.

  • Duration (sec) - shows the absolute time delta in secondsbetween when the action began and when it ended.

  • Response Time (sec) - shows the DNS Lookup time plus Establish Connect time plus Write Request time plus Read Response time.

  • Result - shows the playback result: Passed or Failed.

  • Summary - shows the data values from the Databank that are passed to parameters or it shows failure descriptions.

The following toolbar buttons are available in the Results View:

  • Delete Result - deletes the selected result row.

  • Delete All Results - deletes all rows from the Results View.

  • Scroll Lock - toggles scroll lock on and off for the Result View.

  • Properties - opens the Properties for the selected result.

1.4.11 Error Log View

The Error Log view shows the error log information for the project and script. The following toolbar buttons are available in the Error Log View:

  • Export Log - exports the error log to a text file.

  • Import Log - imports an error log text file to the Error Log View.

  • Clear Log Viewer - clears all entries from the Error Log View.

  • Delete Log - deletes all logged events.

  • Open Log - opens the log file in a text editor.

  • Restore Log - restores the error log entries from the log file.

You can right-click on a log entry to open the shortcut menu. The shortcut menu includes the same options as the toolbar. The following additional options are available on the shortcut menu:

  • Copy - copies the text for the selected log entry to the clipboard.

  • Event Details - opens the event details dialog with the details for the selected log entry.

1.4.12 Data Table View

The Data Table view is a spreadsheet-like data table for Functional testing scripts. The Data Table content can be changed by manually inputting data into cells or by importing an Excel file before playback. The Data Table content can be changed at runtime using the datatable API or using the user interface when playback is paused by a breakpoint, paused by exception, or paused by clicking the Pause toolbar button. Changes to the Data Table are saved as part of script playback results only. The Data Table and Result Data Table can be exported to an Excel file. See Section 4.3, "Using Data Tables" for additional information.

The following toolbar buttons are available in the Data Table view:

  • Import - opens a dialog for selecting an Excel spreadsheet file to import into the Data Table.

  • Export - opens a dialog for specifying where to save the Data Table as an Excel spreadsheet.

You can right-click on a data table cell to open the shortcut Edit menu. The following additional options are available on the shortcut menu:

  • Edit - changes the selected cell to text edit mode. Type data into the cell and press Enter.

  • Cut - cuts the data from the selected cell.

  • Copy - copies the text for the selected cell to the clipboard.

  • Paste - pastes text from the clipboard to the selected cell.

  • Delete - deletes the text from the selected cell.

  • Insert Row Before - inserts a new row into the table before the selected row.

  • Insert Row After - inserts a new row into the table after the selected row.

  • Delete Row - deletes the selected row from the table.

  • Use First Row as Column Header - sets the policy for how the first row of data in each Data Table sheet is used. When selected, the first row of data in the sheet is used as the column header value. When not selected, the first row of data is not used as the column header. The first row policy should be set before any data is manipulated within a Data Table sheet. See Section 4.3.2, "Setting the First Row Policy" for additional information.

  • Insert Column Before - inserts a new column into the table before the selected column.

  • Insert Column After - inserts a new column into the table after the selected column.

  • Rename Column - opens a dialog box for specifying a new heading name for the selected column.

  • Delete Column - deletes the selected column from the table.

You can right-click on a worksheet tab in the Data Table view to open the worksheet shortcut menu. The following additional options are available on the shortcut menu:

  • Insert Sheet Before - inserts a worksheet tab into the Data Table before the selected worksheet tab.

  • Insert Sheet After - inserts a worksheet tab into the Data Table after the selected worksheet tab.

  • Rename Sheet - opens a dialog box for specifying a new name for the selected worksheet tab.

  • Delete Sheet - deletes the selected worksheet from the Data Table. A confirmation dialog box appears to confirm the deletion.

1.4.13 Object Details View

The Object Details view provides options for viewing the attributes and values for the object selected in the browser connected to the view. The Object Details view is available for Functional tests. See Section 5.4.14, "Using the Object Details View" for additional information about using the Object Details view.

The following toolbar buttons are available in the Object Details view:

  • Refresh Tree - refreshes the Object Details tree pane.

  • Find a node to inspect by selecting in browser - starts the capture mode for selecting the Web page object in the browser. Highlight the object in the browser and press F10 to select it and show the attributes in the Object Details View.

  • Connect to browser/Disconnect from browser - connects or disconnects the Object Details View to the browser. The Object Details View must be connected to the browser to capture objects.

The following options are available in the Object Details view:

  • Module - selects the type of OpenScript module. The opjects in the tree view change to the specific module type. For example, the Web module shows the HTML DOM tree. The ADF module shows the ADF object tree.

  • Find - provides search capabilities to locate specific text in the Object Details. Type the text to find and click Next or Previous to locate the attributes and values within the tree.

  • Partial Match - when selected the Next or Previous search will match partial text strings specified in Find. When cleared, the Next or Previous search will match the entire Find string.

  • Next - searches down the tree for the next object that matches the Find string.

  • Previous - searches up the tree for the previous object that matches the Find string.

  • Tree pane - shows a tree view of the Document Object Model (DOM). The right-click shortcut menu includes the following options for working with the object selected in the tree:

    • View Object Path - opens a dialog box showing the full path of the object.

    • Add Object Test - opens the Object Test dialog for defining an object test for the object selected in the tree.

    • Add Table Test - opens the Table test dialog box for defining a table test for the table object selected in the tree. This option is only available for table objects.

    • Save to Object Library - opens the Save to Object Library dialog box for saving the object path to an object library.

  • Attribute - shows the attribute name of the object selected in the DOM tree.

  • Value - shows the value of the object attribute selected in the DOM tree.

1.4.14 Script Variables View

The Script Variables view shows the name value of script variables. The script variables are only shown when a running script is paused during playback. To view the script variable values select Script Variables from the View menu, playback the script and click the pause button on the toolbar.

1.4.15 Treeview Breakpoint View

The Treeview Breakpoint view shows the location of breakpoints set in the script tree view. To add a breakpoint to the script tree view, right-click on a script tree node and select Add Breakpoint from the shortcut menu. The Treeview Breakpoint view shows the node, file name, and line number of the breakpoint.

1.4.16 Navigator and Package Explorer Views

The Navigator and Package Explorer view shows the Java resources for the script and Java package. Double-click on a resource to open it in an editor view. See the Package Explorer View topics in the reference section of the Java development user guide online help for additional information about Package Explorer toolbar options.

1.4.17 Debug View

The Debug view provides options for debugging script playback. See the Debug View topics in the reference section of the Java development user guide online help for additional information about debugging toolbar options.

1.4.18 Declaration View

The Declaration view shows the source of the element selected in the Java code view. You can open the Java code view of a script and select a script method to view the declaration.

1.4.19 Variables and Breakpoints Views

The Variables and Breakpoints view shows variable values and breakpoints for debugging script playback. See the Breakpoints and Variables View topics in the reference section of the Java development user guide online help for additional information about breakpoints and variables toolbar options.

1.5 About Multi-User Execution

The Multi-User Execution feature lets multiple users run OpenScript from a single installation using multiple concurrent interactive desktop sessions (for example, Terminal Server or Remote Desktop sessions). All users must have Administrator privileges.

Users must login as a different, unique user accounts for each instance of OpenScript they want to run. One installation serves all user accounts on the machine. Users manage their settings and private data in their own workspaces. Any user who opens OpenScript creates a workspace under their "User Profile Folder", for example, C:\Documents and Settings\username\osworkspace. All of the user's OpenScript Settings and private data are stored under this workspace, including the user's Http Trust Stores (ostruststore).

If more than one user attempts to open the same the script in the same workspace, the second or subsequent users will receive a message indicating the script is in use and locked. The second or subsequent users can make a copy of the script and files in use.

Note:

Teams should enable Write access on their root Repository folders for all users and encourage teams to store their databanks and object library files in the Repository. This way, by default all newly created scripts, databanks, and object library files inherit the permissions of the Repository folder and be "Writeable" by all users.

Only load-test scripts can be played in the same desktop session. There no script type limitations for playback in different desktop sessions.

You configure the port range to use for each user in the OpenScript General Preferences. The ports within the configured port range are checked and if none are available, an error message will appear.

1.6 About Script Assets

Script assets are resources that can be used by scripts such as, databanks, generic Jar files, object libraries, or other scripts containing recorded steps or custom functions. Assets have the following characteristics:

  • They are external resources that a script can use or run.

  • They are resources that are not part of a script like the java code itself.

  • They are resources that can be shared among a team of users.

  • They are resources that can be added or removed from one or more scripts.

Note:

Any scripts you plan to run, along with any associated assets, in the Oracle Load Testing application must be stored in a repository/workspace that can be accessed by the Oracle Load Testing Controller. If you create new repositories in OpenScript, you should also add the new repositories in Oracle Load Testing.

Script assets can be used for testing projects that include multiple users executing a suite of tests or any QA team that uses a complex structure of scripts and assets developed and used by different people.

Script assets provide for the following:

  • Creating, editing and obtaining (discovering and assigning) assets independently from scripts.

  • Assigning or removing assets from the script using the script properties GUI.

  • Viewing all assets associated with a script, and all dependent assets using the script properties GUI.

  • Viewing and editing asset properties (alias, location, etc.) from the script properties GUI.

  • Creating self-contained script .zip files that include all assets referenced by a script and its assets. Self-contained .zip files can be used as a script export file for Customer support or script execution on computers other than the computer where script was created.

  • Importing self-contained script .zip files and running them without having to manually resolve file locations of assets.

  • Running self-contained .zip files from the Command line or Oracle Load Testing.

  • Notification of missing assets before a script run starts.

  • Storing scripts inside subfolders X levels deep in a workspace.

  • Loading object libraries and/or databanks into a script without concern about modifying the behavior of a parent script because of conflicting object libraries and/or databanks.

  • Understanding the order in which assets are loaded to know which object in which library has precedence.