Skip to main content
Back to blog
tutorials 20 March 2020 1 min read

JMeter Bolt Protocol

Learn how to use Apache JMeter's Bolt sampler to execute Cypher queries against Neo4j databases for performance testing graph database procedures.

M

Mark

Performance Testing Expert

Apache JMeter version 5.2 introduced the Bolt sampler, enabling users to execute Cypher queries via the Bolt protocol. This functionality proves particularly valuable for testing Neo4j procedures.

Key Components

The Bolt implementation in JMeter consists of two primary elements:

1. Bolt Connection Configuration

This component handles database connectivity details:

SettingExample Value
NameBolt Connection Configuration
URIbolt://localhost:7687
Usernameneo4j
Password(your password)

2. Bolt Request

This section accepts Cypher statements and optional parameters formatted in JSON. Parameters remain optional but support dynamic query values when needed.

Example Cypher Statements

Data Insertion

CREATE (ee:Person { name: "Emil", from: "Sweden", klout: 99 })

Data Retrieval

MATCH (ee:Person) WHERE ee.name = "Emil" RETURN ee;

Parameterized Query

With parameters {"personName": "Emil"}:

MATCH (ee:Person) WHERE ee.name = $personName RETURN ee;

Use Cases

  • Performance testing Neo4j stored procedures
  • Load testing graph database queries
  • Benchmarking Cypher query performance
  • Testing graph traversal operations under load

Further Reading

Tags:

#jmeter #neo4j #bolt #cypher #performance-testing

Need help with performance testing?

Let's discuss how I can help improve your application's performance.

Get in Touch