9 Running and Saving Scenarios

This chapter explains how to use the Ramp settings to specify start and stop times for scenario profiles and the rampup specifications for each virtual user. Default values can be set by selecting Options from the User menu then selecting Ramp Defaults in the Profiles group.

This chapter also explains how to use the Advanced Ramp-up settings for specifying start, stop, and ramp-up conditions on a per-script basis.

Note:

Changing the Ramp defaults does not affect the current scenario. The changed Ramp defaults go into effect when you start a new scenario.

Before you can run scenarios, you must first define virtual user profiles and ramp options. Chapter 5, "Creating Scenario Profiles" explains how to define virtual user profiles.

9.1 Working with Scenario Files

Once you select virtual user profiles and set the properties, you can save the Scenario to a file for future use.

9.1.1 Saving Scenarios

To save a Scenario:

  1. Select Save or Save As from the Scenario menu or click the toolbar button.

    Repository - a list of repositories. Select the repository in which you want to save the scenario.

    <Scenario list> - lists the scenarios in the selected workspace.

    Name - enter the name for the scenario.

  2. If the Save As dialog box appears, specify a file name in the Name field.

  3. Select the repository and workspace where you want to save the scenario.

  4. Click OK.

Note:

Oracle Load Testing saves the current Profile settings as part of a saved scenario.

9.1.2 Opening Existing Scenarios

If you have previously defined a scenario and saved it to a file, you can open the scenario for use in Oracle Load Testing.

To open an existing Scenario:

  1. Select Open from the Scenario menu. Oracle Load Testing opens a dialog for selecting the scenario file.

    Repository - a list of repositories.

    <Scenario list> - lists the scenarios in the selected workspace.

  2. Select the Repository and Workspace containing the scenario you want to open.

  3. Select the scenario and click OK.

9.1.3 Renaming Scenarios

To rename a scenario:

  1. Select Options from the User menu.

  2. Select Scenarios in the Manage group.

    Edit - opens the Edit Scenario Dialog Box for editing the selected scenario.

    Delete - deletes the selected scenario.

    Import - opens a dialog for selecting the scenario file to import.

    Export - opens options for saving the selected scenario to a file.

    Name - lists the scenarios in the selected workspace.

  3. Select the scenario you want to edit.

  4. Click Edit.

    Name - enter a name for the scenario.

  5. Enter a new name for the scenario.

  6. Click OK.

  7. Click Close.

9.1.4 Deleting Scenarios

To delete a scenario:

  1. Select Options from the User menu

  2. Select Scenarios in the Manage group.

    Edit - opens the Edit Scenario Dialog Box for editing the selected scenario.

    Delete - deletes the selected scenarios. To select more than one scenario, hold down the CTRL key.

    Import - opens a dialog for selecting the scenario file to import.

    Export - opens options for saving the selected scenario to a file.

    Name - lists the scenarios in the selected workspace.

  3. Select the scenarios you want to delete. To select more than one scenario, hold down the CTRL key.

  4. Click Delete.

  5. Click Yes to confirm the deletion.

  6. Click Close to exit the Scenario Manager.

9.2 Running Scenario Sessions

Once you have defined a scenario and set the profile attributes, you can run the scenario sessionimmediately or schedule the session to run at a later time.

9.2.1 Start Scenario Session Immediately

If you want to use the default settings and start the scenario session, you canautomatically start the session in one step.

To start a scenario session immediately, click the Run Now button.

Oracle Load Testing automatically opens the Active Session tab with the scenario loaded and starts the virtual user run.

9.2.2 Schedule without Starting the Scenario Session

Adding the scenario to the calendar without starting allows you to specify the start and stop times for running the scenario session.

To submit a Scenario without starting the session click the Schedule button.

Click on the day to schedule a new task for the session run.

Enter the task name, start and end time, and optional descriptionand click OK.

9.3 Manually Starting and Stopping Sessions

Once you have created scenario profiles, you can manually start and stop the session using the following:

  • Start/Stop/Abort buttons

  • Calendar

You need to manually stop the active session to submit more scenario profiles or stop any new virtual users from being started.

9.3.1 Starting the Session

To start the session manually:

  1. Click the Run Now button.

  2. If the Deferred Start options appear, allow the delay to continue until the start time.

    or:

    Click Run Now to start running the scenario immediately.

    or

    Click Stop from the Session menu to cancel the start.

9.3.2 Stopping Ramping New Virtual Users

To stop ramping new Virtual Users, select Pause Ramp from the Session menu on the Active Session tab.

9.3.3 Stopping All Virtual Users

To stop all running Virtual Users after they have finished, click the Stop button. The virtual users will complete the current iteration of the script and then stop.

To immediately stop all running Virtual Users click the Abort button.

9.3.4 Managing Sessions

Sessions specify the scope for Oracle Load Testing data collection and reporting. The data collected while the session is running virtual users is shown in the virtual user status grid, Oracle Load Testing ServerStats runtime performance statistics and load graphs, and can be saved to a database for post-testing analysis.

You can specify default settings for how sessions start and end data collection using Options from the User menu then selecting Session Start/Stop. Selecting this option opens the Session Start/Stop options:

Session Naming - defines how to name sessions.

  • Default Session prefix - specifies a fixed name to add before the session name. Enter a name to use. Oracle Load Testing adds the increment number to the name you define. The default name is "Session" (for example, Session0001).

  • Prompt for session name before running - when selected, the session name dialog box prompts for a session name when starting a session. When cleared, the session name will be automatically created based on the prefix.

Session End - defines how a session ends. When a session ends, Oracle Load Testing stops updating runtime data in the performance statistics, load graphs, and the database. Subsequent Autopilot runs start a new session for data collection and reporting purposes.

  • Stop session on last VU completion - when selected, the session ends when the last virtual user has finished the run.

  • Stop session when browser is closed - when there is an attached session, stops the session when the session timeout is reached after the browser is closed. When not checked and the browser is closed, the session continues to run until it's normal stopping time or until you reattach to the session and stop it manually. The default session timeout is ten minutes.

  • Terminate all agents at end of session - when selected, all Oracle Load Testing Agents automatically close when a session ends.

Agent error handling - defines how to handle agents that encounter errors.

  • Stop ramp-up on agent error - when selected, the autopilot stops submitting new virtual users if any virtual users fail to complete the initialization process. This may happen due to complications when starting the agent process or failures during script pre-run verification. This does not stop the test and previously running users continue to execute until the end of the session.

  • Drop failed agents from session - when selected, the autopilot stops submitting new users to the agent machine that had the failure if a virtual users fails to start or is set to orphaned for any reason.

9.4 Running Scenarios from the Command Line

You can run and stop scenario files using the command line Java file OLTCommandLine.jar located in the \lib directory under the installation directory. See Appendix C, "Command Line Reference" for additional information.