当前位置:网站首页>Jmeter之BeanShell生成MD5加密数据写入数据库
Jmeter之BeanShell生成MD5加密数据写入数据库
2022-07-29 01:45:00 【代码小怡】
有部分数据直接插入数据库是不可以的,需要加密处理,例如密码都指定为加密后的数据字符串。今天我们来学习一下如何利用JMeter生成加密数据并写入MySQL数据库中。如何JMeter如何连接数据库,可以看我之前写的随笔,JMeter接口测试-JDBC测试。
一:添加线程组,再添加JDBC Connection Configuration(右键测试计划–>配置元件–>JDBC Connection Configuration),并配置数据库连接信息

二:导入mysql驱动包,下载好mysql的驱动包(mysql-connector-java-5.1.22-bin.jar),放到jmeter的lib目录下,选中测试计划,添加mysql驱动包
三:添加取样器-添加BeanShell取样器,写入以下代码:


四:添加线程组–>右键线程组–>添加jdbc request,在Query写入mysql插入数据的语句
五:添加监听器-察看结果树,点击运行,查看执行结果
最后感谢每一个认真阅读我文章的人,下面这个网盘链接也是我费了几天时间整理的非常全面的,希望也能帮助到有需要的你!
这些资料,对于想转行做【软件测试】的朋友来说应该是最全面最完整的备战仓库,这个仓库也陪伴我走过了最艰难的路程,希望也能帮助到你!凡事要趁早,特别是技术行业,一定要提升技术功底。希望对大家有所帮助……
如果你不想一个人野蛮生长,找不到系统的资料,问题得不到帮助,坚持几天便放弃的感受的话,可以点击下方小卡片加入我们群,大家可以一起讨论交流,里面会有各种软件测试资料和技术交流。
敲字不易,如果此文章对你有帮助的话,点个赞收个藏来个关注,给作者一个鼓励。也方便你下次能够快速查找。
自学推荐B站视频:
零基础转行软件测试:自学完软件测试,拿到了字节的测试岗offer,堪称B站最好的视频!
自动化测试进阶:已上岸华为,涨薪20K,2022最适合自学的python自动化测试教程,自己花16800买的,无偿分享

边栏推荐
- What is scope and scope chain
- The problem of modifying the coordinate system of point cloud image loaded by ndtmatching function in autoware
- QT learning notes -37.qregex and regular expressions
- Mathematical modeling -- red wine quality classification
- 【MQTT从入门到提高系列 | 09】WireShark抓包分析MQTT报文
- Vector similarity evaluation method
- [electronic components] constant voltage, amplify the current of the load (triode knowledge summary)
- “蔚来杯“2022牛客暑期多校训练营3,签到题CAJHF
- Day 14: continued day 13 label related knowledge
- [MySQL] SQL aliases the table
猜你喜欢

Try to understand the essence of low code platform design from another angle

Understand the clock tree in STM32 in simple terms

What is scope and scope chain

Custom MVC principle and framework implementation

Character flow comprehensive exercise problem solving process

iVX低代码平台系列详解 -- 概述篇(二)

JS dom2 and dom3

Mathematical modeling -- bus scheduling optimization

Comprehensive use method of C treeview control

Verilog procedure assignment statements: blocking & non blocking
随机推荐
Cookies and sessions
全志T3/A40i工业核心板,4核[email protected],国产化率达100%
Opencv image sharpness evaluation (camera autofocus)
In 2022, the official data of programming language ranking came, which was an eye opener
Jetpack--了解ViewModel和LiveData的使用
Day 14: continued day 13 label related knowledge
Related function records about string processing (long-term update)
Qt 内存管理小技巧
“蔚来杯“2022牛客暑期多校训练营3,签到题CAJHF
[云原生]微服务架构是什么
第十四天:续第十三天标签相关知识
Establish an engineering template based on STM32 in keil -- detailed steps
Qt源码分析--QObject(4)
Try to understand the essence of low code platform design from another angle
应用系统中的报表开发成本值多少?
控制输入框弹出弹窗 和不弹出窗口
autoware中ndtmatching功能加载点云图坐标系修正的问题
webview攻击
表单校验 隐藏的输入框 显示才校验
MySQL stores JSON format data