---
# System prepended metadata

title: Jmeter Load Test

---

# Jmeter Load Test

This is a package of script for data-planet load test through Jmeter.

All scripts execute in a data-planet account own by multi-users.

Before start the test, make sure you have installed java 8 or higher.

## Start the GUI

Use GUI to define the parameter that you need.

```shell
cd Jmeter_load_test

sh GUI.sh      #  This shell is a shortcut to call the GUI.
```

Click **File -> Open**, then select the script.

There are two different ways to get the access token by the setup thread, which you can use according to the situation.

In both of them have a **Parameter Sampler**, which contains the parameter all you need in the script, do not forget to setup the parameter.

## Explain the parameter

### Connection info

**ip** - Data-planet server ip.

**port** - Data-planet server port.

**protocol** - Data-planet server use whether http or https.

---

### Login info

**keycloakip** - Keycloak server ip.

**keycloakport** - Keycloak server port.

**keycloakprotocol** - Keycloak server use whether http or https.

**client_id** - Data-planet's client_id in Keycloak

**client_secret** - Data-planet's client_secret in Keycloak


**username** - Account email for data-planet.

**passowrd** - Account password for data-planet.

---

### About test

**userNum** - Concurrency number.

**executeLoopCount** - The times you want to loop the test.

**filepath** - Just for upload, the path of upload file.

**categoryID** - The target category you want to test.

**requestInterval** - Interval between every loop, measured in millisecod.

**connectionTimeout** - Jmeter endure for a connection to be established, measured in millisecod.

**responseTimeout** - Jmeter endure for get response from server, measured in millisecod.

**createNum** - In **createDataset.jmx**, num of dataset you want to create.

**startIdx** - In **createDataset.jmx**, numbered dataset from **startIdx**.

---

## Select the script

There are several project provided, and you can execute the test by below command.

```shell
cd Jmeter_load_test

sh ./apache-jmeter-5.6.3/bin/jmeter.sh -n -t <script.jmx> -l <listener.jtl>     # execute command
sh ./apache-jmeter-5.6.3/bin/jmeter.sh -n -t script/randomAccessDataset.jmx -l script/listener/result.jtl  # just for example
```

### Script introduction

**createDataset** - Create dataset in certain category for test.

**deleteDataset** - Delete dataset in certain category. It searched by parentID, so it will not delete dataset recursively.

**dataExploration** - Simulate multi-user to manipulate data-exploration in certain category, every user will send a request with 3 x-axises and 2 y-axises, but **THIS SCRIPT CANNOT USE IN GEOGRAPHY CASE**.

**geoDataExploration** - Simulate multi-user to manipulate data-exploration in certain category, every user will send a request with 1 x-axis and 2 y-axises, the **x-axis must bt geography type**, so check out the dataset in test category to avoid the script deadlock.

**randomAccessDataset** - Simulate multi-user to view the homepage and data-profile

**randomUploadDataset** - Simulate multi-user to update dataset in certain category

## Obeserve the result

After end the test, open your listener file to see the result.

You can also open the Jmeter GUI, right click test plan to add a listener, select the <.jtl> file then it will automatically parse the results.