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:
Performing a Simple Load Test - shows how to use Oracle Load Testing to run virtual users to simulate load on a Web application.
Adding Data Sources - 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.
Editing Data Sources - shows how to edit existing Oracle Load Testing ServerStats configurations to modify specific counters.
Creating a Scenario with Multiple Profiles - shows how to add a new script to the Oracle Load Testing Scenario. This example also shows how to set the Reporting options and Session Start/Stop options to save data for use in post-run analysis.
Running Multiple Profiles - 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.
Controlling Virtual Users - shows how to modify individual virtual user attributes, view actions, and stop and abort virtual users.
Generating Reports - explains how to view the default reports and generate reports for post-run analysis.
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.
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.
Note:
This section uses the default login credentials from the Oracle Application Testing Suite installation.To start Oracle Load Testing:
Select Programs from the Start menu and then select Oracle Load Testing from the Oracle Application Testing Suite Start menu.
Enter administrator as the user name.
Enter the password specified during the Oracle Application Testing Suite installation process.
Click Login. The main window appears, as follows:
Figure 4-1 Oracle Load Testing Main Window
Select Default in the Available Scripts list.
Make sure the Composer tab is displayed in Oracle Load Testing showing the Profile section.
Select HTTPTutor1 in the Available scripts list. These are the scripts that you record using Oracle OpenScript.
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.
Select users next to Add in the Ramp Rate pane.
Enter 1 in the Add [#] users edit box.
Enter 10 in the [#] seconds edit box.
Select Run for specified iterations option in the Stop Condition group of the Ramp section.
Enter 5 in the Run for specified iterations edit box.
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.
Click the Virtual User Status sub-tab in the Active Session tab.
Figure 4-3 Virtual User Status Grid Window
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.
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:
Click the Goals section of the Composer tab.
Set the stop ramping VUs when option.
Click Add Goal.
Figure 4-4 Goals Section with a New Goal Added
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
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:
Click the Composer tab and click the Monitoring section.
Select the Add Target menu and select Windows to add a new configuration.
Type Tutorial for the Name.
Select the Apply Windows metric profile automatically option.
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.
Review the results to verify the counters are working properly.
Click OK to exit the test results.
Click Save Configuration.
Enter Tutorial as the name and click OK.
The next example explains the procedures for editing existing ServerStats configurations.
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.
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.
Click the Tutorial (Host: Ping (sec) monitor and click Edit.
Click OK.
See the Oracle Load Testing User's Guide for additional information about using the features and options of Oracle Load Testing ServerStats.
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.
Click the Profiles section of the Composer tab.
Drag the HTTPTutor2 script in the Available Scripts list to the Profile list.
Change the #VUs value to 3.
Select the HTTPTutor2 script in the Profile list to display the properties for the script in the Properties pane.
Click the General tab.
Make sure the Virtual User Pacing is set to Recorded and the Maximum value is set to 10 seconds.
Leave the default settings for the remainder of the properties.
Click the Data Bank tab for the HTTPTutor2 profile to display the Data Bank properties.
Select the avitek.csv
Data Bank file in properties tab.
Select Each Iteration of Script as the Advance to Next Record property.
Select Loop Over Range as the When Out of Records property.
Select HTTPTutor1 script in the Profile pane.
Click the General tab in the Properties pane. Notice the Max # VUs property is automatically changed in the Properties for the HTTPTutor1 script.
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.
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.
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
Select Default Properties in the Profiles group of the left pane.
Figure 4-10 Default Properties Options Dialog Box
Set Message Delivery in the Virtual User Logs section to Always.
Scroll down the screen and set Generate Timers For Resources in the Reporting section to True.
Select Reporting in the left pane.
Figure 4-11 Reporting Options Dialog Box
Set the Graph refresh interval to 15 seconds.
Click Done.
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.
Make sure the Scenario from the previous example is still shown in the Composer tab.
Click the Ramp section on the Composer tab.
Oracle Load Testing opens the Ramp options with the HTTPTutor1 and HTTPTutor2 Scenario Profiles listed in the Advanced list.
Select Run until user stops test in the Stop Condition group of the Ramp section of the Composer tab.
Select the Handle ramping of profiles individually option in the Advanced pane.
Click the Ramp Rate column next to the HTTPTutor1 profile.
Enter 3 in the edit box next to the percent/users option and select users.
Enter 5 in the edit box next to the seconds/iterations option and selected iterations.
Click the Ramp Rate column next to the HTTPTutor2 profile.
Enter 6 in the edit box next to the percent/users option and select users.
Enter 5 in the edit box next to the seconds/iterations option and select iterations.
Click away from the popup to update the values.
Click the Monitoring section on the Composer tab.
Click Load configuration.
Select the Tutorial configuration
Click the Run Now button on the Oracle Load Testing toolbar.
Oracle Load Testing opens the Save Session data dialog box.
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.
Click the Virtual User Status sub-tab. on the Active Session tab.
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.
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.
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
The statistics show the values for the following performance categories:
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.
Kilobytes - the total number of kilobytes transferred between the server and browser client.
<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.
Shows the performance statistics for any ServerStats monitors configured for the scenario.
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.
Click the Runtime Graphs sub-tab.
Figure 4-15 Runtime Graphs Tab - Default Graphs
Select Custom Graphs in the View dropdown of the Runtime Graphs sub- tab.
Click Add Graph.
Expand the Session tree in the left pane.
Expand Default Graphs.
Double-click the Statistics vs. Time counter to create a new graph.
Figure 4-17 Statistics vs. Time Custom Graph
Click the Toggle Stats toolbar button above the graph pane.
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.
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
The Graph tab of the Graph Options let you change the name of the graph and labels or remove counters from the graph.
Enter a new name for the graph.
Click the Axes tab.
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.
Click Apply and close the Graph Options dialog box.
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
Click and drag the Zoom cursor to zoom in on an area of the graph.
Click the Magnifier icon to zoom out.
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
Click the ServerStats sub-tab.
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.
This example shows how to modify individual virtual user attributes, view actions, and stop and abort virtual users in Oracle Load Testing.
Make sure the virtual users from Example 3 are still running.
Click the Virtual User Status sub-tab.
Click on any virtual user in the virtual user grid.
Click the right mouse-button to open the popup menu.
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
You can change the attributes of each virtual user individually.
Click Cancel to close the dialog box.
Click on any virtual user in the virtual user status grid.
Click the right mouse-button to open the popup menu.
Select Stop. Oracle Load Testing stops running the selected virtual user. The virtual user will complete the current script iteration and then stop.
Click on any virtual user in the virtual user status grid.
Click the right mouse-button to open the popup menu.
Select Abort. Oracle Load Testing aborts running the selected virtual user without completing the current script iteration.
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.
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.
Select the Reports tab.
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
Click the Graphs sub-tab.
Click Add Graph.
Expand the session tree in the left pane, then expand Session Counters. The data categories appear in the Available Data Series list.
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.
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
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.
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.
Click the Toggle Legend button again to hide the legend.
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
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
Click the Toggle Stats button again to hide the statistics table.
Click Back to Graphs. The new graph appears in the Reports dashboard.
Figure 4-32 Reports Dashboard with Custom Graph Added
The Virtual User Logs sub-tab lets you view log file data.
Use the Options toolbar button to set the title and the x/y axis options for the graph.
Click the Options button on the top of the graph.
Figure 4-33 The Graph Options View Showing the X/Y-Axis Options
Set the graph title on the Graph tab and the and x/y axis options on the Axes tab.
Click Apply.
You can use the export buttons on the graph toolbar to export graph images and data to other file types.
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.
Specify the file save or open options and select a location to save the data.
Use your image or spreadsheet application to open the saved file.
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.