Chrome extension - Record

You can install the BlazeMeter Chrome extension to test your web application without prior scripting knowledge. Record user actions, objects, and HTTP requests while interacting with the browser to create a unique test artifact. The BlazeMeter Chrome extension automatically records performance and functional tests in parallel, and creates both JMeter and Selenium scripts that run locally or directly on BlazeMeter.

The Recorder

The extension supports the following recording functionality:

Chrome extension recording controls after recording was stopped

  • Name - Defines a test name of your choice. A name is mandatory.
  • Start recording (red circle) - Starts recording both HTTP and HTTPs requests and Selenium actions.
  • Stop recording (red square) - Stops recording and enables running, editing, and saving the test.
  • Reset all options (curved arrow) - Resets settings, discards any recording, and reverts the menu to its default state.
  • Run - Uploads and runs the script in BlazeMeter. This button is enabled only after you stop recording.
    To upload and run the script, choose a test type:
    • Performance Test
    • GUI Functional Test
    • End User Experience Monitoring
  • Edit - Opens the JMeter Editor where you can implement minor improvements before uploading the script. This button is enabled only after you stop recording.
  • Save... - Downloads the recording as a file. This button is enabled only after you stop recording.
    Choose a file type:
    • Taurus YAML of JMeter & Selenium - for Performance tests and GUI Functional tests combined
    • Selenium - for GUI Functional tests only
    • JMX - for Performance tests only
  • Save in Project... - Defines your BlazeMeter account, workspace, and project. Select a target before saving the test.

For additional recording options, see Configure advanced options.

Configure advanced options

Before recording, you can configure advanced options that are specific to HTTP and HTTPS calls. These settings are optional. To view all options in this section of the Chrome extension, expand Advanced Options and scroll down.

Chrome extension Advanced Options panel

You can specify one or more of the following options:

  • User Agent - Use this option to select the device or browser to emulate during the test. This selection adds a “User-Agent” header to the requests. Use this option to emulate various situations, such as a user browsing through an previous browser version or a mobile device.
  • Filter Pattern - Use this option to restrict the requests included in the recording. For example, you probably do not want to record your Gmail, Facebook, or even BlazeMeter traffic, so you restrict requests to only one domain.
    To change which requests your recording includes, modify the match pattern in this field. You’ll be presented with the option to select which domains to include and exclude before the test actually runs.
  • Disable Browser Cache - Use this option to disable the browser cache during the recording. Cached objects are not recorded, this is why it's important to choose how you handle caching.
  • Wipe Service Workers - Use this option to remove the service workers of the page when ever you navigate to another page while recording.
  • Record AJAX Requests - Use this option to include AJAX requests in the recording.
  • Update Settings Before Running Test - Use this option to change settings before you run the test. Through the BlazeMeter interface, you can control Performance test properties such as ramp-up time, test duration, and load distribution between engines.
  • Randomize recorded think times - Use this option to simulate the expected delayed response time of a real service or human user with a uniform random timer.
  • Requests to Record - Use this option to control how BlazeMeter handles embedded objects on the page, such as images, CSS, and JavaScript files.
    • Only Top-Level Requests - Excludes requests for referenced objects from the recorded script. When the JMeter script runs, it parses the HTML file and sends requests for all referenced objects.
      • Parallel Number of Downloads - Defines the maximum number of downloads that can run in parallel for each browser.
    • Top Level Requests and the Following - Includes the following selected objects. The recorded JMeter script includes requests for referenced objects. When running, the script does not parse the HTML file and does not send requests for referenced objects.

      • Cookies

      • CSS and fonts

      • JavaScript

      • Images

      • Redirects

      • Other

  • GUI Functional Test Options
    • Export ID Locators - Use this option to include locators in the recording. You can still change the setting after recording the test and before you export and run the script in BlazeMeter.
      • If the identifiers in your user interface are static, enable this option. This is the default. Examples of locators of DOM elements are "ID a1234567" or "Xpath div[id=a1234567]".
      • If identifiers in your user interface are regenerated and are not uniquely reliable for use in test scripts, disable this option. Disabling this option excludes ID locators from the recording.
    • Allow Context Clicks to be recorded - By default, this option is disabled. To record right clicks, enable this option. To exclude right clicks when you use the context menu to add assertions, disable this option.
    • Include metadata in Selenium-only YAML

After you have familiarized yourself with the options, let’s log in and create a recording.

Log in and set up

  1. Open the web site to be recorded in Chrome.

  2. Select the BlazeMeter extension in the toolbar:

    Chrome toolbar with the BlazeMeter extension icon highlighted

  3. Log in to your BlazeMeter account in the extension. Verify that you see the “Hi [username]” greeting in the upper right-hand corner.
  4. Give your test a name.
  5. (Optional) To apply advanced options, follow the instructions in Configure advanced options.
  6. Under Save in Project, select the BlazeMeter account, workspace, and project, and select Save.

You are ready to record.

Record a test script

By default, the extension records every test step that you perform in the web app to a test case: a monolithic script with a sequence of actions. On the JMX level, the recorder creates a thread group consisting of these actions.

The recorder treats each step as a single transaction controller. To group subsequent actions under their own transaction controllers, rename the label and add additional labels as described here.

To record a test:

  1. Browse to the web app and select the Start recording button.
    Chrome extension logged-in screen with the default project selected
    The user interface (UI) displays two columns on the right: a UI column that starts counting at 2, and a JMX column that starts counting at 0. The extension now records your test steps.

    Chrome extension recording screen showing UI and JMX counts

  2. In the web app, perform the actions that you want to simulate in your test.
    For example, browse to a page, select items, enter values, select buttons, and submit the form. As you perform test steps:
    • The UI count increases to reflect UI actions that you performed as a user.
    • The JMX count increases to reflect how many corresponding items are created in the performance script.

      The UI and JMX counts might differ because user actions that require multiple mouse clicks can translate into fewer actions, for example, one GET request or one POST request. The opposite can also be true: one user action can result in multiple requests.
  3. (Optional) To group actions under a transaction controller, rename a segment by selecting its label. Or type in a name and select Add Step to create a new label.

    Chrome extension Add Step field for naming a test segment

    Example: The new step "verify cart" will appear as follows in the resulting JMX thread group:
    JMeter thread group showing labeled test steps
  4. To pause the recording, select Pause recording.
    The Pause button changes to Record. Selecting the button again resumes the recording.
  5. To add assertions, select any element on your website and right-click, and then select an option from the Selenium Asserts menu.
    For each added assertion, the UI count increments by one. To not record these clicks, see the Allow Context Clicks to be recorded advanced option.
    Chrome extension context menu for adding Selenium assertions
  6. Select Stop recording when finished.
  7. Work with the recording:
    • To edit the test, select Edit.

    • To run the test in BlazeMeter, select Run and select a test type.

    • To download the test to run it locally, select Save....

Chrome extension Run menu with performance and functional test options

Record multiple tabs (Selenium)

When recording a Selenium scenario, the BlazeMeter Chrome extension takes into account the following scenarios:

  • When you open a new tab, the Chrome extension adds an "openWindow" action to your script recording with the default new tab URL of Chrome. The Chrome extension stores this information, and the focus of recording switches to this tab using the "selectWindow" action.
  • When you switch to an existing tab, the "openWindow" action is recorded together with the current URL of that tab. The Chrome extensionstores this information, and the focus of recording switches to this tab using the "selectWindow" action.
  • When you close a tab, the "close" action is recorded, and the browser automatically switches to another existing tab. Then it follows the described behavior for switching to existing tabs.
  • When you switch between tabs that are already part of the recording, the Chrome extension does not add another "openWindow" action because it recognizes the tab. Instead, only the "selectWindow" action is added to the recording.

Edit a test script

Instead of downloading a recording as-is, you can further edit your script before you download the recording.

After stopping the recording, you can edit it

In the extension, select Edit to open the JMeter script editor in a new tab.

Chrome extension script editor with Taurus, JSON, JMX, and Run controls

Use the buttons in the menubar to perform the following tasks:

  • Expand all fields
  • Collapse all fields
  • Sort the contents
  • Filter the contents

    In the filter, enter a JMESPath query to filter, sort, or transform the JSON data, and preview it.

  • Undo
  • Redo
  • Search

To move the item up or down in the script, use the handle button to the left of each item. Select the handle button and drag the item to a new position.
Next to the handle is a button that opens a menu that lets you insert, duplicate, and remove fields and values in your script:

Chrome extension script editor item menu

To specify a format for exporting, select one of the topmost buttons:

  • Taurus YAML file

  • Taurus JSON file

  • JMeter JMX file

To upload and run your edited script in BlazeMeter, select the Run button at the upper right.

Download a recording

After your script is recorded, you can download a copy.

  1. In the Chrome extension, select Save....

    Chrome extension Download your scripts dialog

  2. Select the file type:

    • A JMeter-only JMX script
      • Domains to include: If you selected Requests to Record in the advanced options, select one or more domains to include in the exported script.
    • A Taurus YAML script consisting of only a Selenium test
      • Select all languages that apply.
    • A Taurus YAML script containing both, JMeter and Selenium tests
  3. Select Save.