Go to primary content
Oracle® Application Testing Suite Getting Started Guide
Release 13.3.0.1
E15487-20
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
 

4 Oracle Load Testing Tutorial

This tutorial walks you through the main features of Oracle Load Testing. Oracle Load Testing 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 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.

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 OpenScript tutorial in Chapter 3. The examples in this tutorial refer to scripts recorded in the previous tutorials.

4.1 Example 1: Performing a Simple Load Test

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

4.1.1 Starting Oracle Load Testing


Note:

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

To start Oracle Load Testing:

  1. Select Programs from the Start menu and then select Oracle Load Testing from the Oracle Application Testing Suite Start 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 4-1 Oracle Load Testing Main Window

    Description of Figure 4-1 follows
    Description of ''Figure 4-1 Oracle Load Testing Main Window''

  5. Select Default in the Available Scripts list.

4.1.2 Specifying a Scenario Profile

  1. Make sure the Composer tab is displayed in Oracle Load Testing showing the Profile section.

  2. Select HTTPTutor1 in the Available scripts list. These are the scripts that you record using Oracle OpenScript.

  3. Click the Add button to add HTTPTutor1 to the Profile list. You can also drag the script name to add it to the Profile list.

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

4.1.3 Running the Scenario Profile

  1. Click the Ramp button on the Composer tab.

  2. Select users next to Add in the Ramp Rate pane.

  3. Enter 1 in the Add [#] users edit box.

  4. Select [#] seconds below Every in the Ramp Rate pane.

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

  6. Select Run for specified iterations option in the Stop Condition group of the Ramp section.

  7. Enter 5 in the Run for specified iterations edit box.

  8. Click the Run Now button on the toolbar.

  9. Click OK to save the session using the default session name.

    Oracle Load Testing starts running the virtual users in the Active Session. Watch as the session starts running the HTTPTutor1 script as ten virtual users in the Session Overview sub-tab.

  10. Click the Virtual User Status sub-tab in the Active Session tab.

    Figure 4-3 Virtual User Status Grid Window

    Description of Figure 4-3 follows
    Description of ''Figure 4-3 Virtual User Status Grid Window''

  11. 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 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 to view statistical and performance information, and how to view virtual user actions.

4.2 Example 2: Setting Test Goals

The Goals section of the Composer tab lets you set test goals that specify conditions for specific counter and script parameters. You can specify one or more goals and set the results based upon to test reaching any one of the goals or all of the goals.

To use test goals:

  1. Click the Goals section of the Composer tab.

  2. Set the stop ramping VUs when option.

  3. Click Add Goal.

    Figure 4-4 Goals Section with a New Goal Added

    Description of Figure 4-4 follows
    Description of ''Figure 4-4 Goals Section with a New Goal Added''

  4. For each goal, set the following for each condition:

    • The Goal is met when condition: any condition or all conditions.

    • Select the counter to use to measure the goal criteria.

    • Specify the condition to use to compare: selected counter value is greater than, less than, equal to, or does not equal.

    • Counter goal value to use as the goal target.

    For each goal you can specify one or more conditions. Click Add Condition to specify more than one condition to a goal. Click Add Goal to add more than one goal for the scenario.

    Figure 4-5 Goals Section with Multiple Goals and Conditions

    Description of Figure 4-5 follows
    Description of ''Figure 4-5 Goals Section with Multiple Goals and Conditions''

4.3 Example 3: Adding Data Sources

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

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

To configure counters from a Windows data source, do the following:

  1. Click the Composer tab and click the Monitoring section.

  2. Select the Add Target menu and select Windows to add a new configuration.

    Figure 4-6 Add Configuration Dialog Box

    Description of Figure 4-6 follows
    Description of ''Figure 4-6 Add Configuration Dialog Box''

  3. Type Tutorial for the Name.

  4. Select the Apply Windows metric profile automatically option.

  5. Click OK. The default Windows metric profile is added to the Monitoring Targets list. You can add counters to the set of Monitoring Targets using the Add Counters menu. You can also edit and delete counters using the corresponding buttons.

  6. Click Test to test the counters.

    Figure 4-7 Test Monitors Dialog Box

    Description of Figure 4-7 follows
    Description of ''Figure 4-7 Test Monitors Dialog Box''

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

  8. Click OK to exit the test results.

  9. Click Save Configuration.

  10. Enter Tutorial as the name and click OK.

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

4.4 Example 4: Editing Data Sources

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

  1. Make sure the Tutorial configuration from the previous example is displayed. If it is not, click Load Configuration and select the Tutorial configuration saved in the previous example.

  2. Click the Tutorial (Host: Ping (sec) monitor and click Edit.

    Figure 4-8 Edit Monitor Dialog Box

    Description of Figure 4-8 follows
    Description of ''Figure 4-8 Edit Monitor Dialog Box''

  3. Change the SampleFrequency to 10 seconds.

  4. Click OK.

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

4.5 Example 5: 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.

4.5.1 Adding a Virtual User Profile to the Scenario

  1. Click the Profiles section of the Composer tab.

  2. Drag the HTTPTutor2 script in the Available Scripts list to the Profile list.

  3. Change the #VUs value to 3.

  4. Select the HTTPTutor2 script in the Profile list to display the properties for the script in the Properties pane.

  5. Click the General tab.

  6. Make sure the Virtual User Pacing is set to Recorded and the Maximum value is set to 10 seconds.

  7. Leave the default settings for the remainder of the properties.

  8. Click the Data Bank tab for the HTTPTutor2 profile to display the Data Bank properties.

  9. Select the avitek.csv Data Bank file in properties tab.

  10. Select Each Iteration of Script as the Advance to Next Record property.

  11. Select Loop Over Range as the When Out of Records property.

  12. Select HTTPTutor1 script in the Profile pane.

  13. Change the Max # VUs value to 6.

  14. Click the General tab in the Properties pane. Notice the Max # VUs property is automatically changed in the Properties for the HTTPTutor1 script.

  15. Make sure the Virtual User Pacing is set to Recorded and the Maximum value is set to 10 seconds and click OK.

    Notice that each profile in the Profile list can have a different set of properties.

4.5.2 Setting Reporting Options

The data generated by a Oracle Load Testing Autopilot session is saved to the Oracle Load Testing database for post-session analysis. You can specify the reporting intervals and Virtual User reporting options in the Reporting options.

  1. Select Options from the User menu and then select Session Start/Stop in the Session group

    Figure 4-9 Session Start/Stop Options Dialog Box

    Description of Figure 4-9 follows
    Description of ''Figure 4-9 Session Start/Stop Options Dialog Box''

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

  3. Select Default Properties in the Profiles group of the left pane.

    Figure 4-10 Default Properties Options Dialog Box

    Description of Figure 4-10 follows
    Description of ''Figure 4-10 Default Properties Options Dialog Box''

  4. Set Message Delivery in the Virtual User Logs section to Always.

  5. Scroll down the screen and set Generate Timers For Resources in the Reporting section to True.

  6. Select Reporting in the left pane.

    Figure 4-11 Reporting Options Dialog Box

    Description of Figure 4-11 follows
    Description of ''Figure 4-11 Reporting Options Dialog Box''

  7. Set the Graph refresh interval to 15 seconds.

  8. Click Done.

4.5.3 Saving the Scenario

  1. Select Save As from the Scenario menu.

  2. Specify the filename as LoadTest1 and click Save.

4.6 Example 6: Running Multiple Profiles

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

4.6.1 Running Scenario Profiles

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

  2. Click the Ramp section on the Composer tab.

  3. Oracle Load Testing opens the Ramp options with the HTTPTutor1 and HTTPTutor2 Scenario Profiles listed in the Advanced list.

  4. Select Run until user stops test in the Stop Condition group of the Ramp section of the Composer tab.

  5. Select the Handle ramping of profiles individually option in the Advanced pane.

  6. Click the Ramp Rate column next to the HTTPTutor1 profile.

  7. Enter 3 in the edit box next to the percent/users option and select users.

  8. Enter 5 in the edit box next to the seconds/iterations option and selected iterations.

  9. Click the Ramp Rate column next to the HTTPTutor2 profile.

  10. Enter 6 in the edit box next to the percent/users option and select users.

  11. Enter 5 in the edit box next to the seconds/iterations option and select iterations.

  12. Click away from the popup to update the values.

  13. Click the Monitoring section on the Composer tab.

  14. Click Load configuration.

  15. Select the Tutorial configuration

  16. Click the Run Now button on the Oracle Load Testing toolbar.

  17. Oracle Load Testing opens the Save Session data dialog box.

  18. Click OK to use the default Session Name. The Active Session tab opens and shows an overview of the performance statistics as the Virtual User begins ramping up.

  19. Click the Virtual User Status sub-tab. on the Active Session tab.

  20. Watch as the session starts running the HTTPTutor1 and HTTPTutor2 scripts as virtual users. Notice also that HTTPTutor2 is playing back records from the Data Bank.

    Figure 4-13 Virtual User Status Grid

    Description of Figure 4-13 follows
    Description of ''Figure 4-13 Virtual User Status 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.

4.6.2 Viewing Performance Statistics

The Session Overview tab shows the Performance Statistics report. The Performance Statistics report shows a summary of the performance data for the running virtual users.

Figure 4-14 Session Overview Tab Showing Performance Statistics

Description of Figure 4-14 follows
Description of ''Figure 4-14 Session Overview Tab Showing Performance Statistics''

The statistics show the values for the following performance categories:

Overview

  • 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 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. If Oracle Load Testing 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.

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

  • <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 scripts using Oracle OpenScript.

Monitors

  • Shows the performance statistics for any ServerStats monitors configured for the scenario.

4.6.3 Viewing Runtime Graph and Statistics

Oracle Load Testing provides several types of graphs that show performance, error, and statistical information for the running virtual users. Oracle Load Testing automatically displays run time graphs in the Runtime Graphs sub-tab. The Runtime Graphs sub-tab shows a summary of the default graphs in a single view. The graphs update continuously while the session is running.

  1. Click the Runtime Graphs sub-tab.

    Figure 4-15 Runtime Graphs Tab - Default Graphs

    Description of Figure 4-15 follows
    Description of ''Figure 4-15 Runtime Graphs Tab - Default Graphs''

  2. Select Custom Graphs in the View dropdown of the Runtime Graphs sub- tab.

    Figure 4-16 Custom Graphs Initial View

    Description of Figure 4-16 follows
    Description of ''Figure 4-16 Custom Graphs Initial View''

  3. Click Add Graph.

  4. Expand the Session tree in the left pane.

  5. Expand Default Graphs.

  6. Double-click the Statistics vs. Time counter to create a new graph.

    Figure 4-17 Statistics vs. Time Custom Graph

    Description of Figure 4-17 follows
    Description of ''Figure 4-17 Statistics vs. Time Custom Graph''

  7. Click the Toggle Stats toolbar button above the graph pane.

    Figure 4-18 Statistics vs. Time Custom Graph with Statistics Table View

    Description of Figure 4-18 follows
    Description of ''Figure 4-18 Statistics vs. Time Custom Graph with Statistics Table View''

    The Toggle Stats toolbar button shows and hides the session counters and data for the graph.

  8. Click the Options toolbar button above the graph pane. If necessary, click the Graph tab.

    Figure 4-19 Graph Tab of the Graph Options Dialog Box

    Description of Figure 4-19 follows
    Description of ''Figure 4-19 Graph Tab of the Graph Options Dialog Box''

    The Graph tab of the Graph Options let you change the name of the graph and labels or remove counters from the graph.

  9. Enter a new name for the graph.

  10. Click the Axes tab.

    Figure 4-20 Axes Tab of the Graph Options Dialog Box

    Description of Figure 4-20 follows
    Description of ''Figure 4-20 Axes Tab of the Graph Options Dialog Box''

    The Axes tab of the Graph Options let you change the x and y axis scales and set time range filters and a threshold line for the graph.

  11. Click Apply and close the Graph Options dialog box.

  12. Click the Toggle Zoom toolbar button above the graph pane. A magnifying glass appears at the lower left corner of the graph.

    Figure 4-21 Statistics vs. Time Custom Graph with Zoom Mode On

    Description of Figure 4-21 follows
    Description of ''Figure 4-21 Statistics vs. Time Custom Graph with Zoom Mode On''

  13. Click and drag the Zoom cursor to zoom in on an area of the graph.

  14. Click the Magnifier icon to zoom out.

  15. Click Back to Graphs to return to the Custom Graphs view. The new graph is added to the custom graphs dashboard.

    Figure 4-22 Custom Graphs Dashboard with New Graph

    Description of Figure 4-22 follows
    Description of ''Figure 4-22 Custom Graphs Dashboard with New Graph''

  16. Click the ServerStats sub-tab.

    Figure 4-23 ServerStats Sub-Tab Showing Monitoring Configuration Targets and Counters

    Description of Figure 4-23 follows
    Description of ''Figure 4-23 ServerStats Sub-Tab Showing Monitoring Configuration Targets and Counters''

    The Virtual User Logs sub-tab lets you view log file data. The Sync Point Status sub-tab lets you view and control sync point that have been configured for the Virtual User scripts in OpenScript.

4.7 Example 7: 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.

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

  2. Click the Virtual User Status sub-tab.

4.7.1 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 4-24 Virtual User Shortcut Menu

    Description of Figure 4-24 follows
    Description of ''Figure 4-24 Virtual User Shortcut Menu''

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

    Figure 4-25 Modify Run Attributes Dialog Box

    Description of Figure 4-25 follows
    Description of ''Figure 4-25 Modify Run Attributes Dialog Box''

    You can change the attributes of each virtual user individually.

  4. Click Cancel to close the dialog box.

4.7.2 Stopping an Individual Virtual User

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

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

  3. Select Stop. Oracle Load Testing stops running the selected virtual user. The virtual user will complete the current script iteration and then stop.

4.7.3 Aborting an Individual Virtual User

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

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

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

4.7.4 Stopping All Virtual Users

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

4.7.5 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 script iteration.

4.8 Example 8: Generating Reports

This example explains the report generation features of Oracle Load Testing. The data collected by Oracle Load Testing and Oracle Load Testing ServerStats while the session is running virtual users is saved to a database. You can use Oracle Load Testing to analyze the data and generate a variety of graphs and reports.

4.8.1 Generating Reports from Oracle Load Testing

This example shows how to use previously saved data to create custom reports and to view Session and Scenario reports. The Create Reports tab is used to generate session run reports after a session is finished.

  1. Select the Reports tab.

  2. Select the session you saved in the previous example from the Session(s) list and click the name. The Performance Statistic report appears for the saved session.

    Figure 4-26 Session Overview Showing the Performance Statistics Session Report

    Description of Figure 4-26 follows
    Description of ''Figure 4-26 Session Overview Showing the Performance Statistics Session Report''

  3. Click the Graphs sub-tab.

  4. Click Add Graph.

  5. Expand the session tree in the left pane, then expand Session Counters. The data categories appear in the Available Data Series list.

  6. Double-click Hits/sec, KB Rcvd/sec, Pages Rcvd/sec, and Trans/sec in the Session counters tree to add the counters to the graph. These are the overall counters.

    Figure 4-28 Sample Session Report Graph

    Description of Figure 4-28 follows
    Description of ''Figure 4-28 Sample Session Report Graph''

  7. Click the Toggle Legend button on the top of the graph. The chart legend opens below the graph.

    Figure 4-29 Sample Session Report Graph Showing the Legend View

    Description of Figure 4-29 follows
    Description of ''Figure 4-29 Sample Session Report Graph Showing the Legend View''

    The legends show which color line represents which virtual user profile, script page, and Oracle Load Testing ServerStats counter. The legends for Oracle Load Testing data show the session, the virtual user profile, and the scripts page. The legends for ServerStats data show the session, counter object, counter instance and counter.

    You can export the graphs to image files or the data to comma-separated value files and Microsoft Excel files.

  8. Click the Options toolbar button and click the X next to a data series on the Graph tab and click Apply to remove a data series from the graph.

  9. Click the Toggle Legend button again to hide the legend.

  10. Click the Toggle Stats button on the top of the graph. The chart statistics table view opens at the bottom of the graph.

    Figure 4-30 Sample Session Report Graph Showing the Chart Statistics

    Description of Figure 4-30 follows
    Description of ''Figure 4-30 Sample Session Report Graph Showing the Chart Statistics''

  11. Move the mouse cursor over a data series line in the graph. The data point information popup appears over the graph.

    Figure 4-31 Sample Session Report Graph Showing Data Point Information

    Description of Figure 4-31 follows
    Description of ''Figure 4-31 Sample Session Report Graph Showing Data Point Information''

  12. Click the Toggle Stats button again to hide the statistics table.

  13. Click Back to Graphs. The new graph appears in the Reports dashboard.

    Figure 4-32 Reports Dashboard with Custom Graph Added

    Description of Figure 4-32 follows
    Description of ''Figure 4-32 Reports Dashboard with Custom Graph Added''

The Virtual User Logs sub-tab lets you view log file data.

4.8.2 Setting Graph Options

Use the Options toolbar button to set the title and the x/y axis options for the graph.

  1. Click the Options button on the top of the graph.

    Figure 4-33 The Graph Options View Showing the X/Y-Axis Options

    Description of Figure 4-33 follows
    Description of ''Figure 4-33 The Graph Options View Showing the X/Y-Axis Options''

  2. Set the graph title on the Graph tab and the and x/y axis options on the Axes tab.

  3. Click Apply.

4.8.3 Exporting Charts

You can use the export buttons on the graph toolbar to export graph images and data to other file types.

  1. Click the Export Image, Export CSV, or Export XLS buttons on the top of the graph to export the graph as an image, comma-separated value file, or Excel spreadsheet file.

  2. Specify the file save or open options and select a location to save the data.

  3. Use your image or spreadsheet application to open the saved file.

  4. You can print the report by clicking the Print/Save [HTML] button and selecting Print from the File menu in the browser window.

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