JMeter test interface test -JDBC

Foreword

Today we learn together how to use JMeter to test the database connection now!

A: Add a thread group, and then add the JDBC Connection Configuration (right-testing plan -> configuration elements -> JDBC Connection Configuration)

II: the configuration database connection information

DataBase URL:jdbc:mysql://{ip}:{port}/{dbname}?useUnicode=true&characterEncoding=utf8,其中

(1) dataname for the database name 

(2) useUnicode = true & characterEncoding = utf-8 format specified character codec utf-8

(3) JDBC Driver Class:  com.mysql.jdbc.Driver This is driven mysql database; the Username:  login database user name; Password:  password for the database

 

Three: Import driver package mysql, mysql download a good driver package (mysql-connector-java-5.1.22-bin.jar), jmeter into the lib directory, check the test plan, adding mysql driver package

 Four: Adding a thread group -> Right thread group -> Add jdbc request, and set

 

Five: Adding Debug PostProcessor used to get to see the value of variables phone, add tree view the results and run; the following results illustrate jdbc request and variable settings sponsored normal jmeter

 

Guess you like

Origin www.cnblogs.com/zhangwuxuan/p/12376459.html