Just now "Vivid" wrote an automated test experience; quite a bit of sarcasm haha, yesterday asked me jmeter how to check the database, afternoon time is not very crowded on the writing, interested friends can see.
First build the test tool and the jar package:
1:jmeter (do not install the JDK after installation)
2: Database driver (we have MySQL here for example) This need to download the URL Baidu a bit can
OK now let's start testing:
The first step: put the downloaded Mysql-connector-java-5.1.42-bin.jar into the \apache-jmeter-3.1\apache-jmeter-3.1\lib directory
Part Two: Open JMeter, add the path of our downloaded Mysql-connector-java-5.1.42-bin.jar in the test plan, or it can be in the Jmeter/lib directory above
Step three: Create a thread to rent; Add a configuration component to the Threads Group: JDBC Connection Configuration
Fourth: In our creation: JDBC Connection Configuration Fill in a few lines of parameters
Varible Name: Customizing a name
Database URL: The front jdbc:mysql://unchanged followed by filling in the databases Address: port:/Database name
JDBC Driver class: Fixed fill Com.mysql.jdbc.Driver
Username: Database Login user Name
Passwork: Password
That's half done. Create a request Select the table content you want to see; Of course you can also fix that, add, delete
The fifth step: we create a sampler:jdbcrequest; Here we take note of the day parameter here to Varible name and the previous varible name: The custom name is the same; we'll just fill in the SQL statement in query.
Sixth step: Our Sword a result number can list the data you want to query, such as:
Old Lee of the old Yellow house next door
JMeter Interface Test Database