当前位置:网站首页>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
边栏推荐
- 2022-07-02 advanced network engineering (XV) routing policy - route policy feature, policy based routing, MQC (modular QoS command line)
- Chapter 1: find the algebraic sum of odd factors, find the same decimal sum s (D, n), simplify the same code decimal sum s (D, n), expand the same code decimal sum s (D, n)
- 05 -- QT OpenGL draw cube uniform
- [leetcode] [SQL] notes
- QT -- qfile file read / write operation
- I didn't cancel
- 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
- 第二章:求a,b的最大公约与最小公倍数经典求解,求a,b的最大公约与最小公倍数常规求解,求n个正整数的的最大公约与最小公倍数
- Ae/pr/fcpx super visual effects plug-in package fxfactory
- [proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
猜你喜欢

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

During MySQL installation, the download interface is empty, and the components to be downloaded are not displayed. MySQL installer 8.0.28.0 download interface is empty solution

Summary of composition materials for 2020 high-frequency examination center of educational resources

Why should the gradient be manually cleared before back propagation in pytorch?

FBI warning: some people use AI to disguise themselves as others for remote interview

Flume learning notes

Think of new ways

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

SQL injection for Web Security (1)

BOC protected amino acid porphyrins TAPP ala BOC, TAPP Phe BOC, TAPP Trp BOC, Zn · TAPP ala BOC, Zn · TAPP Phe BOC, Zn · TAPP Trp BOC Qiyue
随机推荐
unittest框架基本使用
Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
Compared with 4G, what are the advantages of 5g to meet the technical requirements of industry 4.0
Web Security (VIII) what is CSRF attack? Why can token prevent csdf attacks?
[wallpaper] (commercially available) 70 wallpaper HD free
Utilisation de base du cadre unitest
Go home early today
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
Chapter 1: recursively find the factorial n of n!
Day11 - my page, user information acquisition, modification and channel interface
Why should we do feature normalization / standardization?
Unittest framework is basically used
Driveseg: dynamic driving scene segmentation data set
2022-06-30 advanced network engineering (XIV) routing strategy - matching tools [ACL, IP prefix list], policy tools [filter policy]
Cross compile opencv with contrib
kubernetes集群搭建efk日志收集平台
Common text labels
Ego planner code parsing Bspline_ Optimizer section (1)
Yolov3 network model building
第一章:喝汽水,阶梯电费计算,阶梯电费计算函数,个人所税,求解平方根不等式,简化求解平方根不等式,求解调和级数不等式,解不等式:d<1+1/2-1/3+1/4+1/5-1/6+..士1/n