Use BlazeMeter To Create a JMeter Script

BlazeMeter is a cloud-based load testing platform that can simulate thousands of concurrent users, enabling developers to test the scalability and performance of their applications. It also offers a Chrome extension that allows you to record user interactions and generate a JMeter script.

Installation

To use BlazeMeter, first, install the Chrome extension from the Chrome Web Store at:
https://chrome.google.com/webstore/detail/blazemeter-the-continuous/mbopgmdnpcbohhpnfglgohlbhfongabi

BlazeMeter.png


Recording a Test

https://guide.blazemeter.com/hc/en-us/articles/206732849-Chrome-Extension-Record


By default, every test step you perform is being recorded to a “Test Case”, and it will be a monolithic script with a sequence of actions. On the JMX level, this will simply create a thread group consisting of these actions. The recorder, in fact, treats each step as a single transaction controller, so if you prefer, you may rename the label, and add additional labels to group subsequent actions under their own transaction controllers.

Click the BlazeMeter icon in your Chrome browser toolbar.

Log in to your BlazeMeter account, if you haven’t already. Verify that you see the “Hi [username]” greeting in the upper right-hand corner to confirm that the plugin is logged in.

Start.png

Give your test a name.

(Optional) Expand and configure advanced options, or use the defaults.

Click the Start recording button.

The UI will change to show your yet-to-be-performed first steps.
Note that on the right-hand side, there is a UI column and a JMX column, both of which start counting at (0).

Perform the actions in your application that you wish to simulate in your test. For example, browse to a site, click on a selection, fill out a form, submit the form.

Note that as you do so, the UI count increases to reflect UI actions that you performed on a user-level. The JMX count increases to reflect how many items are created within the performance script to do the same.

(Optional) Rename a segment by clicking the label. Or type in a name, then click Save to create a new label under which to group sets of subsequent actions for readability later.

The example above will appear as follows in the resulting JMX:
group.png

Use the Pause recording button at any time you need to pause the recording.

The button will change to Record so that clicking it a second time will unpause, resuming the recording.

While the recording is paused, you can select and right-click any element on your webpage to add assertions as test steps. When you add an assertion, the UI count increments by one.

add.png

Tip: Only add assertions while the test is paused, else the recorder will include the clicks you have performed to open the context menu.

When finished, click the Stop recording button.

Export to JMX file

edit.png
editor.png
exportTOjmeter.png
export.png