Verifying User Scenarios

Applies to LoadComplete 4.97, last modified on May 20, 2019

To verify a scenario, you simulate it with one virtual user to make sure that the scenario can run successfully.

Why You Need to Perform Scenario Verification

When you run a test simulating many virtual users, it may be difficult to find problems that are not caused by the simulated load. That is why we recommend that you verify a scenario using one virtual user. After you make sure the scenario works fine for one virtual user, you can check how it works under real-life conditions.

Starting Scenario Verification

Record a scenario to verify. To learn how to record scenarios with LoadComplete, see Recording User Scenarios.

To verify the recorded scenario:

  1. Click Verify Scenario on the toolbar of the Scenario editor.

    Verifying a scenario

    — or —

    Right-click the scenario in the Project Explorer panel and then click Verify Scenario.

  2. If the Show the “Select verification settings” message option is enabled in LoadComplete, the Select Verification Settings dialog will be displayed:

    • To simulate the recorded page think time during verification, click Use “think time” values.

    • To ignore the page think time during verification, click Ignore “think time” during verification.

  3. LoadComplete will simulate the scenario for one virtual user.

Important Notes:

  • While simulating a scenario, LoadComplete neither opens the browser, nor performs any visual actions against the tested server. It just sends the recorded requests to the server and then checks the received responses. Therefore, the absence of interactions with the browser UI during the test run is the expected behavior.

  • Any additional actions performed during the playback may cause the scenario simulation to fail. We do not recommend that you work with the tested web server or web pages during the verification process.

  • When you verify a scenario, LoadComplete checks whether the disk where your project is located has enough free space to store the log. The minimum required amount of free disk space is 100 MB. If there is not enough free space, LoadComplete will show a warning informing you about the problem and telling you how much space you need to free to save the log successfully.

How Verification Works

LoadComplete simulates requests recorded in the scenario and checks the following:

  • For HTTP traffic, LoadComplete checks the server responses. If the received response code differs from the recorded response code, LoadComplete reports a warning.

  • For WebSocket traffic, LoadComplete checks whether any socket errors occur during the simulation.

    If recorded server messages are marked as synchronous in the scenario, LoadComplete also matches them with actual messages the server sends. If the Opcode field values of the actual and recorded server messages are different, LoadComplete reports an error.

Settings That Affect Verification

During verification, LoadComplete takes into account the scenario settings:

  • It uses the recorded request and connection think time values to simulate pauses between connections and requests.

  • Depending on the option you selected in the Select Verification Settings dialog, it uses either the recorded page think time values, or zero think time values to simulate the time a user spends on each web page.

    Note: If the Show the “Select verification settings” message option is disabled in LoadComplete, it does not show the dialog and uses the recorded page think time values.
  • It uses data selectors to extract data from server responses and save them to variables.

  • It substitutes request parameter values with variables. (This applies to both body and URL parameters).

  • It uses variables to parameterize request header fields and parts of request URLs.

  • It uses data replacers to insert values into simulated requests.

  • It uses validation rules to verify the contents of server responses.

  • It checks response codes according to values specified in the Expected Response Codes table of the Scenario editor.

  • It uses the SLA criteria defined for individual operations of your scenario to verify the server performance. By default, the criteria are set to zero (disabled).

Settings That LoadComplete Ignores During Verification

Verifying a scenario is very similar to running a test simulating this scenario with one virtual user only. However, LoadComplete does not actually run any tests, therefore, the following test-specific settings do not work during verification:

To estimate how the scenario will work with these additional settings enabled, use single-user tests.

Alternatives to Scenario Verification

An alternative approach to verifying a scenario is to run the single-user test that LoadComplete creates automatically for the scenario. Such a test contains only one virtual user. Therefore, you can run that test to check whether the scenario works fine for one user.

Running this test does not differ from running any other test. During the test, both scenario-specific and test-specific settings will work.

Single-user tests are regular tests. You can easily turn them into full-fledged tests by adding more virtual users. In this case, you will not be able to use the modified tests for scenario verification. That is why, we recommend using the Verify Scenario command instead. This approach is easier and lets you verify the desired scenario at any time (after recording a scenario, after editing an existing scenario and so on).

Success Criteria

Scenario verification succeeds if LoadComplete does not post any warnings or errors to the test log. This happens if all of the following conditions are met:

  • LoadComplete is able to connect to the tested web server and send all requests in the scenario to the server.

  • (For HTTP traffic) The response code for a request matches the success response code specified in the Scenario editor for that request.

  • (For WebSocket traffic) No socket error has occurred. If the server messages are enabled in the scenario, the Opcode field values of the recorded messages match the values of the actual server messages.

  • No operation has violated the specified SLA criteria.

    Note: Because the Verify Scenario command does not run a test, LoadComplete ignores the SLA criteria you set for a single-user test.
  • All the validations pass.

What to Do If Verification Fails

Verification fails if the scenario is simulated with errors or warnings. You can click Ask for Assistance at the top of the LoadComplete window to contact a product specialist who will help you fix issues, or you can find the cause of the problems and eliminate it yourself. To learn how to do this, see What to Do if Verification Fails.

If you use LoadComplete Trial, LoadComplete will display a message suggesting that you contact a product specialist.

See Also

Verifying Scenarios and Tests
Running Single-User Tests

Highlight search results