HANA DB test plan using JMeter – Part 2- ODATA

The second part we will explores the process of creating test plan for HANA using ODATA. In the first part we i have covered the process of creating test plan using JDBC. You can check out the first part by accessing HANA DB test plan using JMeter

As a first step we need to create a ODATA service for the the ORDERS table that we have created in the earlier part. Nothing fancy about this, a simple service that you can use to perform CRUD operations on the ORDERS table.

Preconditions:

Unlike JDBC we don’t need any thing else but the JMeter binaries.We will use HTTP to access ODATA services,

so we don’t need to copy any HANA jar files to the ./lib folder.

Building the test plan:

We are going to follow the below steps to create a test plan.

Create a Thread group.

Define variables ( Optional, Need only if you need some random numbers or counters)

Create HTTP request.

Create Config element.

Add listener.

Create a Thread group

First step for any test plan is to create a thread group. Thread group configuration will control

the number of threads JMeter will use to execute the test.

Test plan -> Add -> Threads -> Thread Group.

We are going to execute this test with 10 concurrent users and each user executes the services 1000,

so it will be total of 10 * 1000 = 10000 requests. There is no ramp-up time between the threads, so all the threads will start at once.

2. Define variables ( Optional )

As a next step we are going to define a counter to increment the value for the ORDER_ID primary key.

Test plan -> Add -> Config element -> Counter.

The reference name for the counter variable is “ORDER_ID”. We will use this name to refer the counter in HTTP Request.

3. Create HTTP request

As a next step we need to create a HTTP request. We are going to access out ODATA service using HTTP.

Test plan -> Add -> Sampler -> HTTP Request

Server Name: Will be HANA Host name / IP Address

Port Number : HANA XS port. 80<Instance number>

Method: We are testing create operation on the ODATA service, so we have selected “POST”

Path: Path to ODATA service.

Body: Content for the create operation. We have used the counter variable “ORDER_ID” in

the body to uniquely generate a number.

4. Create HTTP Header Manager

We need to create HTTP header manager and provide the authorization details here.

HTTP request -> Add -> Config Element -> HTTP Header Manager

I copied the Authorization value from the Postman chrome extension.

Content-type header need to be set to application/json.

5. Add listener.

We can add any number of listeners as we need. Listeners helps to view, save and read test results.

There are lot of listeners available, based on the desired output you can choose the one that fits the needs.

We are going to add Summary report and result tree listener.

Summary Report:

Summary report provides average time , min and max time in ms for each request.

Result Tree:

The result listener helps you to track each HTTP request. You can check the time it took for each request and you