当前位置:网站首页>JMeter connection database
JMeter connection database
2022-07-03 19:31:00 【Xiaoqiang ~】
First, introduce jar package mysql-connector-java-8.0.11.jar, Put in :\apache-jmeter-5.3\lib\ext Under the table of contents .
1. Create a new configuration component in the thread group :

2. Fill in the above configuration elements : To connect mysql For example
Database URL: jdbc:mysql://localhost:3306/student_info?charset=utf-8&useSSL=false&serverTimezone=UTC&allowMultiQueries=true

3. Create a new thread in the thread group JDBC Request Sampler :

4. Get the response result of the sampler , Response status code :
Add to sampler Post Processors :beanshell Postprocessor ,
// Get the result information of the return sampler :
String response = prev.getResponseDataAsString();
// Get and return the sampler status code
String status = prev.getResponseCode();
// Output log information
log.info(response);
log.info(status);
// preservation 、 Take out the object
vars.putObject(" Object name ",Object); # Save the object
vars.getObject("OBJECT_NAME"); # Take out the object
5. Use regular expressions to extract response result field values


Check whether the extracted content is correct : You can add Sampler - Commissioning the samplers (debug-sampler)
5.1 Add... To the thread group BeanShell Sampler
Output the contents of regular expression :
log.info("msg1:"+"${msg1}");
6. Assertion - Response assertion :

6.1BeanShell Assertion :
String message ="${msg1}";
if(!message.equals("success")){
Failure = true;
FailureMessage = " Assertion failed ";
}else{
FailureMessage = " Assert success ";
}
In the view result tree, you can view the prompt of assertion failure
边栏推荐
- Read the paper glodyne global topology preserving dynamic network embedding
- 10 smart contract developer tools that miss and lose
- 第二十章:y= sin(x)/x,漫步坐标系计算,y= sin(x)/x 带廓幅图形,奥运五环,小球滚动与弹跳,流水显示,矩形优化裁剪,r个皇后全控nxn棋盘
- 第二章:基于分解的求水仙花数,基于组合的求水仙花数, 兰德尔数,求[x,y]内的守形数,探求n位守形数,递推探索n位逐位整除数
- unittest框架基本使用
- 第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数
- BOC protected alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC supplied by Qiyu
- unittest框架基本使用
- Day11 - my page, user information acquisition, modification and channel interface
- Luogu-p1107 [bjwc2008] Lei Tao's kitten
猜你喜欢

01. Preparation for automated office (free guidance, only three steps)

The earliest record

Chapter 2: find the classical solution of the maximum Convention and the least common multiple of a and B, find the conventional solution of the maximum Convention and the least common multiple of a a

Chapter 1: King Shehan miscalculated

This Chinese numpy quick look-up table is too easy!

QT -- qfile file read / write operation

2022-06-30 網工進階(十四)路由策略-匹配工具【ACL、IP-Prefix List】、策略工具【Filter-Policy】

Why should the gradient be manually cleared before back propagation in pytorch?
![[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD](/img/51/209e35e0b94a51b3b406a184459475.png)
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD

Octopus online ecological chain tour Atocha protocol received near grant worth $50000
随机推荐
TFs and SVN [closed] - TFs vs SVN [closed]
The earliest record
01 - QT OpenGL display OpenGL window
Ae/pr/fcpx super visual effects plug-in package fxfactory
I study database at station B (4): DQL
Day18 - basis of interface testing
Counting from the East and counting from the West will stimulate 100 billion industries. Only storage manufacturers who dare to bite the "hard bone" will have more opportunities
P3402 persistent and searchable
Leetcode 1189. Maximum number of balloons (special character count)
These problems should be paid attention to in the production of enterprise promotional videos
Basic principle of LSM tree
Chapter 1: extend the same code decimal sum s (D, n)
Day10 -- forced login, token refresh and JWT disable
unittest框架基本使用
Ego planner code parsing Bspline_ Optimizer section (3)
Thinking about festivals
Zhang Fei hardware 90 day learning notes - personal records on day 4, please see my personal profile / homepage for the complete
unittest框架基本使用
BOC protected alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC supplied by Qiyu
02 -- QT OpenGL drawing triangle