As the name suggests, this component helps create a connection to the database from the supplied settings. Each thread can have its own dedicated connection or connections may be pooled between threads:
- Copy the JDBC driver (h2-1.3.171.jar or similar) from the H2_HOME/bin folder to the JMETER_HOME/lib/ext folder.
- Add a JDBC Connection Configuration component to the test plan by right-clicking on Test Plan and navigating to Test Plan | Add | Config Element | JDBC Connection Configuration.
- Configure the properties, as follows:
- Variable Name: testPool
- Validation Query: Select 1 from dual
- Database URL: jdbc:h2:tcp://localhost//tmp/test;MVCC=TRUE (those using Windows should use jdbc:h2:tcp://localhost/c:/test;MVCC=TRUE ...