14 Using the JD Edwards Functional Test Module

This chapter provides instructions on configuring and using the OpenScript JD Edwards EnterpriseOne Functional Test Module, which provides support for testing of JD Edwards EnterpriseOne applications with Grid controls.

14.1 About the JD Ewards Functional Test Module

The JD Edwards Functional Test Module is an extension module to the OpenScript Web Functional Test Module that extends the Web testing with support for functional test record/playback of JD Edwards Enterprise One Grid controls.

14.1.1 Key Features of the JD Edwards EnterpriseOne Functional Test Module

  • The JD Edwards EnterpriseOne Functional Test Script Module. The New Project wizard (New from the File menu) includes an "Oracle JD Edwards EnterpriseOne" option in the Functional Test Group to use when creating JD Edwards EnterpriseOne functional testing projects in OpenScript.

  • JD Edwards EnterpriseOne Functional-Specific Application Programming Interface (API). The JD Edwards EnterpriseOne Functional Test Module includes an JD Edwards Functional Test Module API Specification that can be used to customize JD Edwards EnterpriseOne Functional test-specific scripts.

14.2 Recording JD Edwards EnterpriseOne Functional Tests

The Oracle JD Edwards EnterpriseOne Functional Test Module records standard JD Edwards EnterpriseOne-specific components for JD Edwards EnterpriseOne 9.0 and 9.1. Recording JD Edwards EnterpriseOne 9.0 is supported with Internet Explorer but is not supported with Firefox. Recording JD Edwards EnterpriseOne 9.1 is supported with Internet Explorer and Firefox. The Recorder creates functional test scripts for automating testing of JD Edwards EnterpriseOne web applications.

Oracle JD Edwards EnterpriseOne Grid components are object based controls and the Oracle JD Edwards EnterpriseOne Functional Test Module provides the object/attribute information for OpenScript to record interactions with the Grid control. Actions will be captured in the test script as OpenScript "eone" commands. Other components are standard Web controls which are captured as standard OpenScript "web" and "ft" navigation commands.

OpenScript plays back recorded JD Edwards EnterpriseOne actions/commands which consist of an event plus an object identified by its attributes (for example: eone.grid("/web:window[@index='0' or @title='Work With Leave Verification Rules']/web:document[@index='7' or @name='e1menuAppIframe']/web:EOneGrid[@gridId='0_1' or @gridName='Work With Leave Verification Rules']").selectRow(3);. The actions used for playback will either be those that are recorded or specified manually in the Java Code view. Unattended playback is supported through Oracle Test Manager or third-party tools using OpenScript's command line interface. Oracle JD Edwards EnterpriseOne Functional Test scripts do not play in Oracle Load Testing.

The Oracle JD Edwards EnterpriseOne Functional Test Module provides a record toolbar button that lets you initiate the JD Edwards EnterpriseOne recorder and capture Web/JD Edwards EnterpriseOne 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.

14.2.1 Setting JD Edwards EnterpriseOne Functional Test Preferences

To set JD Edwards EnterpriseOne Functional Test preferences:

  1. Start OpenScript.

  2. Open or record an OracleJD Edwards EnterpriseOne script.

  3. Select OpenScript Preferences from the View menu.

  4. Expand the OpenScript node and the Record category.

  5. Select JDE EnterpriseOne Functional.

  6. Click the tab and set the preferences. See Section 2.5.6, "Oracle JDE EnterpriseOne Functional Test Preferences" for descriptions of the Record Preferences settings.

  7. Click OK.

14.2.2 Adding/Editing Object Identifiers

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

"/web:EOneGrid[@gridId='0_1' or @gridName='Work With Leave Verification Rules']")

The full path to the control appears as follows:

eone.grid("/web:window[@index='0' " +
   "or @title='Work With Leave Verification Rules']" +
 "/web:document[@index='7' or @name='e1menuAppIframe']" +
 "/web:EOneGrid[@gridId='0_1' or @gridName='Work With Leave Verification Rules']")
 .selectRow(3);

You can set the default Web object attributes in the Oracle JD Edwards EnterpriseOne 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 JD Edwards EnterpriseOne 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 JDE EnterpriseOne Functional.

  3. Click the Object Identification tab. This tab lets you specify the JDE EnterpriseOne object identification attributes, as follows:

    Active Profile: Specifies which object identification profile to use as the active profile when recording scripts. Profiles define a specific set of object identifiers to use when recording JD Edwards EnterpriseOne functional tests. Use the Add Profile option to create a new custom profile. Once you have created a profile, select the profile name in the Name column and use Add Object to define custom objects and attributes in the custom profile.

    Name: Shows the name(s) of the defined JD Edwards EnterpriseOne object identifiers.

    Attributes: Shows the pattern(s) specified for the defined JD Edwards EnterpriseOne object identifiers.

    Add Profile: Opens a dialog box for specifying a new JD Edwards EnterpriseOne object identifier profile.

    Add Object: Opens a dialog box for specifying a new JD Edwards EnterpriseOne object identifier.

    Edit: Opens a dialog box for editing the selected JD Edwards EnterpriseOne object identifier.

    Delete: Deletes the selected JD Edwards EnterpriseOne object identifier or custom profile. The default profile cannot be deleted.

    Export: Opens a dialog box for exporting the currently selected JD Edwards EnterpriseOne 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 JD Edwards EnterpriseOne object identification profile to the default profile. Any changes to the default profile are removed. Select the default profile name in the Name column to activate the revert option.

    For each object element, you specify a name (typically an JD Edwards EnterpriseOne 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.

14.2.3 Recording JD Edwards EnterpriseOne Functional Test Scripts

To record JD Edwards EnterpriseOne Functional Test scripts:

  1. Start OpenScript.

  2. Select New from the File menu.

  3. Expand the Functional Testing group.

  4. Select Oracle JD Edwards EnterpriseOne (The JD Edwards EnterpriseOne script combines both Web and JD Edwards EnterpriseOne technologies as part of the same script).

  5. Click Next.

  6. Select the Repository and Workspace.

  7. Enter a script name.

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

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

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

  11. 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).

  12. When finished navigating pages, close the browser.

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

  14. 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.

14.3 Playing Back Scripts

OpenScript plays back recordedJD Edwards EnterpriseOne actions/commands which consist of an object identified by its attributes. The actions used for playback will either be those that are recorded or specified manually in the Java Code view.

The JD Edwards EnterpriseOne Functional Test Module uses the OpenScript playback and iterate toolbar buttons which 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 JD Edwards Enterprise One functional test scripts can be viewed in the Results and Console views.

14.3.1 Playing Back JD Edwards EnterpriseOne Functional Scripts

To play back JD Edwards EnterpriseOne Functional scripts:

  1. Start OpenScript.

  2. Open the JD Edwards EnterpriseOne functional test 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.

14.3.2 Playing Back JD Edwards EnterpriseOne Functional Scripts with Iterations

To play back JD Edwards EnterpriseOne functional test scripts with iterations:

  1. Start OpenScript.

  2. Open the JD Edwards EnterpriseOne functional test 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.

14.4 Modifying Scripts

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

14.4.1 Capturing JD E EnterpriseOne Grid Control Attributes

The JD Edwards EnterpriseOne Module includes an option for capturing JD Edwards EnterpriseOne Grid contol objects that can be added to a script.

To capture a JD Edwards EnterpriseOne Grid control:

  1. Record a JD EdwardsEnterpriseOne Functional Test script.

  2. Click Inpect Path.

  3. When the browser starts, load the JD Edwards EnterpriseOne application and log in.

  4. Navigate to the grid control you want to capture.

  5. Mouse over the grid and Press F10 to capture the control's object idenfication attributes.

14.4.2 Adding JD Edwards EnterpriseOne Grid Control Actions

The JD EdwardsEnterpriseOne Module includes actions for JD Edwards EnterpriseOne Grid contol objects that can be added to a script.

To add JD Edwards EnterpriseOne actions to a script:

  1. Record a JD Edwards EnterpriseOne 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 EnterpriseOne Actions node.

  5. Expand the EOneGrid 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, an eone.object(objectId).action() method will be added to the script code:

    eone.grid("/web:window[@index='0' " +
       "or @title='Work With Leave Verification Rules']" +
     "/web:document[@index='7' or @name='e1menuAppIframe']" +
     "/web:EOneGrid[@gridId='0_1'" + 
       or @gridName='Work With Leave Verification Rules']")
     .selectRow(3);
    

    The EOneGrid Action node includes actions for objects such as clickAttachmentCell, clickCell, clickCellIcon, clickCellLink, collapseTreeNode, deselectAllRows, deselectRow, expandTreeNode, goNextPage, goNextRecordSection, goPreviousPage, goPreviousRecordSection, goToLastPage, launchCellVisualAssist, launchExportAssistant, launchImportAssistant, launchQBEVisualAssist, selectAllRows, selectComboboxCellByIndex, selectComboboxCellByText, selectRecordSection, selectRow, setCellTextFieldValue, setCellCheckBox, setFocusOnCell, setQBEValue, dragTo, waitFor.

14.4.3 Oracle JD Ewards EnterpriseOne Functional Test Module API

The Oracle JD Edwards EnterpriseOne Functional Test Module includes a script Application Programming Interface (API) specific to ADF functional testing. The Oracle JJD Edwards EnterpriseOne Functional Test Module recorder creates the Java code that corresponds to the Tree View and displays the Oracle JD Edwards EnterpriseOne 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 JD Edwards EnterpriseOne Functional Test API to enhance recorded scripts with additional testing functionality. Commands that are specific to the Oracle JD Edwards EnterpriseOne Functional Testing Module are part of the "eone" class. Additional test methods are available in the "web" or "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 JD Edwards EnterpriseOne Testing Module API include:

  • clickAttachmentCell

  • clickCell

  • clickCellIcon

  • clickCellLink

  • collapseTreeNode

  • deselectAllRows

  • deselectRow

  • expandTreeNode

  • goNextPage

  • goNextRecordSection

  • goPreviousPage

  • goPreviousRecordSection

  • goToLastPage

  • launchCellVisualAssist

  • launchExportAssistant

  • launchImportAssistant

  • launchQBEVisualAssist

  • selectAllRows

  • selectComboboxCellByIndex

  • selectComboboxCellByText

  • selectRecordSection

  • selectRow

  • setCellTextFieldValue

  • setCellCheckBox

  • setFocusOnCell

  • setQBEValue

  • dragTo

  • waitFor

Many API methods can be added using the Oracle JD Edwards EnterpriseOne Testing 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.