JMeter not only can test the interface, but also can stress test the database, or create data.
Preparation: Database address to be tested, user name and password, Oracle driver Ojdbc14.jar
First, put the Ojdbc14.jar into the JMeter path (.. \apache-jmeter-2.7\lib) Otherwise it will error cannot load JDBC driver class ' Oracle.jdbc.driver.OracleDriver '
Second, after starting JMeter add thread group, add under Thread Group-Configure component-jdbc Connection configuration
A few notes
Variable Name: Database connection pool names, similar to Web sites, you can create multiple connection holds, the following sites can specify connection pooling to read different configurations.
Validation Query: The default is select 1, if it is Oracle, you need to change to select 1 from dual, otherwise the error cannot create poolableconnectionfactory (ORA-00923: Requested from keyword not found)
Database URL: DB connection address, format Jdbc:oracle:thin: @ip: Port: Instance name is JDBC:ORACLE:THIN:@172.17.100.131:1521:ORCL
JDBC Driver CLASS:JDBC Driver, Oracle's fill Oracle.jdbc.driver.OracleDriver
Username: Database user name
Password: The corresponding database password
Third, add-sampler-jdbc Request under Thread Group
Variable Name: Fill in the connection pool name that you want to use in the previous step (Variable name in the previous step).
Query type: To execute the SQL statement type, select, Update, Commit, and so on
Query: The SQL statement to execute.
Iv. Adding listeners-View the results tree (you can also continue to add other, such as aggregated reports)
The structure is as follows
Examples of Ojdbc14.jar and articles can be downloaded from the following address
Link: Http://pan.baidu.com/s/1kUIoUqF Password: MFS2
jmeter3.1 Connection Database error, ORA-00923: Requested from keyword not found