Script Builder

Loadium Script Builder is a feature that aims to ease and quicken your load test preparation in terms of scripting.

Getting Started

There are 2 ways to utilize from Script Builder:

You can go to Create Page and choose Script Builder to start creating a test.

Creating a Script

Import

Loadium supports four different file types for importing into Script Builder.

Supported file types for import:

  • Postman Collection – Exported collection of API requests from Postman.

  • HTTP Archive (HAR) – Captured network traffic in HAR format.

  • Swagger (OpenAPI) – API definitions in Swagger/OpenAPI specification.

  • Loadium Recorder File – Files recorded using the Loadium Chrome extension.

Postman

By uploading your Postman collection to the script generator, you can easily organize it and make it ready for load testing. You can upload multiple collections at once.

Here is a preview of the script editor screen after the uploading is completed.

HTTP Archive (HAR)

Similar to Postman, you can easily import your files with the ".har" extension into the script generator.

Swagger

Loadium allows you to import your Swagger by uploading your Swagger file or using your Swagger URL.

Loadium Recorder (Google Chrome Extension)

Allows you to record HTTP requests, URLs, their parameters, and headers while you are browsing the web.

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.

Editing Script

You can start editing your script after you've followed one of the processes:

  • Pressing "Create" button,

  • Importing via Postman, HAR file, Swagger, or Loadium Recorder..

Collections

Collections allow you to separate the script into smaller pieces, making it easier to work with. Similar to Thread Groups in JMeter, you can add multiple collections to organize different parts of your test scenario independently. You can create collections by clicking "+ New" button.

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

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

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

  • Edit the label of your collection.

  • Duplicate the collection.

  • Delete the collection if you would like to.

For each request in the collection, you can:

  • Edit the request

  • Duplicate the request

  • Delete the request from collection

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

Requests

Method Type

You can set request types as GET, POST, PUT, PATCH, DELETE, and OPTIONS.

Query Params

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

Body

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

Headers

You can add a new header or delete the existing ones.

  • To remove a header, use the Delete (trash can) icon located at the end of the corresponding row.

  • To add a new header, click the "+" button located at the top right, and specify the Key and Value fields.

  • To bulk edit request headers, click "Bulk Edit" button at the top right corner.

After Editing

At the bottom of the page, you will see 2 buttons.

  • Clicking either "Save Test" or "Run Test" will redirect you to the Main Settings tab on the New Test page, with your .jmx file uploaded and ready to run.

  • You can also configure your test settings before saving your test by clicking Test Settings tab.

  • You can also download the file as JMX or JSON (Loadium Recorder) file.

Global Variables

You can define global variables to be used within requests when necessary. Utilizing this will make it easier when you need to constantly change some values within requests (for example, changing target URL from test environment to production environment).

Input Fields

  • Variable: Name of the variable to be referenced for usage.

  • Value: Value stored in the variable

  • Description: Entering some self-explanatory notes about the created variable

CSV Upload

Similar to JMeter, Script Builder supports CSV file upload so you can use dynamic data in your tests by referencing predefined values from your dataset.

Input Fields

  • Variable Names: Name of the variables to be referenced from CSV file (make sure to split your variable names by using comma).

  • Delimeter: The separator character used to split a dataset in a csv file.

  • Ignore first line: Toggle this option if you have header line in your csv file.

  • Recycle on End of File: Reuses the CSV data from the beginning after reaching the end.

Last updated

Was this helpful?