JMeter Interface Test Database

Source: Internet
Author: User
Tags custom name

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.