当前位置:网站首页>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
边栏推荐
- 第二十章:y= sin(x)/x,漫步坐标系计算,y= sin(x)/x 带廓幅图形,奥运五环,小球滚动与弹跳,流水显示,矩形优化裁剪,r个皇后全控nxn棋盘
- I didn't cancel
- QT -- qfileinfo file information reading
- Webrtc[41] - Analysis of the establishment process of webrtc transmission channel
- Zhang Fei hardware 90 day learning notes - personal record of day 3, please see my personal profile / homepage for the complete
- Chapter 2: find the box array, complete number in the specified interval, and improve the complete number in the specified interval
- 第一章:求所有阶乘和数,大奖赛现场统分程序设计,三位阶乘和数,图形点扫描,递归求n的阶乘n!,求n的阶乘n!,舍罕王失算
- BOC protected alanine porphyrin compound TAPP ala BOC BOC BOC protected phenylalanine porphyrin compound TAPP Phe BOC Qi Yue supply
- BOC protected tryptophan porphyrin compound (TAPP Trp BOC) Pink Solid 162.8mg supply - Qiyue supply
- Sentinel source code analysis part I sentinel overview
猜你喜欢
Day18 - basis of interface testing
Chapter 1: seek common? Decimal and S (D, n)
[wallpaper] (commercially available) 70 wallpaper HD free
第一章: 舍罕王失算
2022-06-25 网工进阶(十一)IS-IS-三大表(邻居表、路由表、链路状态数据库表)、LSP、CSNP、PSNP、LSP的同步过程
Day_ 18 IO stream system
The necessity of lean production and management in sheet metal industry
EGO Planner代码解析bspline_optimizer部分(3)
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
Why should we do feature normalization / standardization?
随机推荐
Thinking about festivals
Day11 - my page, user information acquisition, modification and channel interface
Chapter 1: drinking soft drinks, step tariff calculation, step tariff calculation function, personal income tax, solving square root inequality, simplifying solving square root inequality, solving dem
Chapter 1: sum of three factorials, graph point scanning
Summary of learning materials and notes of Zhang Fei's actual combat electronics 1-31
Unittest framework is basically used
kubernetes集群搭建efk日志收集平台
Zhang Fei hardware 90 day learning notes - personal records on day 2, please see my personal profile / homepage for the complete
[leetcode] [SQL] notes
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
第二章:4位卡普雷卡数,搜索偶数位卡普雷卡数,搜索n位2段和平方数,m位不含0的巧妙平方数,指定数字组成没有重复数字的7位平方数,求指定区间内的勾股数组,求指定区间内的倒立勾股数组
Chapitre 1: le roi de shehan a mal calculé
Basic principle of LSM tree
Ctrip will implement a 3+2 work system in March, with 3 days on duty and 2 days at home every week
PR 2021 quick start tutorial, material import and management
[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]
BOC protected tryptophan zinc porphyrin (Zn · TAPP Trp BOC) / copper porphyrin (Cu · TAPP Trp BOC) / cobalt porphyrin (cobalt · TAPP Trp BOC) / iron porphyrin (Fe · TAPP Trp BOC) / Qiyue supply
2022-06-30 网工进阶(十四)路由策略-匹配工具【ACL、IP-Prefix List】、策略工具【Filter-Policy】
How does if ($variable) work? [repeat] - how exactly does if ($variable) work? [duplicate]
IPv6 experiment