DEV Community

NaveenKumar Namachivayam ⚡
NaveenKumar Namachivayam ⚡

Posted on

Performance Testing Neo4j Database using Bolt Protocol in Apache JMeter

Introduction

Apache JMeter 5.2 has been released with lots of new features, enhancements, and bug fixes. JMeter 5.2 supports Bolt protocol out of the box. No need to install it via Plugins Manager. This blog post provides you an overview about performance testing Neo4j database using Bolt protocol in Apache JMeter 5.2

Prerequisite

Bolt Connection Configuration and Bolt Request

First, you need to add the basic elements such as Thread Group, Bolt Connection Configuration, and View Results Tree, then you need to add Bolt Request.

In Bolt Connection Configuration, you need to add the Bolt URI with the valid credentials. Default credentials of Neo4j is neo4j/neo4j. At first login, it will prompt you to change the password.

Once the connection is set up, next you need to load up the demo data in your Neo4j.

Detailed instructions are in here.

Bolt communicates over 7687 port.

Neo4j can be accessed from your favorite browser using http://localhost:7474.

Now, head back to JMeter and enter the below command in the Bolt Request.

MATCH (n:Movie) RETURN n LIMIT 25

Make sure you set the Record Query Results flag set to true, and then hit run.

In View Results Tree, you can see the response as shown below.

JMeter Output

Limitations

  • You cannot configure the pool size of Bolt Connection in this inception implementation.

  • You need to set the Record Query Results set to false for better performance.

Video Demo

Here is the complete video demo.

Sample Bolt Request Script

Bolt-Protocol-Script-JMeter

This repo has the sample JMeter test plan to demonstrate Bolt request. For detailed instruction, please visit my blog

Donate

Buy me a teaBuy me a tea




Latest comments (0)