Skip to main content
All CollectionsRunning Tests
Starter Script Builder
Starter Script Builder
V
Written by VPT
Updated over a week ago

VPT provides the ability to create a basic starter script which makes it easy for users with no JMeter scripting background to start running a test on VPT without needing to use JMeter. At the time of writing, it only allows you to add a single request to the Starter Script Builder.


Navigate to Starter Script Builder

The Starter Script Builder can be accessed from two different locations.

  1. Project Page: Navigate to a Project page, select Files tab, and click on the “Add a Starter Script” button.

    An image indicating the "Add a Starter Script" button on the Project Page's File tab

  2. Test Run Configuration: Navigate to the Test Run Configuration page by clicking on the “Run a Test” button on the header, VPT Home page or Project page and click on the “Add a Starter Script” button.

    An image indicating the "Add a Starter Script" button on the Test Run Configuration page

Starter Script Builder

After clicking on “Add a Starter Script,” you will be navigated to the Starter Script Builder page. The Starter Script Builder has 3 sections:

  1. Test Plan – Test Plan Name field, it is a mandatory field.

  2. Thread Group – It is a pool of users that will execute a scenario as part of the test. All the fields in the Thread Group are the basic configuration you will need for running a test, such as Thread Group Name, User, Ramp-up Time in Seconds, Duration in Seconds, Http Request Details – URL & Port Number. All fields in the Thread Group are mandatory except for the Port Number of Http Request.

  3. Response Assertion – It allows you to add pattern strings to be compared against the fields of the Request/Response data. A maximum of 5 response assertions can be added per test plan. For more information, please visit the official JMeter Response Assertion page.

    An image indicating the Starter Script Builder page

Add Response Assertion

Click on the “Add Response Assertion” button to add a response assertion.

An image indicating the "Add Response Assertion" button on Starer Script Builder page

All fields in a response assertion are mandatory except for the checkboxes. “Pattern to Test” only requires that at minimum one field is filled in. The “Add Response Assertion” button will be disabled until all the required fields are filled in.

An image indicating the "Add Response Assertion" button disabled until all required fields are filled in

After entering the necessary fields, the user has the option to add another response assertion validation. This allows for multiple response assertion validations per request.

An image indicating the "Add Response Assertion" button is enabled after entering the necessary fields

The Starter Script Builder interface requires users to fill out all necessary fields before the “Add Script” button becomes enabled.

An Image indicating the "Add Script" button is enabled after entering the necessary fields

Saved Starter Script

All starter scripts are saved as a JMX file. If you access the Starter Script Builder page from the Project Page > Files Tab, clicking on the “Add Script” button on Starter Script Builder will create and save the script under your project and return you to the Project page. The created Starter Script can be accessed by going to the Project page’s Files tab. To obtain the script, click the download icon.

An image indicating the "Add Script" button is enabled after entering the necessary fields

If you access the Starter Script Builder page from the Test Run Configuration Page, the script will be saved the same way and return you to the Test Run Configuration Page, where the JMX script is added to Test Files section. You can obtain the script also from here by clicking on the download icon.

An image indicating a start script JMX file and the download icon on Test Files section of Test Run Configuration page

Viewing Starter Script

To open a test script, you must first have JMeter installed on your system (JMeter download page). The steps below will explain how to verify the data provided in the Starter Script Builder.

  1. Open JMeter and click File > Open from the top menu to open the starter Script you created.

    An image indicating the JMeter tool's Open file menu

  2. The name of the test plan is displayed as how you set up, in this example “demo”, in the left pane. To view the Thread Group data provided in the Starter Script Builder, click on the Thread Group element indicated with the gear icon, in this example “demo-test”, in the left pane. Thread Group name and Thread Properties like Users, Ramp-up Time and Duration will be displayed on right pane as you provided.

    An image indicating the Thread Group options

  3. Click on the “HTTP Request” element on the left pane. The right pane displays the Protocol, Server Name and Port Number.

    An image indicating the HTTP Request options

  4. To view the Response Assertion data, click on the expand arrow on “HTTP Request” element. Click on each response assertion to view the data on the right pane.

    An image indicating the 1st Response Assertion options
    An image indicating the 2nd Response Assertion options

Did this answer your question?