Capture request metrics

RealBrowser lets you collect metrics on request and response times between the browser and the server. Collecting request and response times helps you identify performance issues for a better user experience.

To use this feature, you need to add to one or more CaptureRequests actions in specific points along your user path.

Start collecting metrics

Start by inserting a CaptureRequests action at the beginning of your user path, immediately following the OpenBrowser action.

As soon as NeoLoad runs a CaptureRequests action, the RealBrowser engine starts collecting metrics from all browser-based requests. The CaptureRequests element automatically gathers these metrics.

NeoLoad merges these metrics into a single default bucket, unless you define different behavior.

For more detailed information, add bucket parameters to the action:

  • url to group request metrics based on exact URL matches.

  • resourceType to group request metrics based on resource type matches.

  • regexp to group request metrics based on regular expression matches.

How you list the buckets determines the sorting of the request metrics. Each action groups the collected request metrics, with the latest action holding the most recent metrics.

Save CPU resources, use url and resourceType over regexp. For a more detailed data view, scatter extra CaptureRequests actions along your user path.

Define buckets automatically

The CaptureRequest feature in RealBrowser streamlines your data organization. It automatically groups request metrics in new recordings or existing user paths, saving you time and simplifying data review.

For a new RealBrowser recording

After recording with RealBrowser, the Post-recording Wizard lets you specify the number of CaptureRequests actions in your new user path.

This process also automatically forms buckets based on the requests during the recording. Here's how NeoLoad creates your buckets:

  • XHR and Fetch type requests provide high granularity and result in individual url buckets with an exact URL match.

  • Other detected request types go into corresponding resourceType buckets.

For the best granularity on a particular resource type, you can add the realBrowser.captureRequests.resourceTypeListForUniqueUrlMatching property key in the controller_user.properties file.

Example: realBrowser.captureRequests.resourceTypeListForUniqueUrlMatching=image,script,document.

If you choose one CaptureRequests action per transaction, the buckets align with those you recorded during the transaction.

For an existing user path

To automatically update bucket definitions of CaptureRequests in an existing user path, follow these steps:

  1. Run Check Virtual User for the user path you wish to update.

  2. Right-click the user path element in the Check VU tree, and select Update recorded contents from the context menu.

  3. Right-click the user path element in the design tree, hover over the Advanced option, then the RealBrowser option. Then choose one of these options:

    • Delete all capture requests actions.

    • Add a capture request action at the beginning. This adds the request to the start of the user path.

    • Add a capture request action in each transaction.

If you chose option 2 or 3, NeoLoad creates buckets based on the requests from the last Check VU session.

Manage HTTP errors in RealBrowser tests

Managing HTTP errors effectively is crucial during RealBrowser testing sessions. This section guides you through capturing browser requests, dealing with errors during test execution, setting conditions for ignoring HTTP errors, and using available data for troubleshooting.

Handle errors during test execution

A RealBrowser recording session logs every request, including URLs, parameters, and server responses—HTTP response codes. When running tests with recorded content, apply specific rules based on your project settings and the error type to manage HTTP errors.

Criteria for ignoring HTTP errors

The system will ignore an HTTP error under these conditions:

  • Project Settings: In Project settings > Runtime parameters > Responses, select the Do not mark the specified HTTP error code when the same error occurs during the recording box.

  • Error occurrence: The error must happen during the recording.

  • Error code specification: The error code must be on your list of codes to ignore, available in the project settings.

  • Response code match: The error's response code must word-by-word match the recorded code and URL with its parameters.

Note: Errors that meet these criteria are recorded but not flagged as errors.

Use data for troubleshooting

Store detailed data on error management for each User Path, so that you can use them for troubleshooting and test strategy refinement. Access this data at project.zip/repository.xml/...vu.../extraJsonData/ignoreHTTPErrorCodesForRequest.