当前位置:网站首页>JMeter JDBC batch references data as input parameters (the simplest method for the whole website)
JMeter JDBC batch references data as input parameters (the simplest method for the whole website)
2022-07-07 09:21:00 【Give you a little moon】
Jmeter JDBC Batch reference data as input parameters ( The easiest way to complete the website !!!)
Preface
1. Bloggers are learning jmeter Performance testing , I hope I can keep on , Recently, I learned this method by watching some videos and materials , So it is recorded for your reference
2. The following is the simplest Jmeter JDBC Batch reference data as input parameters
Welcome to one button and three links , Pay attention, like to walk a wave (づ ̄ 3 ̄)づ
One .Jmeter Connect JDBC Preparatory work
1. New test plan -> New thread group
2. Check the version you want to connect to the database server , At present, my 8.0.21-5, And what we need mysql The best connection package is the up version , So I chose 8.0.22 edition
3. After downloading the connection package , hold mysql-connector-java-8.0.22 Inclusive jmeter In the installation path lib Catalog
4. On the test plan page, select “ Browse ”, hold lib Add the connection package in to the test plan
3、 ... and .Jmeter Connect JDBC
1. Click thread group -> The configuration element -> choice JDBC Connection Configuration
2. Refer to the following picture to modify the configuration
(1) modify JDBC Name and comment of connection configuration
(2) Fill in the variable name of the connection pool , Back jdbc The request will use , for example :mysql1
(3)Database URL Fill in the database url, The format is jdbc:mysql:// database url Address : Port number / Library name ?
allowMultiQueries=true Express jdbc Multiple connections can be made in the request sql, Not required
characterEncoding=utf8 Express jdbc Insert sql It can contain Chinese , Not required
for example :jdbc:mysql://xx/xx?allowMultiQueries=true&characterEncoding=utf8
(4)Username and Password Fill in the account and password of the database
3. Click thread group -> Sampler -> choice JDBC_Request
4.JDBC_Request Fill in the corresponding parameters in the page , Refer to the figure below to modify the configuration
(1)Variable Name of Pool declared in JDBC Connection Configuration( Connection pool variables in connection configuration ) Before filling mysql1
(2)Query Type( Query class ) choice Select Statement: For a single query sql
(3)SQL Fill in the data you want to query in the query area
(4)Variable name( Variable name ): Name the queried data , Such as goods_id
5. Add view result tree and debug sampler
6. To verify whether the configuration is successful, you can go to mysql Data in the library , Click on the run , You can see JDBC The response to the request was successful , Debugging the sampler can also get the batch column data we want to get
Two . Reference batch database data as input parameters
1. Click thread group -> Logic controller -> Circulation controller , Fill in the number of cycles on the cycle controller page , Such as 10
You can put the extracted data in the front 10 As input
2. Click thread group -> The configuration element -> Counter , Refer to the figure below to modify the configuration
(1)Starting value( Starting value ):1
(2) Increasing :1
(3) data format :0
(4) Quote name :N( We'll use that later ,index,i Will do , Equivalent to the subscript of the variable )
3. Fill in the interface that needs to reference parameters into the loop controller , Click function assistant in the menu , Drop down to select V( Common function ), Variable name filling goods_id_${N}, Finally, click generate
4. Replace goodsId Parameters
5. Click on the run , View the return result of the product details interface , Success returned to 10 Data
=========== Thank you for watching. , Welcome to one button and three links (●’◡’●)=======》END
边栏推荐
- Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]
- 网易云微信小程序
- stm32和电机开发(从单机版到网络化)
- Ppt template and material download website (pure dry goods, recommended Collection)
- Leetcode刷题记录(数组)组合总和、组合总和 II
- Variable parameter of variable length function
- STM32 and motor development (from stand-alone version to Networking)
- STM32 clock system
- H3C vxlan configuration
- Serial port experiment - simple data sending and receiving
猜你喜欢
Implementation of corner badge of Youmeng message push
Reading notes of pyramid principle
Jenkins task grouping
Register address name mapping
C language pointer (special article)
Several stages of PMP preparation study
JVM garbage collection detailed learning notes (II)
MySql数据库-索引-学习笔记
2021 year end summary
Postman data driven
随机推荐
DRF authentication, permissions, and flow restrictions (only for views in DRF)
Simulation volume leetcode [general] 1706 Where does the ball meet
C语言指针(下篇)
Three updates to build applications for different types of devices | 2022 i/o key review
Cmake command line use
[SVN] what is SVN? How do you use it?
Selenium mouse sliding operation event
2021 year end summary
Connecting mobile phone with ADB
Confitest of fixture py
Pycharm create a new file and add author information
STM32的时钟系统
C语言指针(特别篇)
Where is the answer? action config/Interceptor/class/servlet
Some pit avoidance guidelines for using Huawei ECS
STM32 and motor development (from stand-alone version to Networking)
MySQL common statements
On December 8th, 2020, the memory of marketing MRC application suddenly increased, resulting in system oom
Jemter operation
Jenkins automated email