当前位置:网站首页>Full of knowledge points, how to use JMeter to generate encrypted data and write it to the database? Don't collect it quickly
Full of knowledge points, how to use JMeter to generate encrypted data and write it to the database? Don't collect it quickly
2022-07-02 14:43:00 【Software test small P】
Add picture comments , No more than 140 word ( Optional )
It is not allowed to insert some data directly into the database , It needs to be encrypted , For example, passwords are specified as encrypted data strings . Today, let's learn how to use JMeter Generate encrypted data and write MySQL In the database . how JMeter How to connect to the database , You can read my previous essays ,JMeter The interface test -JDBC test .
One : Add thread group , Add again JDBC Connection Configuration( Right click test plan --> The configuration element -->JDBC Connection Configuration), And configure database connection information
Add picture comments , No more than 140 word ( Optional )
Two : Import mysql Drive pack , Download it mysql Driver package (mysql-connector-java-5.1.22-bin.jar), Put it in jmeter Of lib Under the table of contents , Select the test plan , add to mysql Drive pack
Add picture comments , No more than 140 word ( Optional )
3、 ... and : Add sampler - add to BeanShell Sampler , Write the following code :
12345 | import org.apache.commons.codec.digest.DigestUtils;// Random generation 8 Password with a combination of characters, numbers and letters String password ="${__RandomString(8,0123546789abcdefghijklmnpqrstuvwxyz,)";String pwd_md5 = DigestUtils.md5Hex(password);// Call function vars.put("pwd",pwd_md5);// Store the data |
Add picture comments , No more than 140 word ( Optional )
Four : Add thread group --> Right click thread group --> add to jdbc request, stay Query write in mysql A statement that inserts data
Add picture comments , No more than 140 word ( Optional )
5、 ... and : Add listener - Look at the fruit tree , Click on the run , View the execution results
边栏推荐
- Large top heap, small top heap and heap sequencing
- Generally speaking, if the error of inconsistent tab and space occurs frequently
- Fabric.js 手动加粗文本iText
- [development environment] StarUML tool (download software | StarUML installation | StarUML creation project)
- The most complete analysis of Flink frame window function
- Method of creating linked server for cross server data access
- taobao.trade.memo.add( 对一笔交易添加备注 )接口,淘宝店铺插旗接口,淘宝订单插旗API接口,oAuth2.0接口
- 跨服务器数据访问的创建链接服务器方法
- A white hole formed by antineutrons produced by particle accelerators
- Openharmony notes --------- (4)
猜你喜欢
Borui data integrated intelligent observable platform was selected into the "Yunyuan production catalogue" of China Academy of communications in 2022
Fabric. JS upper dash, middle dash (strikethrough), underline
uniapp自动化测试学习
Xilinx Vivado set *.svh as SystemVerilog Header
Socket and socket address
Fabric.js 上划线、中划线(删除线)、下划线
Tip: SQL Server blocked the state 'openrowset/opendatasource' of component 'ad hoc distributed queries'
Fabric. Usage of JS eraser (including recovery function)
复用和分用
Large top heap, small top heap and heap sequencing
随机推荐
taobao.trade.memo.add( 对一笔交易添加备注 )接口,淘宝店铺插旗接口,淘宝订单插旗API接口,oAuth2.0接口
使用mathtype编辑公式,复制粘贴时设置成仅包含mathjax语法的公式
Implement a server with multi process concurrency
微信小程序使用towxml显示公式
The most complete analysis of Flink frame window function
Tmall product details interface (APP, H5 end)
快解析:轻松实现共享上网
C语言高级用法--函数指针:回调函数;转换表
Chapter 9: xshell free version installation
OpenHarmony笔记-----------(四)
关于Flink框架窗口(window)函数最全解析
博睿数据一体化智能可观测平台入选中国信通院2022年“云原生产品名录”
obsidian安装第三方插件——无法加载插件
Yolov3 & yolov5 output result description
docker mysql
Design and implementation of car query system based on php+mysql
2、const 型指针
Thoroughly master prototype__ proto__、 Relationship before constructor (JS prototype, prototype chain)
Chinese science and technology from the Winter Olympics (III): the awakening and evolution of digital people
数据库连接池和数据源