10 Using the Oracle Fusion/ADF Load Test Module

This chapter provides instructions on configuring and using the OpenScript Oracle Fusion/ADF Load Test Module, which provides support for load testing of Oracle Application Development Framework (ADF)-based applications.

10.1 About the Oracle Fusion/ADF Load Test Module

The Oracle Fusion/ADF Load Test Module provides support for load testing of Oracle Application Development Framework (ADF) applications. The Oracle Fusion/ADF Load Test Module is an extension to the HTTP Module. The Oracle Fusion/ADF Load 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 Fusion/ADF Load 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 ADF component name.

OpenScript shows the results of Oracle Fusion/ADF Load 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 Fusion/ADF Load Test Module API includes a "adfload" class that provides additional programming functionality.

10.1.1 Key Features of the Oracle Fusion/ADF Load Test Module

  • The Oracle Fusion/ADF Load Test Script Module. The New Project wizard (New from the File menu) includes an "Oracle Fusion/ADF" option in the Load Test Group to use when creating Oracle Fusion/ADF load testing projects in OpenScript. The Oracle Fusion/ADF Load Test Script Module records load scripts against ADF Faces applications (Oracle Application Development Framework 11g Release 1 (11.1.1)). OpenScript captures user actions and records them to the OpenScript script based upon HTTP requests and post data or query strings.

  • Correlation Library. The Oracle Fusion/ADF Load Test Module includes an Oracle ADF-specific library of correlation rules for parameterizing scripts that allows playback of standard ADF Faces applications without manual correlation.

  • ADF Load-Specific Application Programming Interface (API). The Oracle Fusion/ADF Load Test Module includes an ADF Load Test Module API Specification that can be used to customize ADF Load test-specific scripts.

10.2 Recording Oracle Fusion/ADF Load Tests

The Oracle Fusion/ADF Load Test Module records standard ADF components for Oracle Application Development Framework 11g Release 1 (11.1.1). The Recorder creates load test scripts for automating testing of Oracle Fusion/ADF applications.

ADF components are applet based controls and the Oracle Fusion/ADF Load 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 "adfload" commands. Other components are standard Web controls which are captured as standard OpenScript "http" navigation commands. Correlation rules can be modified by users through the Preferences settings for new scripts.

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

10.2.1 Recording Oracle Fusion/ADF Load Test Scripts

To record ADF Load Test scripts:

  1. Start OpenScript.

  2. Set the Oracle Fusion/ADF Load Test Correlation preferences.

  3. Select New from the File menu.

  4. Expand the Load Testing group.

  5. Select ADF (The Oracle Fusion/ADF script combines both HTTP and ADF 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.

10.3 Playing Back Scripts

OpenScript plays back recorded ADF 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. Unattended playback is supported through Oracle Test Manager or third-party tools using OpenScript's command line interface.

The Oracle Fusion/ADF Load 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 Fusion/ADF Load scripts can be viewed in the Results and Console views.

10.3.1 Playing Back Oracle Fusion/ADF Load Scripts

To play back Oracle Fusion/ADF Load scripts:

  1. Start OpenScript.

  2. Open the Oracle Fusion/ADF Load 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.

10.3.2 Playing Back Oracle Fusion/ADF Load Scripts with Iterations

To play back Oracle Fusion/ADF Load scripts with iterations:

  1. Start OpenScript.

  2. Open the Oracle Fusion/ADF Load 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.

10.4 Setting Oracle Fusion/ADF Load Test Correlation Preferences

To set Setting Oracle Fusion/ADF Load Test Correlation preferences:

  1. Start OpenScript.

  2. Select OpenScript Preferences from the View menu.

  3. Expand the OpenScript node and the Correlation category.

  4. Expand the ADF Load Test library.

  5. Select or clear the check boxes to enable or disable specific rules.

  6. Click the Add or Edit buttons to modify rules in the library.

  7. Click OK.

10.5 Oracle Fusion/ADF Load Test Correlation Library

The Oracle Fusion/ADF correlation library defines the correlation rules for ADF-based applications. The correlation rules specify the variable names and regular expressions to use to replace dynamic data in ADF applications and navigations. The default Oracle Fusion/ADF correlation library provided with the OpenScript Oracle Fusion/ADF Load Test Module includes the following correlation rules:

  • Correlate ADF Headers - Correlate Headers - this rule implements the default Correlate Headers correlation rules for ADF applications that use dynamic headers.

  • Substitute ADFViewState - Variable Substitution - this rule locates text in the HTML matching the Regular Expression pattern <input type="hidden" name="javax\.faces\.ViewState" value="(.+?)"> and replaces it with the variable name javax.faces.ViewState in all locations.

  • Substitute _afrLoop - Variable Substitution - this rule locates text in the HTML matching the Regular Expression pattern _afrLoop=(\d{10,16}) and replaces it with the variable name _afrLoop in all locations.

  • Substitute _afPfm - Variable Substitution - this rule locates text in the HTML matching the Regular Expression pattern _afPfm=(.+?)& and replaces it with the variable name _afPfm in all locations.

  • Substitute _rtrnId - Variable Substitution - this rule locates text in the HTML matching the Regular Expression pattern _rtrnId=(\d+) and replaces it with the variable name _rtrnId in all locations.

  • Substitute _adf.ctrl-state - Variable Substitution - this rule locates text in the HTML matching the Regular Expression pattern \?_adf\.ctrl-state=(.+?)"> and replaces it with the variable name _adf.ctrl-state in all locations.

  • Substitute ADFvDlg_adf.ctrl-state - Variable Substitution - this rule locates text in the HTML matching the Regular Expression pattern __ADFvDlg__\?_adf\.ctrl-state=(.+?)& and replaces it with the variable name ADFvDlg_adf.ctrl-state in all locations.

  • Substitute stateToken - Variable Substitution - this rule locates text in the HTML matching the Regular Expression pattern <&lt;input type="hidden" name="oracle\.adf\.faces\.STATE_TOKEN" value="(.+?)"> and replaces it with the variable name stateToken in the locations specified by oracle.adf.faces.STATE_TOKEN=((.+?))&.

  • Substitute AdfCompnent - Variable Substitution - this rule locates text in the HTML matching the Regular Expression pattern new AdfRich\w+\('(.+?)', and replaces it with the variable name AdfComponent in all locations.

  • ADF Web Correlation - DOM Correlation - this rule implements the default Web Document Object Model correlation rules for ADF applications.

10.6 Oracle Fusion/ADF Load Test Module API

The Oracle Fusion/ADF Load Test Module includes a script Application Programming Interface (API) specific to ADF load testing. The Oracle Fusion/ADF Load Test Module recorder creates the Java code that corresponds to the Tree View and displays the Oracle Fusion/ADF Load 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 Fusion/ADF Load Test API to enhance recorded scripts with additional testing functionality. Commands that are specific to the Oracle Fusion/ADF Load Testing Module are part of the "adfload" class. Additional test methods are available in the "http" class. You can also leverage other commands from other enabled classes (services) or general Java commands in your scripts.

Many API methods can be added using the Oracle Fusion/ADF 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.