21 Using the Oracle Siebel OpenUI Functional Test Module

This chapter provides instructions on configuring and using the Oracle Siebel OpenUI Functional Test Module, which provides support for testing of Siebel OpenUI applications.

21.1 About the Siebel OpenUI Functional Test Module

The Oracle Siebel OpenUI 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 Oracle Siebel OpenUI applications.

21.1.1 Key Features of the Oracle Siebel OpenUI Functional Test Module

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

  • Oracle Siebel OpenUI Functional-Specific Application Programming Interface (API). The Siebel OpenUI Functional Test Module includes an Oracle Siebel OpenUI Functional Test Module API Specification that can be used to customize Siebel OpenUI Functional test-specific scripts. You can also use the Oracle Siebel OpenUI function library to customize scripts. See the Siebel OpenUI Function Library chapter in the OpenScript Programmer's Reference for information about the function library.

21.2 Recording Oracle Siebel OpenUI Functional Tests

The Oracle Siebel OpenUI Functional Test Module records standard Siebel OpenUI-specific components for Siebel OpenUI applications. The Recorder creates functional test scripts for automating testing of Siebel OpenUI web applications.

Actions will be captured in the test script as OpenScript "openui" commands. Other components are standard Web controls which are captured as standard OpenScript "web" and "ft" navigation commands.

OpenScript plays back recorded Siebel OpenUI actions/commands which consist of an event plus an object identified by its attributes (for example: openui.syncPage("/web:window[@index='0' or @title='Siebel Call Center']", 60L*1000);. 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.

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

21.2.1 Setting Oracle Siebel OpenUI Functional Test Preferences

To set Oracle Siebel OpenUI Functional Test preferences:

  1. Start OpenScript.

  2. Open or record an Oracle Siebel OpenUI script.

  3. Select OpenScript Preferences from the View menu.

  4. Expand the OpenScript node and the Record category.

  5. Select Oracle Siebel OpenUI Functional.

  6. Click the tab and set the preferences. See Section 2.5.10, "Oracle Siebel OpenUI Functional Test Preferences" for descriptions of the Record Preferences settings.

  7. Click OK.

21.2.2 Recording Oracle Siebel OpenUI Functional Test Scripts

To record Oracle Siebel OpenUI Functional Test scripts:

  1. Start OpenScript.

  2. Select New from the File menu.

  3. Expand the Functional Testing group.

  4. Select Oracle Siebel OpenUI (The Oracle Siebel OpenUI script combines both Web and Oracle Siebel OpenUI 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.

21.3 Playing Back Scripts

OpenScript plays back recorded Oracle Siebel OpenUI 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 Oracle Siebel OpenUI 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 Oracle Siebel OpenUI functional test scripts can be viewed in the Results and Console views.

21.3.1 Playing Back Oracle Siebel OpenUI Functional Scripts

To play back Oracle Siebel OpenUI Functional scripts:

  1. Start OpenScript.

  2. Open the Oracle Siebel OpenUI 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.

21.3.2 Playing Back Oracle Siebel OpenUI Functional Scripts with Iterations

To play back Oracle Siebel OpenUI functional test scripts with iterations:

  1. Start OpenScript.

  2. Open the Oracle Siebel OpenUI 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.

21.4 Modifying Scripts

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

21.4.1 Adding Oracle Siebel OpenUI Actions

The Oracle Siebel OpenUI Module scripts include web actions and syncPage actions for Oracle Siebel OpenUI applications recorded to a script..

To add Oracle Siebel OpenUI actions to a script:

  1. Record an Oracle Siebel OpenUI Functional Test script.

  2. Open the Java code view.

    In the Java Code view, an web.object(objectId).action() methods and the openui.syncPage method will be included in the script code::

    openui.syncPage("/web:window[@index='0' or @title='Siebel Call Center']", 60L*1000);
    
  3. Edit the Java code as needed.

21.4.2 Oracle Siebel OpenUI Functional Test Module API

The Oracle Siebel OpenUI Functional Test Module includes a script Application Programming Interface (API) specific to Siebel OpenUI functional testing. The Oracle Siebel OpenUI Functional Test Module recorder creates the Java code that corresponds to the Tree View and displays the Siebel OpenUI 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 Siebel OpenUI Functional Test API to enhance recorded scripts with additional testing functionality. Commands that are specific to the Siebel OpenUI Functional Testing Module are part of the "openui" 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 Siebel OpenUI Testing Module API include:

  • syncPage

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.