当前位置:网站首页>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
边栏推荐
- 串口實驗——簡單數據收發
- Druid monitoring - Introduction to JMX usage and principle
- What is the use of PMP certificate?
- C语言指针(中篇)
- 华为HCIP-DATACOM-Core_03day
- Add new item after the outbound delivery order of SAP mm sto document is created?
- Postman interface test (II. Set global variables \ sets)
- Expérience de port série - simple réception et réception de données
- Analysis of Hessian serialization principle
- Jmeters use
猜你喜欢
Screen automatically generates database documents
Jenkins modifies the system time
Register address name mapping
Upgrade Alibaba cloud RDS (relational database service) instance to com mysql. jdbc. exceptions. Troubleshooting of jdbc4.communicationsexception
Using JWT to realize login function
【SVN】SVN是什么?怎么使用?
stm32和电机开发(从单机版到网络化)
Jemter operation
Regular matching starts with XXX and ends with XXX
C language pointer (Part 2)
随机推荐
What are the conditions for applying for NPDP?
Why is access to the external network prohibited for internal services of the company?
串口實驗——簡單數據收發
Analysis of Hessian serialization principle
MySQL common statements
信息安全实验一:DES加密算法的实现
Variable parameter of variable length function
C language pointer (Part 1)
Storage of data in memory
H3C vxlan configuration
MySql数据库-事务-学习笔记
嵌套(多级)childrn路由,query参数,命名路由,replace属性,路由的props配置,路由的params参数
Locust performance test 3 (high concurrency, parameter correlation, assembly point)
華為HCIP-DATACOM-Core_03day
[SVN] what is SVN? How do you use it?
答案在哪里?action config/Interceptor/class/servlet
Leetcode刷题记录(数组)组合总和、组合总和 II
STM32 and motor development (from stand-alone version to Networking)
Run can start normally, and debug doesn't start or report an error, which seems to be stuck
信息安全实验二 :使用X-SCANNER扫描工具