当前位置:网站首页>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
边栏推荐
- Register address name mapping
- Postman data driven
- How long does the PMP usually need to prepare for the exam in advance?
- 華為HCIP-DATACOM-Core_03day
- Upgrade Alibaba cloud RDS (relational database service) instance to com mysql. jdbc. exceptions. Troubleshooting of jdbc4.communicationsexception
- 2022-07-06 unity core 9 - 3D animation
- The essence of high availability
- Simulation volume leetcode [general] 1705 The maximum number of apples to eat
- How does the project manager write the weekly summary and weekly plan?
- How to pass the PMP Exam in a short time?
猜你喜欢
信息安全实验三 :PGP邮件加密软件的使用
MySQL master-slave delay solution
STM32 clock system
JVM garbage collection detailed learning notes (II)
STM32 and motor development (from stand-alone version to Networking)
C language pointer (Part 1)
Common short chain design methods
2021 year end summary
Where is the answer? action config/Interceptor/class/servlet
【云原生】DevOps(一):DevOps介绍及Code工具使用
随机推荐
Common short chain design methods
Jenkins modifies the system time
How long does the PMP usually need to prepare for the exam in advance?
串口實驗——簡單數據收發
External interrupt to realize key experiment
C语言指针(特别篇)
Leetcode question brushing record (array) combination sum, combination sum II
5A summary: seven stages of PMP learning
Pycharm create a new file and add author information
What is the value of getting a PMP certificate?
【云原生】DevOps(一):DevOps介绍及Code工具使用
Jmeters use
Locust performance test 2 (interface request)
Record of structured interview
Selenium mouse sliding operation event
Leetcode刷题记录(数组)组合总和、组合总和 II
On December 8th, 2020, the memory of marketing MRC application suddenly increased, resulting in system oom
Pytest installation (command line installation)
Postman interface test (I. installation and use)
Idea development environment installation