You can execute performance tests on your app or website by running JMeter scripts in Load Test. Load Test enables you to run one or more JMeter scripts in a single test from the UI and provides a holistic view of test stats together with server-side monitoring and many more unique features. This document describes how to upload and run JMeter scripts in Load Test.

To run JMeter scripts in Load Test, you need to perform the following:

1. Upload JMeter scripts.
2. Select locations where you want to generate the load.
3. Run and analyze results.

## Pre-Requisites

Before uploading JMeter scripts in Load Test:

- Create JMeter scripts and save them on your machine in a ZIP format. While uploading a new script, zip your JMX file including any CSV data set, dependent JMX files, or additional plugins with the same name as your JMX name.

## Run JMeter Scripts

#### Test Name

Specify your Test Name. Do not use more than 64 characters, the first character must be alpha, and other characters can include alpha, numeric, or underscore.

#### JMeter Script

Select an existing script from the JMeter Scripts drop-down list, or Upload a new script by clicking the Upload JMX button. It will browse to the new JMX/Zip file having dependent resources. After you have uploaded a JMeter script, the script will be available in the JMeter Script drop-down list.

Click Add Script button to add the script for run the test. You can add multiple scripts. To remove a script from the drop-down, click the Delete Script button. You can also see the uploaded script in view mode by clicking on View Script button.

### Override JMeter Schedule Settings

You can override the JMeter schedule settings by enabling Threads, Duration, or Ramp Up options. Since we will be updating this value through the command line, it must be defined in thread properties by writing

- $ {__P(threads,100)} for number of threads
- ${__P(rampup,10)} for Ramp-Up Period
- ${__P(duration,600)} for Duration

If it is disabled, Netstorm will run with default values whatever is set in JMX. For example: Here default value will be 100 for threads, 10 for rampup, and 600 for duration.

Note: The values specified in the UI do not overwrite the actual values in your test plans. You should remove the hard-coded values in your script and replace them with the specified values to make sure these values are used.

### Set Distributed Mode

If you want to run a test from more than one location, you can run the test in the Distributed mode. In this mode, you can select multiple generators and distribute the load among generators.

Select the Run test in distributed mode check box, and then select one or more generator(s).

### Distribute Mode Options

### Distribute Threads among different generators

Select the Distribute threads among selected generators check box to divide threads equally among all generators otherwise, all generators will run total threads.

For example, if there are 1000 threads and 10 generators, each generator will run 100 threads. If the distribution is not enabled, then each generator will run 1000 threads.

Note: This mode cannot be used if you are parametrizing threads count.

### Perform Health Check of All Generators Option

By default, the health check option is enabled, where CPU, memory, and disk availability checks are performed before starting the test. If you are running a debug test, you can disable the health check.

### CSV Data Set File Splitting Options

You can split files with unique entries per JMeter instance using the CSV File Split options. Splitting is done based on the number of generators, which means that you are equally dividing the number of data lines among generators.

You can use the following splitting options:

- Split all files:Using this option, you can split all the files.
- Split file whose file name contains '<specified text >'For example, there are two data files - ProducID.csv and Login_split.csv, and if you want to split only Login_spilt.csv then you can, you can use ‘split’ as specified text and it will split only Login_split.csv.
- Do not split: Using this option, you can prevent splitting files.

Note:

- If splitting is to be done, the file name must not contain any variable name.
- Files must have data lines greater than or equal to the number of generators.

### Run Test

User is now ready to run the test. Click the Run test button to start the test.

## Advanced Settings

In the Advanced Settings section, you can specify additional parameters that can be passed on to JMeter at runtime. This enables you to change the parameter values during runtime. For example, you can add domain names, user names, and key values.

To set additional parameters, expand the Advanced Settings section:

### JMeter JVM Settings

You can overwrite the minimum and maximum heap size values in MB.

### Optional Parameters

You can overwrite JMeter and Java properties in the Optional parameters field:-J< key >= < value > for JMeter and -D< key >= < value > for Java.

Example:

If you have a variable named as loopCount in the JMeter script and you want to set it at the start of your test, use the following format

-JloopCount=5 Similarly, for –D,
specify the following code in the Optional Parameters field:
-DloopCount=5

### Drill Down Reporting

Drill-down reporting helps in the analysis of transactions and view of all individual transaction start time, duration, HTTP status code, etc. To enable this option, select the check box Enable Drill Down Reporting.

### Transaction Tracing

Transaction tracing helps in the verification of transactions. we can view requests and responses in real-time. To enable this option, select the check box Enable Transaction Tracing and select the further options as required.

Tip:

- Every thread in a JMeter script is called a virtual user.
- URLs are HTTP samples executed by virtual users.
- Pages consists of one or more URL in the context of the same sampler. For example, if an embedded resource is enabled, then one page will have many URL records.
- Transactions are the same as Transaction Controller. One transaction will have one or more pages if 'Generate Parent Sample' is enabled in the transaction controller.
- A session (iteration) of a virtual user is a group of samples executed within a given time frame. For example, a single session can contain multiple samples and transactions.
- A single user can run multiple sessions (iterations). As soon as one session ends, a new session is started after any configured session pacing. The session ends when one of the following conditions is satisfied:
  - Inactivity time-out (default 1 minute)
  - Maximum session duration (default 5 minutes)
  - Maximum Pages in one session (default 100 pages)

These settings can be tuned by passing the following additional parameters:

-DcavSessionIdleTimeout=<idle time in seconds>
-DcavSessionMaxTime=<maximum time in seconds>
-DcavSessionMaxPages=<number of pages

### Analyze Results

Once the test starts, you can see the transaction summary in the bottom window.

### Open Dashboard

After running the test, you can analyze the test by clicking on Dashboard at the top pane of the screen.

1. You can also see the dashboard of different locations. You can easily get an insight into the location from where you observe high response time.
2. Transaction Detail Report (View Transactions): Give screens of generator comparison.

### Download Test Logs

You can download JMeter execution logs in addition to Load Test execution logs(TestRunoutput). To download the test, click onManage Load > Logs> Log Viewer.

In the log viewer page click on the download icon for the test log which needs to be downloaded.

### Open Page Dump

To access Page Dump, click on Reports> Ready > Page Dump Report.

On click the Page Page Dump Report, shows the following details of the page dump options.

### Drill Down

To view the drill-down reports, click Reports and then Drill Down.

Here, you can view the available drill-down reports, such as:

- URL
- Session
- Transaction
- Page

#### URL

This report displays URL summary, such as URL name, number of tries, number of successes, number of failures, minimum duration, average duration, maximum duration, median, 80th percentile, 90th percentile, 95th percentile, 99th percentile, percentage fail, and script count.

#### Further Reports in this Section

You can view further reports from this window by clicking the specified links.

- To view the URL instance report for tried attempts, click the Tried.
- To view the URL instance report for successful attempts, click the Success .
- To view the URL instance report for failed attempts, click the Fail.
- To view URL Component details, click the Average .
- To view URL Session Summary, click the Script Count.

#### Session

In JMeter, each thread executes all the sampler define in it, which is called a Session here. Load Test completes a session of threads when the total duration exceeds 5 minutes or after 100 samples are executed, whichever happens first.

This report displays the Session summary, such as Script name, number of tries, number of successes, number of failures, minimum duration, average duration, maximum duration, median, 80th percentile, 90th percentile, 95th percentile, 99th percentile, and fail percentage.

#### Further Reports in this Section

You can view further reports from this window by clicking the specified links.

1. To view the script file in script manager, click the Script Name link.
2. To view the Session instance report for tried attempts, click the Tried link.
3. To view the Session instance report for successful attempts, click the Success link.
4. To view the Session instance report for failed attempts, click the Fail link.
5. To view the Session details report, click the Average link.

### Transaction

This report displays a Transaction summary, such as transaction name, minimum duration, average duration, maximum duration, median duration, 8th percentile, 90th percentile, 95th percentile, 99th percentile, script count, number of tries, success, fails attempts, and fail percentage.

#### Further Reports in this Section

You can view further reports from this window by clicking the specified links.

- To view the Transaction details report, click the Average link.
- To view the Transaction session summary, click the Script Count link.
- To view the transaction instance for successful transactions, click the Tried link.
- To view the transaction instance for failed transactions, click the Fail link.

#### Page

You can also view the Page Summary report from the Drill Down Queries window. This window displays the following page summary details: Page name, number of tries, successes, and failures. It also displays the minimum, maximum, average, and median duration of the page along with 80th percentile, 90th percentile, 95th percentile, 99th percentile, fails percentage, and script count.

#### Other Reports from this Window

- To view the page instance report, click the Tried
- To view the page failure report, click the Fail
- To view the page component detail report, click the Average
- To view the page session summary report, click the Script Count