The JDBC Request sampler

Sometimes, it's necessary to test durability and I/O operations against the database directly. How fast are inserts, updates, and selects on the tables in question? For such tests, JMeter provides a JDBC Request sampler to help issue SQL queries against the database. However, to use it, we need to set up a JDBC Connection Configuration component. Setting up this component requires us to point to a database. So let's go ahead and set up the database. Normally, this will already be set up for you to test against, but for illustrative purposes, we are going to assume none has been set up. We will be using H2, an open source pure Java SQL database. It is lightweight and relatively easy to set up.

Setting up an H2 database

Get Performance Testing with JMeter 2.9 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.