7 Using the Oracle EBS/Forms Functional Test Module

This chapter provides instructions on configuring and using the OpenScript Oracle EBS/Forms Functional Test Module, which provides support for functional testing of Oracle EBS/Forms web applications.

7.1 About the Oracle EBS/Forms Functional Test Module

The Oracle EBS/Forms Functional Test Module provides support for functional testing of Oracle EBS/Forms web applications. The Oracle EBS/Forms Functional Test Module is an extension to the Web Functional Test Module.

The Oracle EBS/Forms Functional Test Module is an extension module to the OpenScript Web Functional Test Module that extends the Web testing with Oracle EBS/Forms Functional Test recording and playback capabilities. The Oracle EBS/Forms Functional Test Module is fully integrated with the OpenScript platform including the Results view, Details view, Properties view, Console/Problems views, Preferences, Step Groups, Script Manager, and Workspace Manager.

The Oracle EBS/Forms Functional Test recorder displays commands in the Tree View in easy-to-understand commands. By default, script commands are grouped into Steps Groups by the Web page on which they were performed. Each Step Group contains one or more script commands corresponding to recorded actions that were performed on the page. The default name for the Step Group is the Web page Title (as specified in the "Title" tag).

OpenScript shows the results of Oracle EBS/Forms Functional Test script playback in the Results view. The Results view shows results for each script command (including duration and summary for failures). The Results Report compiles the same information into an HTML Results Report. Results can be exported from the OpenScript GUI in standard format (CSV / HTML). Results are also generated for unattended playback through the command line.

The Oracle EBS/Forms Functional Test Module API includes a "forms" class that provides additional programming functionality.

7.1.1 Key Features of the Oracle EBS/Forms Functional Test Module

  • Supports Oracle E-Business Suite Release 12 (Forms 10g) running on Sun JRE and E-Business Suite Release 11i (Forms 6i) running on Jinitiator.

  • Records Forms actions in the applet.

  • Plays back recorded Forms actions/commands which consist of an event plus object identified by its attributes (for example: forms.textField(28, "//forms:textField[(@name='DIST_LIST_NAME_0')]").input("LOREM IPSUM")).

  • Provides full script code view integration to support script generation for the Oracle EBS/Forms Functional Test Module. The Oracle EBS/Forms Functional Test Module includes an additional API to support Oracle EBS/Forms Functional Test protocol code scripting.

  • Allows users to parameterize user inputs to Oracle EBS/Forms Functional Test scripts and drive those inputs from an external data file (Databank).

  • Allows users to insert Tests to validate Oracle EBS/Forms content on playback.

  • Provides additional automation of all Oracle EBS/Forms GUI components using options/settings that are specific to Oracle EBS/Forms Functional Test scripts within the Oracle EBS/Forms Functional Test categories in the preferences interface.

  • Reports playback results for Oracle EBS/Forms Functional Test scripts in the Results and Console views.

  • The Oracle EBS/Forms Functional Test Script Module API. The Oracle EBS/Forms Functional Test Application Programming Interface include Java code methods specific to functional testing of Oracle EBS/Forms applications.

The New Project wizard (Select New from the File menu) includes an "Oracle EBS/Forms " option in the Functional Test group to use when creating Oracle EBS/Forms functional testing projects in OpenScript. The Oracle EBS/Forms Functional Test Script Module records Oracle EBS/Forms applications using Object Identification. OpenScript captures user actions and records them to the OpenScript script nodes in a highly readable sequence of navigations and actions.

7.1.2 Prerequisites

The Oracle EBS/Forms Functional Test Module recorder has the following prerequisites:

  • Before recording any script in Forms Functional Test Module, you must run the Forms/EBS application at least once before attempting to record a script with OpenScript on that machine. This ensures that required JRE/Jinitiator has been installed and also verifies that forms applications can run successfully on that machine inside of Internet Explorer.

7.2 Recording Oracle EBS/Forms Functional Tests

The Oracle EBS/Forms Functional Test Module records standard Oracle EBS/Forms components for Oracle E-Business Suite Release 12 (Forms 10g) running on Sun JRE and E-Business Suite Release 11i (Forms 6i). The Recorder creates functional and regression test scripts for automating testing of Oracle EBS/Forms applications.

Oracle EBS/Forms are applet based controls and the Oracle EBS/Forms Functional Test Module provides the object/attribute information for OpenScript to record interactions with those controls. Actions will be captured in the test script as OpenScript "forms" commands. Other components are standard Web controls which are captured as standard OpenScript "web" commands using Web Functional Test object attributes. Object Identification attributes can later be modified by users through the Preferences global settings for new scripts or for already recorded commands in the tree view or code view. Recording can be configured through Internet Explorer only as the Oracle EBS/Forms Functional Test Module does not support Firefox.

The Oracle EBS/Forms Functional Test Module provides a record toolbar button that lets you initiate the Oracle EBS/Forms recorder and capture Web/Oracle EBS/Forms page actions to the script view. The record toolbar includes start and stop recording toolbar buttons. OpenScript recorders also open a floating toolbar that can be used while recording without having to switch between the browser and OpenScript.

7.2.1 Setting Oracle EBS/Forms Functional Test Record Preferences

To set Oracle EBS/Forms Functional Test record preferences:

  1. Start OpenScript.

  2. Select OpenScript Preferences from the View menu.

  3. Expand the OpenScript node and the Record category.

  4. Select Oracle EBS/Forms Functional.

  5. Click the tabs and set the preferences. See Section 2.5.4, "Oracle EBS/Forms Functional Test Preferences" for descriptions of the Record Preferences settings.

  6. Click OK.

7.2.2 Adding/Editing Object Identifiers

The Oracle EBS/Forms Functional Test Module uses object identification to specify attributes used to identify Oracle EBS/Forms objects. The Oracle EBS/Forms Functional Test Module uses the same predefined path attributes for common Web objects as the Web Functional Test Module; however, Oracle EBS/Forms Test Automation provides additional attributes to identify forms controls. Object paths are specified in XPath format. For example the object identification path appears as follows in Java code commands:

//forms:textField[(@name='DIST_LIST_NAME_0')]

You can set the default Web object attributes in the Oracle EBS/Forms Functional Test Module Record Preferences. You can also edit object attributes in recorded scripts in the tree view or the code view.

In addition to the predefined object identification, you can add an Object Library to the script to record paths into a library file. Object Library files may be shared and reused across other scripts. The Object Library files provide a more convenient "short name" for objects to provide for more convenient programming.

The Oracle EBS/Forms Functional Test Module includes object identifiers that specify how the recorder identifies Browser objects. You can add object identifiers or edit the existing object identifiers in the Record preferences.

To add or edit an object identifier:

  1. Select the OpenScript Preferences from the View menu.

  2. Expand the Record node and select Forms Functional Test.

  3. Click the Object Identification tab. This tab lets you specify the Oracle EBS/Forms object identification attributes, as follows:

    Active Profile: Specifies which object identification profile to use as the active profile. Profiles define a specific set of object identifiers to use when recording EBS/Forms functional tests. Use the Add Profile option to create a new custom profile.

    Name: Shows the name(s) of the defined Oracle EBS/Forms object identifiers.

    Attributes: Shows the pattern(s) specified for the defined Oracle EBS/Forms object identifiers.

    Add Profile: Opens a dialog box for specifying a new Oracle EBS/Forms object identifier profile.

    Add Object: Opens a dialog box for specifying a new Oracle EBS/Forms object identifier.

    Edit: Opens a dialog box for editing the selected Oracle EBS/Forms object identifier.

    Delete: Deletes the selected Oracle Forms object identifier.

    Export: Opens a dialog box for exporting the currently selected Forms object identifier profile to an XML file.

    Import: Opens a dialog box for importing a saved object identifier profile XML file.

    Revert: Reverts the default EBS/Forms object identification profile to the default profile. Any change to the default profile are removed.

    For each object element, you specify a name (typically an Oracle Forms object attribute), an operator, a value and a value type. As you add object elements, OpenScript builds the object identifier using logical OR between each object identifier element. Click Edit to change between logical OR and AND.

  4. Click Add or select an existing object identifier and click Edit.

  5. If adding a new object identifier, enter a name for the object identifier.

  6. Add or edit object elements for the object identifier.

    See the Web Functional Test Module for additional information about adding and editing Object Identifiers.

  7. Click OK. The object identifier is added to the record preferences.

7.2.3 Recording Oracle EBS/Forms Functional Test Scripts

To record Oracle EBS/Forms Functional Test scripts:

  1. Start OpenScript.

  2. Set the Oracle EBS/Forms Functional Test Recording preferences.

  3. Select New from the File menu.

  4. Expand the Functional Testing group.

  5. Select Oracle EBS/Forms (The Oracle EBS/Forms script combines both Web and Oracle EBS/Forms technologies as part of the same script).

  6. Click Next.

  7. Select the Repository and Workspace.

  8. Enter a script name.

  9. Click Finish. A new Script tree is created in the Script View.

  10. Select Record from the Script menu. The browser automatically opens when you start recording.

  11. Load the web page where you want to start recording into the browser.

  12. Navigate the web site to record page objects, actions, and navigations. The page objects, actions, and navigations will be added to the node of the script tree specified by the Set Record Section setting (the Run node is the default).

  13. When finished navigating pages, close the browser.

  14. Select Stop from the Script menu or click the Stop button on the OpenScript toolbar.

  15. Expand the Run node of the script to view the page objects, actions, and navigation nodes in the script tree.

    You can customize the script using the menu options or the Code View for specific testing requirements.

    Note:

    Do not close the script editor view or script project while recording or playing back scripts. Doing so could result in unpredictable behavior in the OpenScript application.

7.3 Playing Back Scripts

OpenScript plays back recorded Oracle EBS/Forms actions/commands which consist of an event plus an object identified by its attributes (for example: forms.textField(28, "//forms:textField[(@name='DIST_LIST_NAME_0')]").input("LOREM IPSUM")). The actions used for playback will either be those that are recorded or specified manually in the Java Code view. Playback can be configured through IE only as the Oracle EBS/Forms Functional Test Module does not support Firefox. Unattended playback is supported through Oracle Test Manager or third-party tools using OpenScript's command line interface. Oracle EBS/Forms Functional Test scripts do not play in Oracle Load Testing.

The Oracle EBS/Forms Functional Test Module provides playback and iterate toolbar buttons that allows users to start the script playback for either a single playback through the script or multiple iterations using data from a databank file. Playback results for Oracle EBS/Forms Functional scripts can be viewed in the Results and Console views.

7.3.1 Setting Oracle EBS/Forms Functional Test Playback Preferences

To set Oracle EBS/Forms Functional Test Playback preferences:

  1. Start OpenScript.

  2. Select OpenScript Preferences from the View menu.

  3. Expand the OpenScript node and the Playback category.

  4. Select Oracle EBS/Forms Functional Test.

  5. Expand the groups and set the preference. See Section 2.4.6, "Oracle EBS/Forms Functional Test Preferences" for descriptions of the Playback Preferences settings.

  6. Click OK.

7.3.2 Playing Back Oracle EBS/Forms Functional Scripts

To play back Oracle EBS/Forms Functional scripts:

  1. Start OpenScript.

  2. Open the Oracle EBS/Forms Functional script to play back.

  3. Select Playback from the Script menu or click the toolbar button.

    You can view the progress of the script playback in the Console View. You can review the results of script playback in the Results View.

7.3.3 Playing Back Oracle EBS/Forms Functional Scripts with Iterations

To play back Oracle EBS/Forms Functional scripts with iterations:

  1. Start OpenScript.

  2. Open the Oracle EBS/Forms Functional script to play back.

  3. Select Iterate from the Script menu or click the toolbar button.

  4. Select Use Databanks.

  5. Select which databank file to specify the settings for if more than one database is configured for the script.

  6. Specify the settings for the databank file.

  7. Select the Run no more than [ ] iterations option and set the iteration count to the desired number of playback iterations. See Section 4.2.4, "Playing Back Scripts With Iterations" for additional information about iteration settings.

  8. Click OK.

    You can view the progress of the script playback in the Console View. You can review the results of script playback in the Results View.

7.4 Modifying Scripts

Once a script has been created/recorded, you can make modifications to customize the script for your specific testing needs.

7.4.1 Adding Forms Actions

The Oracle EBS/Forms Module includes actions for Oracle EBS/Forms objects that can be added to a script.

To add Forms actions to a script:

  1. Record a EBS/Forms Functional Test script.

  2. Select the script node where you want to add the action.

  3. Select the Script menu and then select Other from the Add sub menu.

  4. Expand the Forms Action node.

  5. Expand an action node and select the action.

  6. Click OK.

  7. Enter the object identification path for the object. You can use the Capture or Select menu options to capture or select an object path.

  8. Enter any required values to use for the object action.

  9. Click OK. The action node is added to the script tree.

    In the Java Code view, a forms.object(objectId).action() method will be added to the script code:

    forms.textField(27, "//forms:textField[(@name='DIST_LIST_APPLICATION_0')]").openDialog();
    

    The Forms Action node includes actions for objects such as BlockScroller, Button, Calendar, CheckBox, ChoiceBox, EditBox, EditorDialog, FlexWindow, HelpDialog, InfoBox, List, ListOfValues, Notification, Calculator, RadioGroup, ResponseBox, SchedulingDataClient, SpreadTable, StatusBar, TabbedRegion, TextField, Tree, TreeList. Other object actions have corresponding Java code methods.

7.4.2 Using the Oracle EBS/Forms Functional Test Module API

The Oracle EBS/Forms Functional Test Module includes a script Application Programming Interface (API) specific to Oracle EBS/Forms functional testing. The Oracle EBS/Forms Functional Test Module recorder creates the Java code that corresponds to the Tree View and displays the Oracle EBS/Forms Functional Test commands in the Java Code view using easy-to-understand function names. The Java Code view commands correspond to the Tree View and you can edit your scripts in either view.

You can use the Oracle EBS/Forms Functional Test API to enhance recorded scripts with additional testing functionality. Commands that are specific to the Oracle EBS/Forms Functional Testing Module are part of the "forms" class. Additional functional test methods are available in the "web" and "ft" classes. You can also leverage other commands from other enabled classes (services) or general Java commands in your scripts.

Some examples of the Oracle EBS/Forms Testing Module API include:

  • Forms Action

  • Button

  • Calendar

  • Checkbox

  • Choice Box

  • Edit Box

  • Editor Dialog

  • Flex Window

  • Form Window

  • HelpDialog

  • Info Box

  • List

  • ListOfValues

  • Notification

  • RadioGroup

  • ResponseBox

  • SchedulingDataClient

  • SpreadTable

  • StatusBar

  • TabbedRegion

  • TextField

  • Tree

  • TreeList

Many API methods can be added using the Oracle EBS/Forms Functional Test Module Tree View. Additional methods can be added using the Java Code view. Use Ctrl-space in the Java Code view to open an Intellisense window listing available procedures. See the API Reference in the OpenScript help for additional programming information.