Environment
①jmeter version: 3.2,jdk:1.8;
②postgresql The driver package postgresql-9.3-1103.jdbc4, place the jar package in the. Under \apache-jmeter-3.2\lib\ file;
Download Link:https://pan.baidu.com/s/1c2q94La extract Password: cb5h
"JMeter Configuration"
(1) Add configuration element "JDBC Connection Configuration";
Function: Used to configure the JDBC connection PG database;
Configuration:
①validation query Custom input, here I enter: pgsql;
②DATABASEURL:JDBC:POSTGRESQL://192.168.1.33:11921/GDW (IP: port: Initial library)
③JDBC Driver Class:org.postgresql.Driver
Example:
(2) Add Sampler "JDBC Request"
Role: Used to initiate SQL requests;
Configuration:
① Sampler in variable name bound to pool in variable name and JDBC Connection configuration in variable name bound to pool variable name remains Consistent
②query the type of SQL statement in Type:query, select the type of SQL operation you need;
③query:sql statement;
④ parameterization: With the CSV Data Set Config, you can directly use the "${parameter name}" for parameterization, see update example;
⑤update Example:
Jmeter_ implementation of the PostgreSQL database