Loadium Record&Play

A guide for Loadium's Google Chrome extension

Loadium Record&Play is a feature developed by our team to ease and quicken your load test preparation in terms of scripting. The extension allows you to record URL’s, its parameters and headers while you are browsing the site. It is integrated to our test creation process which you can quickly start to your performance tests after finishing the recording.

From installing the extension to starting a test, every detail is covered in this guide in order to quickly get you to your performance tests.

Installing the Extension

You can find the page for installing the extension to Google Chrome here.

After installing the extension, remember to pin it from the extension manager.

Now you can easily access to Record&Play.

Extension UI

Let's take a quick tour for the extension’s interface.

You can find the explanation below for each numbered button:

  1. These buttons (start button and the big orange button) will start the recording session, as you browse, it will add requests to the Collections section. Once the recording is started, you will notice that its icon has changed.

  2. If you want to clear the recording, you can use this button to wipe the collections you previously recorded.

  3. You can download the recording by using this button, as .json file.

  4. Pressing this button will take you to settings of recording.

    These settings allows you to filter your recordings. You can define a regex pattern in order to capture specific URL’s. For example entering pattern as “https://*.youtube.com/*” will record URL’s that contains “youtube.com” in it. Furthermore, you can choose to record only the top level requests or additional sub-level requests.

  5. This button will create a new set of collection next to your previous collection, which the new recordings will be added to this new collection.

  6. This button will take you to the login page, if you’re logged in you will see your email address here.

  7. If you’re logged in, clicking this button will take you to Loadium’s test creation page, where you can edit your recorded collections and test configurations, and then you can start your test.

Editing the Recording on Loadium

After clicking Run Test button from the extension, you will be directed to New Test page’s Chrome Extension tab.

You will find your recorded .json file is automatically uploaded and ready for editing, or you can upload your own json file and edit it. These configurations are exactly same as the Jmeter’s which are very easy to grasp, and it is even easier if you have previous Jmeter experience.

On this page you can:

  • Edit your recorded .json file

  • Upload your own .json file to edit it

  • Configure collection

  • Configure a request’s

    • Headers

    • Parameters

    • Assertions

    • Variables

  • Download the edited file as .json or .jmx (Jmeter) file

  • Continue to starting a test

You can upload your own .json file by using the Upload button, but it will overwrite your current work, so it’s better to keep that in mind.

Configuring Collection

Collections are crucial because it allows you to separate the script into smaller pieces, makes it easier to work with and allows you to focus on specific part of the script. Similar to extension’s UI where you can add multiple of them while recording, you can configure them much more deeply in this page.

You can add multiple collections if you want. For each collection, you can:

  • Add sleep which adds a delay before the next request. You can enter the delay amount (in milliseconds) as you desire.

  • Add a new request which then you can configure its details.

  • Delete the collection if you would like to.

For each request in the collection, you can:

  • Remove the request from collection

  • Clone the request

  • Delete the request

You can also move the position of requests by gripping them from the dotted square icon, to change their order or group them in a collection.

Configuring Requests

Method Type

You can change a request’s type GET, POST, PUT, PATCH, DELETE and OPTIONS.

Headers

You can add new header or delete the existing ones.

  • To delete a header, click on corresponding “X” button at the end of it.

  • To add a new header, click on Add Header button then enter its Key and Value parameters.

Body

Depending on the method type, you can manage its body to send data with the request.

Query Params

You can add query parameters to your request as shown in the picture.

Assertions

You can make various type of assertions which uses response data to check conditions:

  • HTTP Status Code assertion, allows you to assert the value of the response code.

  • JSON Path value assertion, allows you to capture a value using a json path expression, then compare it to expected result

  • JSON Path assertion, asserts that the given json path expression contains value, is not null.

  • Text assertion, allows you to assert the body or the header of a response.

Variables

You can create variables that allows you to capture a specific data from a request’s response and store it for using later.

There are 3 ways of expression to capture the data to store it in a variable:

  • JSON Path

  • Regex

  • CSS Selector

For each type there are 2 areas to be filled, Variable Name and Expression. The referred data will be stored in the variable.

For CSS Selector, there are 2 additional areas that are related to capturing the data.

  • The referenced CSS element might have multiple values, attribute is for specifying to which value to restore. Leaving it empty will capture the text value of the element.

  • Match number is for choosing one outcome if there are more than one reference. Value “0” is used for random outcome.

After you create a variable in a request, you will see the created variables in Available Variables list for the requests coming after.

You can access the created variable’s value with the expression ${variableName}.

After Editing

There are 4 buttons down below on editing page.

Update button allows you to save your changes done on the uploaded file.

Remember to use it frequently to prevent losing your work.

After you saved your changes, you can:

  • Download the file as Jmeter (.jmx) file

  • Download the file as JSON file

  • Continue to starting a test

Clicking on Run Test will direct you to Basic Settings tab on New Test page with your .jmx file uploaded, ready to run.

Here you can set you final configurations such as Engine Count, Thread Count etc. then start your performance test.