Skip Headers
Oracle® Application Testing Suite Getting Started Guide
Version 9.01 for Microsoft Windows (32-Bit)

Part Number E15487-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

6 Oracle Load Testing for Web Applications Tutorial

This tutorial walks you through the main features of Oracle Load Testing for Web Applications. Oracle Load Testing for Web Applications is a separate product in the Oracle Application Testing Suite, which you may or may not have purchased. If you have the Oracle Load Testing for Web Applications version of the Oracle Application Testing Suite, you can follow the examples in this chapter to become familiar with the features and use of Oracle Load Testing for Web Applications.

The tutorial consists of the following examples:

The tutorial is designed to be followed sequentially from beginning to end and assumes you have completed the Oracle Open Script tutorial in Chapter 3 and the Oracle Functional Testing for Web Applications tutorial in Chapter 4. The examples in this tutorial refer to scripts recorded in the previous tutorials.

Example 1: Performing a Simple Load Test

This example shows how to use Oracle Load Testing for Web Applications to run virtual users to simulate load on a Web application. The example illustrates how to run a previously recorded Visual Script to simulate multiple users accessing a Web application.

Starting Oracle Load Testing for Web Applications and Specifying the Workspace

Note:

This section uses the default login credentials from the Oracle Application Testing Suite installation.

To start Oracle Load Testing for Web Applications:

  1. Select Programs from the Start menu and then select Oracle Load Testing for Web Applications from the Oracle Application Testing Suite menu.

  2. Enter Administrator as the user name.

  3. Enter the password specified during the Oracle Application Testing Suite installation process.

  4. Click Login. The main window appears, as follows:

    Figure 6-1 Oracle Load Testing for Web Applications Main Window

    Oracle Load Testing for Web Applications Main Window
    Description of "Figure 6-1 Oracle Load Testing for Web Applications Main Window"

  5. Select RSWDemo in the Workspace list.

Specifying a Scenario Profile

  1. Make sure the Build Scenario tab is displayed in Oracle Load Testing for Web Applications.

  2. Select tutor1 in the Select scripts list. These are the scripts that you record using Oracle OpenScript or Oracle Functional Testing for Web Applications. For Oracle OpenScript scripts, only load testing and general scripts appear in the list. Functional test scripts do not.

  3. Click the Add to scenario button to add tutor1 to the Configure Parameters list. You can also double-click the script name to add it to the Configure Parameters list.

    Figure 6-2 Configure Parameters Pane

    Configure Parameters pane
    Description of "Figure 6-2 Configure Parameters Pane"

    Oracle Load Testing for Web Applications automatically specifies a set of default virtual user attributes for the Scenario Profile in the Scenario tab. For this example, we'll use the default attributes.

  4. Click the Add to Autopilot button on the Build Scenario tab.

    Oracle Load Testing for Web Applications automatically opens the Set up Autopilot tab with the tutor1 Scenario Profile listed in Submitted Scenario Profiles list.

    Figure 6-3 Autopilot Window

    Autopilot window
    Description of "Figure 6-3 Autopilot Window"

Running the Scenario Profile Using Autopilot

  1. Select After each user plays [#] iteration option from the Stop the load test group of the Autopilot tab.

  2. Enter 5 in the After each user plays edit box.

  3. Select [#] users below Add per step in the Virtual User ramp up group.

  4. Enter 1 in the Add per step [#] users edit box.

  5. Select [#] seconds below After every in the Virtual User ramp up group.

  6. Enter 10 in the [#] seconds edit box.

  7. Click the Run Test button on the Autopilot tab or the toolbar.

  8. Select Yes when asked to record session data and click OK.

    Oracle Load Testing for Web Applications starts running the virtual users in the Virtual User Grid. Watch as the Autopilot starts running the tutor1 Visual Script as ten virtual users.

    Figure 6-4 Virtual User Status Grid Window

    Virtual User Status Grid window
    Description of "Figure 6-4 Virtual User Status Grid Window"

  9. Allow the virtual users to continue running until all of them indicate Finished in the Status column of the virtual user grid.

    Congratulations. You have just performed a simple load test on the Demo Web application. Oracle Load Testing for Web Applications performs the virtual user Web interaction in the background. You can monitor the virtual users in the grid as they are running. In the later examples of this tutorial, you'll see how to use Oracle Load Testing for Web Applications to view statistical and performance information, and how to view virtual user actions.

Example 2: Adding Data Sources

This example shows how to add data sources to the Oracle Load Testing for Web Applications ServerStats configuration to monitor server-side statistics, such as CPU usage, and available memory.

Oracle Load Testing for Web Applications ServerStats can monitor statistics from a variety of systems and server types. This tutorial adds counters from your local Windows 200x/XP system to demonstrate the features of Oracle Load Testing for Web Applications ServerStats. If you are not running the Oracle Application Testing Suite on a Windows 200x/XP machine, you should skip examples two and three and continue the tutorial with example 4.

To configure counters from a Windows 200x/XP data source, do the following:

  1. Select Configurations from the ServerStats menu. Oracle Load Testing for Web Applications opens the ServerStats Configurations window.

  2. Click New to add a new configuration.

    Figure 6-5 Add Configuration Dialog Box

    Add Configuration Dialog Box
    Description of "Figure 6-5 Add Configuration Dialog Box"

  3. Type Tutorial for the Name and the Description.

  4. Click Save. The Configuration window changes to include the Monitors configuration options.

  5. Click New in the Monitor pane to open the Add Monitor Step 1 window.

    Figure 6-6 Add Monitors Step 1 Dialog Box

    Add Monitors Step 1 Dialog Box
    Description of "Figure 6-6 Add Monitors Step 1 Dialog Box"

  6. Click the Plus icon next to Data Sources to expand the list of data sources.

    Figure 6-7 Add Monitors Step 1 with Data Sources Expanded

    Add Monitors Step 1 with Data Sources Expanded
    Description of "Figure 6-7 Add Monitors Step 1 with Data Sources Expanded"

  7. Select Perfmon (Windows Performance Monitor) and click Next.

    Figure 6-8 Add Monitors Step 2 Dialog Box

    Add Monitors Step 2 Dialog Box
    Description of "Figure 6-8 Add Monitors Step 2 Dialog Box"

    This step lets you specify which to monitor and which system to use for the data collector.

  8. Leave the default settings for Monitored System and Data Collector.

  9. Click Next to select the specific counters to monitor.

    Figure 6-9 Add Monitors Step 3 Dialog Box

    Add Monitors Step 3 Dialog Box
    Description of "Figure 6-9 Add Monitors Step 3 Dialog Box"

  10. Select Processor in the Performance object list.

    Figure 6-10 Add Monitors Step 3 with Processors Listed

    Add Monitors Step 3 with Processors Listed
    Description of "Figure 6-10 Add Monitors Step 3 with Processors Listed"

  11. Select % Processor Time in the Select counters from list group.

  12. Select the All instances option.

  13. Click Add. The counters are added to the Counters list.

    Figure 6-11 Add Monitors Step 3 with Processors Selected

    Add Monitors Step 3 with Processors Selected
    Description of "Figure 6-11 Add Monitors Step 3 with Processors Selected"

  14. Select Memory in the Performance object list.

  15. Select Available Kbytes and click Add.

    Figure 6-12 Add Monitors Step 3 with Processors and Memory Selected

    Add Monitors Step 3 with Processors and Memory Selected
    Description of "Figure 6-12 Add Monitors Step 3 with Processors and Memory Selected"

  16. Click Finish to complete adding monitors. ServerStats display a status while it verifies the counters (this may take a few moments).

    When the verification is complete, the Configuration window is updated with the list of monitors.

    Figure 6-13 Configurations Dialog Box with Defined Monitors

    Configurations Dialog Box with Defined Monitors
    Description of "Figure 6-13 Configurations Dialog Box with Defined Monitors"

  17. Click Test to test the counters.

    Figure 6-14 Test Monitors Dialog Box

    Test Monitors dialog box
    Description of "Figure 6-14 Test Monitors Dialog Box"

  18. Review the results to verify the counters are working properly.

  19. Click Close to exit the test results.

    The next example explains the procedures for editing existing ServerStats configurations.

Example 3: Editing Data Sources

This example shows how to edit existing Oracle Load Testing for Web Applications ServerStats configurations to modify specific counters. The steps in this example are based upon steps completed in the previous example.

  1. If not already open, select Configurations from the ServerStats menu to open the ServerStats Configurations window.

  2. Select the Tutorial configuration.

  3. Click the Memory (Available Kbytes) monitor and click Edit.

    Figure 6-15 Edit Monitor Dialog Box

    Edit Monitor dialog box
    Description of "Figure 6-15 Edit Monitor Dialog Box"

  4. Click Add next to Monitored System.

    Figure 6-16 Add Monitored System Dialog Box

    Add Monitored System dialog box
    Description of "Figure 6-16 Add Monitored System Dialog Box"

    If you have additional systems to monitor you can specify the information here to add the system to the ServerStats Configuration.

  5. Click Cancel.

  6. Change the Collection Interval to 45 seconds.

  7. Click OK.

  8. Click Close to close the ServerStats Configurations window.

See the Oracle Load Testing for Web Applications User's Guide for additional information about using the features and options of Oracle Load Testing for Web Applications ServerStats.

Example 4: Creating a Scenario with Multiple Profiles

This example shows how to create scenarios with multiple virtual user profiles and how to set the attributes for each scenario. It also shows how to specify the reporting options.

Adding a Virtual User Profile to the Scenario

  1. Click the Build Scenarios tab.

  2. Double-click tutor3 in the Default Profiles list to add it to the Configure parameters of the scenario list.

  3. Click the Configure all parameters button on the tutor3 line to display the Edit Scenario Details dialog box.

  4. Change the #VUs value to 3.

  5. Make sure the Virtual User Pacing is set to Recorded and the Maximum value is set to 1 second.

  6. Change the Caching Emulation to Repeat User.

  7. Change the User Mode to Thick Client.

  8. Make sure the Use Databanks field is True.

  9. Leave the default settings for remainder of the attributes and click OK.

  10. Click the Configure all parameters button on the tutor1 line to display the Edit Scenario Details dialog box.

  11. Change the # VUs value to 6.

  12. Make sure the Virtual User Pacing is set to Recorded and the Maximum value is set to 1 second and click OK.

    Notice that each profile in the Scenario Profiles list can have a different set of attributes.

Saving Data for Reporting

The data generated by a Oracle Load Testing for Web Applications Autopilot session can be saved to the Oracle Load Testing for Web Applications database for post-session analysis. The Session Start/Stop options let you specify if Oracle Load Testing for Web Applications should save the data.

  1. Select Options from the Tools menu and then select Session Start/Stop.

    Figure 6-17 Session Start/Stop Options Dialog Box

    Session Start/Stop Options dialog box
    Description of "Figure 6-17 Session Start/Stop Options Dialog Box"

  2. Set the Save data for reporting option to Yes.

  3. Select the Terminate all agents at end of session checkbox.

  4. Select Scenario Defaults.

    Figure 6-18 Scenario Defaults Options Dialog Box

    Scenario Defaults Options dialog box
    Description of "Figure 6-18 Scenario Defaults Options Dialog Box"

  5. Set View All Responses in the VU Display section to Always.

  6. Scroll down the screen and set Auto generate timers for all resources in the Reporting section to True.

  7. Click OK.

Saving the Scenario

  1. Select Save As from the Scenario menu.

  2. Leave the filename as LoadTest1 and click OK.

Example 5: Running Multiple Profiles

This example shows how to use Oracle Load Testing for Web Applications to run multiple Scenario profiles with different amounts of virtual users and how to view statistical and performance information.

Running the Scenario Profiles Using Autopilot

  1. Make sure the Scenario from the previous example is still shown in the Build Scenarios tab.

  2. Click the Add to Autopilot button on the Scenario tab or the toolbar.

  3. Oracle Load Testing for Web Applications automatically opens the Set Up Autopilot tab with the tutor1 and tutor3 Scenario Profiles listed in Submitted Scenario Profiles list.

    Figure 6-19 Set Up Autopilot Options

    Set Up Autopilot options
    Description of "Figure 6-19 Set Up Autopilot Options"

  4. Select When the stop button is pressed in the Stop the load test group of the Set Up Autopilot tab.

  5. Enter 3 in the edit box next to # users under Add per step in the Virtual User (VU) Ramp-up section.

  6. Enter 5 in the edit box next to # iterations under After every in the Virtual User (VU) Ramp-up section.

  7. In ServerStats Configuration section, select Tutorial from the Configuration drop down list to add the configuration to the load test.

  8. Click Save to save the Rampup Specification in the Scenario file.

  9. Click the Run test button on the Oracle Load Testing for Web Applications toolbar.

  10. Oracle Load Testing for Web Applications opens the Save Session data dialog box.

  11. Click Ok.

    The Save Session data dialog box appears because we used the Ask setting in the Session Start/Stop options (select Options from the Tools menu). You can bypass this dialog box and use automatic or default values when running virtual users under routine testing conditions by changing the Session Start/Stop options.

  12. Watch as the Autopilot starts running the tutor1 and tutor3 Visual Scripts as virtual users. Notice also that tutor3 is playing back records from the Data Bank.

    Figure 6-20 Virtual User Grid

    Virtual User Grid
    Description of "Figure 6-20 Virtual User Grid"

    Initially, the Autopilot starts only three virtual users. After the first three have completed five iterations, the Autopilot starts another three virtual users. Once the second three virtual users have completed five iterations, the remaining three virtual users start. The Virtual User (VU) Ramp-up options of the Autopilot let you control the rate at which virtual users start running.

Viewing Performance Statistics

Oracle Load Testing for Web Applications automatically displays run time graphs in the View Run Graphs tab. Scroll to the bottom of the window until you see the Performance Statistics icon.

Figure 6-21 View Run Graphs Tab

View Run Graphs tab
Description of "Figure 6-21 View Run Graphs Tab"

Click on the icon to view the Performance Statistics report. The Performance Statistics window shows a summary of the performance data for the running virtual users.

Figure 6-22 Performance Statistics Report

Performance Statistics Report
Description of "Figure 6-22 Performance Statistics Report"

The statistics show the values for the following performance categories:

<Session Name> Current

  • Active Virtual Users - the number of virtual users currently running in the Autopilot.

  • Virtual Users with Errors - the number of virtual users with errors.

  • Transactions Per Second - the number of times the virtual user played back the Visual Script per second.

  • Pages Per Second - the number of pages returned by the server per second. A "page" consists of all of the resources (i.e. page HTML, all images, and all frames) that make up a Web page.

  • Hits Per Second - the number of resource requests to the server per second. Each request for a page, individual images, and individual frames is counted as a "hit" by Oracle Load Testing for Web Applications. If Oracle Load Testing for Web Applications does not request images from the server (as specified in the Download Manager), images are not included in the hit count. The Hits Per Second and Pages Per Second counts will be the same if images are not requested and there are no frames in the page.

  • Kilobytes Per Second - the number of kilobytes transferred between the server and browser client per second.

<Session Name> Totals

  • Transactions - the total number of times the virtual user played back the virtual user profile.

  • Transactions with Errors - the total number of virtual user profile iterations that had errors.

  • Pages - the total number of number of pages returned by the server.

  • Hits - the total number of resource requests to the server.

  • Kilobytes - the total number of kilobytes transferred between the server and browser client.

Performance by Profile and Timer

  • <Profile Name> - the latest, minimum, maximum, and average performance for the virtual user profile in seconds.

  • <Timer Name> - the latest, minimum, maximum, and average performance for the server response timers in seconds. Server Response timers are added to Visual Scripts using Oracle Functional Testing for Web Applications.

Performance by Profile and VUs

  • <Profile Name> # VUs - shows the time it took to run the virtual user profile with the indicated number of virtual users running. When ramping up virtual users, Performance by Profile and VUs values are added when additional virtual users start running. Once additional Performance by Profile and VUs values are added, the previous Performance by Profile and VUs values are no longer updated. For example, the statistics show elapsed time values for each profile for three, six, and nine virtual users. The <profile name> 3 VUs values are updated only while three virtual users are running. Once the Autopilot ramps up to run six virtual users, the <profile name> 3 VUs values stop updating and the <profile name> 6 VUs values are added and are updated while six virtual users are running. Once the Autopilot ramps up to run nine virtual users, the <profile name> 6 VUs values stop updating and the <profile name> 9 VUs values are added and are updated while nine virtual users are running.

Viewing Graphs

  1. Click the Overview tab in the View Run Graphs tab.

    Oracle Load Testing for Web Applications provides several types of graphs that show performance, error, and statistical information for the running virtual users. Click on the graph in the Overview tab to view a larger image in the Default Graphs tab.

  2. Select the Performance Vs. Users in the View dropdown of the Default Graphs tab.

    Figure 6-23 Performance Vs. Users Report

    Performance Vs. Users report
    Description of "Figure 6-23 Performance Vs. Users Report"

    This graph shows the average run time for the number of running virtual users in each profile. The plot points represent the Autopilot rampup of virtual users. In the above graph, the first plot points for each profile shows the average run time while three virtual users were running. Once the Autopilot ramps up to run six virtual users, the plot points for three virtual users are no longer updated.

    The second plot points show the average run time while six virtual users were running. Once the Autopilot ramps up to run nine virtual users, the plot points six virtual users are no longer updated.

    The third plot points show the average run time while nine virtual users are running. In this example, nine virtual users is the total number of virtual users the Autopilot ramps up to run. The third plot points will be updated continuously while the nine virtual users are running.

  3. Select the Users Vs. Time in the View dropdown of the Default Graphs tab.

    Figure 6-24 Users Vs. Time Report

    Users Vs. Time report
    Description of "Figure 6-24 Users Vs. Time Report"

    This graph shows the relative time when the virtual users for each profile started running. The graph represents the Autopilot ramp up times and the number of virtual users ramped up for each profile.

  4. Select the Performance Vs. Time in the View dropdown of the Default Graphs tab.

    Figure 6-25 Performance Vs. Time Report

    Performance Vs. Time report
    Description of "Figure 6-25 Performance Vs. Time Report"

    This graph shows the average run time for the active virtual users running each profile over time.

  5. Select the Statistics Vs. Time in the View dropdown of the Default Graphs tab.

    Figure 6-26 Statistics Vs. Time Report

    Statistics Vs. Time report
    Description of "Figure 6-26 Statistics Vs. Time Report"

    This graph shows averages for virtual user hits, pages, transactions, and Kilobytes per second over time.

    The error graphs show percentages of errors vs. virtual users over time.

Example 6: Controlling Virtual Users

This example shows how to modify individual virtual user attributes, view actions, and stop and abort virtual users in Oracle Load Testing for Web Applications.

  1. Make sure the virtual users from Example 3 are still running.

Modifying the Run Attributes

  1. Click on any virtual user in the virtual user grid.

  2. Click the right mouse-button to open the popup menu.

    Figure 6-27 Virtual User Shortcut Menu

    Virtual User shortcut menu
    Description of "Figure 6-27 Virtual User Shortcut Menu"

  3. Select Modify Run Attributes. Oracle Load Testing for Web Applications opens a dialog box for changing the run attributes for the selected virtual user.

    Figure 6-28 Modify Run Attributes Dialog Box

    Modify Run Attributes dialog box
    Description of "Figure 6-28 Modify Run Attributes Dialog Box"

    You can change the attributes of each virtual user individually.

  4. Click Cancel to close the dialog box.

Viewing Virtual User Actions

  1. Select VU Display from the Tools menu or you can also use the right-click popup menu from the virtual user grid. Oracle Load Testing for Web Applications opens a browser window in which you can view the actions of the virtual user.

    Figure 6-29 Virtual User Display Window

    Virtual User Display window
    Description of "Figure 6-29 Virtual User Display Window"

  2. Click the Navigate to Previous Page toolbar button. The viewer shows only the previous page.

  3. Click the Navigate to Next Page toolbar button. The viewer shows only the next page.

  4. Click the Auto Mode toolbar button. The view shows new pages accessed by the virtual user as they arrive to the viewer.

  5. Click the Stop Accepting New Pages toolbar button. The viewer stops accepting pages from the virtual user.

    Note: Because of the speed at which new pages arrive in the viewer, it may take a few moments for cached pages to stop appearing.

  6. Close the window to exit the viewer.

Stopping an Individual Virtual User

  1. Click on any virtual user in the virtual user grid.

  2. Click the right mouse-button to open the popup menu.

  3. Select Stop. Oracle Load Testing for Web Applications stops running the selected virtual user. The virtual user will complete the current Visual Script iteration and then stop.

Aborting an Individual Virtual User

  1. Click on any virtual user in the virtual user grid.

  2. Click the right mouse-button to open the popup menu.

  3. Select Abort. Oracle Load Testing for Web Applications aborts running the selected virtual user without completing the current visual script iteration.

Stopping All Virtual Users

  1. Click the Stop toolbar button to stop all virtual users. The virtual users will complete the current visual script iteration and then stop.

Aborting All Virtual Users

  1. Click the Abort toolbar button to abort all virtual users. The virtual users will abort the virtual user without completing the current visual script iteration.

Example 7: Generating Reports

This example explains the automatic report generation features of Oracle Load Testing for Web Applications. The data collected by Oracle Load Testing for Web Applications and Oracle Load Testing for Web Applications ServerStats while the Autopilot is running virtual users is saved to a database when the Save Data for Reporting option in the Oracle Load Testing for Web Applications Session Start/Stop options is set to Yes or Ask. You can use Oracle Load Testing for Web Applications to analyze the data and generate a variety of graphs and reports.

Generating Reports from Oracle Load Testing for Web Applications

This example shows how to use previously saved data to create custom reports and to view Session and Scenario reports.

  1. Select the Create Reports tab.

  2. The Graph 1 tab is displayed with a blank graph. Select Session0001 from the Session list. The data categories appear in the Available Data Series list.

  3. Click Show All.

    Figure 6-30 Create Reports Tab Filters

    Create Reports tab filters
    Description of "Figure 6-30 Create Reports Tab Filters"

  4. Double-click Hits/Sec, kb Rcvd/Sec, Pages Rcvd/Sec, and Trans/sec at the top of the Available Data Series field to add the counters to the graph. These are the overall counters. You can also select them and click the Add Data Series button.

  5. Expand the ServerStats Monitors node then double-click the Oracle Load Testing for Web Applications Server (Processor, % Processor Time, 0) node to add it to the graph.

    Figure 6-31 Sample Session Report Graph

    Sample Session Report Graph
    Description of "Figure 6-31 Sample Session Report Graph"

    The legends show which color line represents which virtual user profile, Visual Script page, and Oracle Load Testing for Web Applications ServerStats counter. The legends for Oracle Load Testing for Web Applications data show the session, the virtual user profile, and the Visual Scripts page in the form session.profile.page[#]. The legends for ServerStats data show the session, counter object, counter instance and counter in the form session.object.instance.counter.

    You can export the data to an HTML file, a comma separated value file, or a Microsoft Excel Workbook file.

Opening the Chart in Microsoft Excel

Note: Skip this section if you do not have Microsoft Excel installed on your system.

  1. Click the Export to Excel button.

  2. The File Download dialog box is displayed. Click Save.

  3. The Save As dialog box is displayed. Select a location to save the report and click Save.

  4. The Download Complete dialog box is displayed. Click Open.

    Figure 6-32 Sample Excel Report Graph

    Sample Excel Report Graph
    Description of "Figure 6-32 Sample Excel Report Graph"

  5. The workbook contains a chart sheet and a worksheet. You can use the features and capabilities of Microsoft Excel to change the chart format.

  6. Click the Data Table tab to view the actual data values.

    Figure 6-33 Sample Excel Data Table Report

    Sample Excel Data Table Report
    Description of "Figure 6-33 Sample Excel Data Table Report"

  7. Row one contains the counter names. Subsequent rows contain the actual data values for the chart.

  8. Select Exit from the File menu to close Microsoft Excel.

Viewing Scenario and Session Reports

The report shows the current and total performance over time for the Oracle Load Testing for Web Applications scenario. The report also shows the Oracle Load Testing for Web Applications scenario settings used for the session.

  1. Oracle Load Testing for Web Applications also generates textual reports for Oracle Load Testing for Web Applications Scenario settings and Oracle Load Testing for Web Applications and Oracle Load Testing for Web Applications ServerStats session data.

  2. Select the Reports tab.

  3. Select the session for which you want to view the report from the Session dropdown list and click Generate. Oracle Load Testing for Web Applications displays the report.

    Figure 6-34 Sample Session Performance Report

    Session Performance report
    Description of "Figure 6-34 Sample Session Performance Report"

  4. Scroll to the end of the Session Performance Report to view the Oracle Load Testing for Web Applications Scenario Report.

  5. You can print the report by clicking the Print Friendly button and selecting Print from the File menu in the browser window.

Example 8: Creating User-Defined Profiles

This example explains how to create user-defined virtual user profiles in Oracle Load Testing for Web Applications.

  1. Select User Defined Profiles from the Manage menu. Oracle Load Testing for Web Applications opens a dialog for managing profiles.

  2. Click New.

    Figure 6-35 Edit User Defined Profiles Dialog Box

    Edit User Defined Profiles dialog box
    Description of "Figure 6-35 Edit User Defined Profiles Dialog Box"

  3. The dialog box shows the section tree, the available Visual Scripts, and the default synchronization points.

  4. Select the workspace where you want to save the profile and enter a name for the profile in the Name editbox.

  5. The profile sections tree allows you to specify which Visual Scripts and synchronization points to include in the Sections tree of the profile.

    Prolog - the Visual Scripts in this section play back only once at the beginning of the Scenario run. An example of what you may add to this section is a login script.

    Run - the Visual Scripts in this section iterate over as many times as is specified in the Autopilot. An example of what you may add in this section is the business transaction that you wish to load test.

    Epilog - the Visual Scripts in this section play back only once at the end of the Scenario run. An example of what you add to this section is a logoff script.

    Errors - the Visual Scripts in this section play back only if an error occurs during the Scenario run. An example of what you may add to this section is a visual script that resets your application on an error.

Adding Visual Scripts to the Sections Tree

  1. Select the section in the tree where you want to add a Visual Script.

  2. Double-click the Visual Script to add to the section or select the script and click the Add button.

    The Visual Script appears as a node of the tree.

    Figure 6-36 Script Added to Run Section of User Defined Profile

    Script Added to Run Section of User Defined Profile
    Description of "Figure 6-36 Script Added to Run Section of User Defined Profile"

  3. Repeat steps 4 and 5 to add additional Visual Scripts to the Sections tree.

Adding Synchronization Points to the Sections Tree

A sync point allows multiple virtual users to synchronize their actions and interactions with the application under test. Sync points provide the ability to create realistic multi-user situations that may expose resource conflicts such as deadlocks. When you specify a sync point, multiple virtual users executing the script will reach this sync point at various times depending on a number of factors (for example, the speed of the machine).

Sync points cause each virtual user to wait until all virtual users have reached that sync point. Each of the virtual users notifies the master upon reaching the sync point. The master waits for all of the virtual users to notify it and then issues the go-ahead for all the virtual users to continue past that sync point.

  1. Select the section in the tree where you want to add a Sync point and click Add Sync.

    The Sync point appears as a node of the tree.

    Figure 6-37 Sync Point Added to Run Section of User Defined Profile

    Sync Point Added to Run Section of User Defined Profile
    Description of "Figure 6-37 Sync Point Added to Run Section of User Defined Profile"

  2. Repeat steps 7 and 8 to add additional Sync points to the Sections tree.

Moving Items in the Sections Tree

When you have multiple items under any section of the tree, you can move the items up and down within that section.

  1. Select the item to move in a section.

  2. Click the up or down button as appropriate.

    Figure 6-38 Edit User Defined Profile Dialog Box

    User Defined Profile Dialog Box
    Description of "Figure 6-38 Edit User Defined Profile Dialog Box"

  3. Click the OK button when you finish defining the profile.

  4. The new profile appears in the Select scripts and user-defined profiles list of the Build Scenarios tab.

    Figure 6-39 Select Scripts and User-Defined Profiles Pane

    Select Scripts and User-Defined Profiles Pane
    Description of "Figure 6-39 Select Scripts and User-Defined Profiles Pane"

    You can include user-defined profiles as part of the Scenario Profiles the same way you use the default profiles.

Editing User-Defined Profiles

After you have created a user-defined virtual user profile, you can make changes to the profile at any time.

  1. Select User Defined Profiles from the Manage menu.

    Figure 6-40 User Defined Profile Manager Dialog Box

    User Defined Profile Manager Dialog Box
    Description of "Figure 6-40 User Defined Profile Manager Dialog Box"

  2. Select the profile you want to edit and click Edit. Oracle Load Testing for Web Applications opens a dialog for editing the sections tree of the profile. The dialog box shows the current sections tree, the available Visual Scripts, and the default synchronization points.

    Figure 6-41 Edit User Defined Profile Dialog Box

    Edit User Defined Profile Dialog Box
    Description of "Figure 6-41 Edit User Defined Profile Dialog Box"

  3. Click the Plus icon to expand the nodes of the tree.

  4. Use the arrow buttons as necessary to add items to the sections of the tree. Select an item and click Delete to remove it from the sections tree.

  5. Click the OK button when you finish editing the profile.

  6. Select Exit to close Oracle Load Testing for Web Applications.

  7. Click No if asked to save the scenario.

This completes the Oracle Load Testing for Web Applications tutorial. See the Oracle Load Testing for Web Applications User's Guide for additional information about load testing and using Oracle Load Testing for Web Applications.