当前位置:网站首页>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
边栏推荐
- Day11 - my page, user information acquisition, modification and channel interface
- 2022-06-28 advanced network engineering (XIII) IS-IS route filtering, route summary, authentication, factors affecting the establishment of Isis neighbor relations, other commands and characteristics
- 第一章:递归求n的阶乘n!
- Sentinel source code analysis part II - sentinel dashboard console startup and configuration
- Free year-end report summary template Welfare Collection
- Chapter 1: simplify the same code decimal sum s (D, n)
- Chapter 1: extend the same code decimal sum s (D, n)
- The necessity of lean production and management in sheet metal industry
- Why should we do feature normalization / standardization?
- 2022-07-02 advanced network engineering (XV) routing policy - route policy feature, policy based routing, MQC (modular QoS command line)
猜你喜欢
第一章:求所有阶乘和数,大奖赛现场统分程序设计,三位阶乘和数,图形点扫描,递归求n的阶乘n!,求n的阶乘n!,舍罕王失算
Chapter 1: extend the same code decimal sum s (D, n)
BOC protected alanine porphyrin compound TAPP ala BOC BOC BOC protected phenylalanine porphyrin compound TAPP Phe BOC Qi Yue supply
BOC protected phenylalanine zinc porphyrin (Zn · TAPP Phe BOC) / iron porphyrin (Fe · TAPP Phe BOC) / nickel porphyrin (Ni · TAPP Phe BOC) / manganese porphyrin (Mn · TAPP Phe BOC) Qiyue Keke
第二章:基于分解的求水仙花数,基于组合的求水仙花数, 兰德尔数,求[x,y]内的守形数,探求n位守形数,递推探索n位逐位整除数
I study database at station B (4): DQL
PR 2021 quick start tutorial, how to create a new sequence and set parameters?
CesiumJS 2022^ 源码解读[7] - 3DTiles 的请求、加载处理流程解析
Flutter network and data storage framework construction-b1
Day18 - basis of interface testing
随机推荐
Flutter network and data storage framework construction-b1
NFT without IPFs and completely on the chain?
The earliest record
Chapter 2: find the number of daffodils based on decomposition, find the number of daffodils based on combination, find the conformal number in [x, y], explore the n-bit conformal number, recursively
CesiumJS 2022^ 源码解读[7] - 3DTiles 的请求、加载处理流程解析
[water quality prediction] water quality prediction based on MATLAB Fuzzy Neural Network [including Matlab source code 1923]
Chapter 20: y= sin (x) /x, rambling coordinate system calculation, y= sin (x) /x with profile graphics, Olympic rings, ball rolling and bouncing, water display, rectangular optimization cutting, R que
QT -- qfileinfo file information reading
Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
[free sharing] kotalog diary2022 plan electronic manual ledger
Comments on flowable source code (37) asynchronous job processor
Summary of 90 day learning materials and notes of Zhang Fei's actual electronic hardware engineer
This Chinese numpy quick look-up table is too easy!
Chapter 1: sum of three factorials, graph point scanning
第一章:拓广同码小数和s(d, n)
Unittest framework is basically used
Zhang Fei hardware 90 day learning notes - personal record of day 3, please see my personal profile / homepage for the complete
第二十章:y= sin(x)/x,漫步坐标系计算,y= sin(x)/x 带廓幅图形,奥运五环,小球滚动与弹跳,流水显示,矩形优化裁剪,r个皇后全控nxn棋盘
math_ Taylor formula
Valentine's Day - make an exclusive digital collection for your lover