In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
I believe many inexperienced people don't know what to do about how to use JDBC components in Jmeter. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
1. Create a test plan and add the configuration component JDBC Connection Configuration:
Note: in order to connect to the database using the JDBC component, you need to download the mysql driver file mysql-connector-java-5.1.28.jar and place it in the lib directory of jmeter. After adding the driver file, you need to restart, otherwise it will not take effect!
2. Add thread groups and add two new JDBC Request components. Why two? One is used to query the user name and password, and the other is used to query the number of users
The first JDBC Request is used for username and password
Query results:
The second JDBC Request user queries the number of users
Statistical results:
3. In order to log in with all the users, we use the loop controller to achieve this, and the number of cycles is the number of users. (the number of users queried in the previous step is 8, so we will loop 8 times)
4. Because the queried user data has multiple columns and rows, in order to get the data at once, you need to use the counter, and the value of the counter is + 1 each time.
Add a http request, which is passed as a parameter using the user name and password queried in the http request
It is worth noting that Jmeter does not support variable nesting. Here, the reference of two variables is realized with the help of the _ _ V () function.
After reading the above, have you mastered how to use the JDBC component in Jmeter? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.