当前位置:网站首页>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
边栏推荐
- Why should the gradient be manually cleared before back propagation in pytorch?
- 第一章:喝汽水,阶梯电费计算,阶梯电费计算函数,个人所税,求解平方根不等式,简化求解平方根不等式,求解调和级数不等式,解不等式:d<1+1/2-1/3+1/4+1/5-1/6+..士1/n
- 2022.2.14 Li Kou - daily question - single element in an ordered array
- Day10 -- forced login, token refresh and JWT disable
- FBI warning: some people use AI to disguise themselves as others for remote interview
- BOC protected tryptophan porphyrin compound (TAPP Trp BOC) Pink Solid 162.8mg supply - Qiyue supply
- 2022-06-30 advanced network engineering (XIV) routing strategy - matching tools [ACL, IP prefix list], policy tools [filter policy]
- Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
- This Chinese numpy quick look-up table is too easy!
- UE source code analysis: uccharactermovementcomponent - rootmotion
猜你喜欢

Buuctf's different flags and simplerev

第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数

05 -- QT OpenGL draw cube uniform

Chapitre 1: le roi de shehan a mal calculé

Bright purple crystal meso tetra (4-aminophenyl) porphyrin tapp/tapppt/tappco/tappcd/tappzn/tapppd/tappcu/tappni/tappfe/tappmn metal complex - supplied by Qiyue

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

Yolov3 network model building

【LeetCode】【SQL】刷题笔记

第一章:求n的阶乘n!

How to build an efficient information warehouse
随机推荐
Chapter 1: King Shehan miscalculated
Zhang Fei hardware 90 day learning notes - personal record of day 3, please see my personal profile / homepage for the complete
[proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
PR 2021 quick start tutorial, material import and management
FBI警告:有人利用AI换脸冒充他人身份进行远程面试
Web Security (VIII) what is CSRF attack? Why can token prevent csdf attacks?
Use unique_ PTR forward declaration? [repetition] - forward declaration with unique_ ptr? [duplicate]
Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
NFT without IPFs and completely on the chain?
Recommend a GIF processing artifact less than 300K - gifsicle (free download)
Octopus online ecological chain tour Atocha protocol received near grant worth $50000
Zhang Fei hardware 90 day learning notes - personal records on day 4, please see my personal profile / homepage for the complete
01. Preparation for automated office (free guidance, only three steps)
Buuctf's different flags and simplerev
2022 - 06 - 30 networker Advanced (XIV) Routing Policy Matching Tool [ACL, IP prefix list] and policy tool [Filter Policy]
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
5- (4-nitrophenyl) - 10,15,20-triphenylporphyrin ntpph2/ntppzn/ntppmn/ntppfe/ntppni/ntppcu/ntppcd/ntppco and other metal complexes
第二章:基于分解的求水仙花数,基于组合的求水仙花数, 兰德尔数,求[x,y]内的守形数,探求n位守形数,递推探索n位逐位整除数
Chapter 1: find all factorial sums, Grand Prix site unified programming, three factorial sums, graphic point scanning, recursive factorial n of n!, Find the factorial n of n!, King Shehan miscalculate
【LeetCode】【SQL】刷题笔记