当前位置:网站首页>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

边栏推荐
- Factal: Unsafe repository is owned by someone else Solution
- 每日学习2
- Generally speaking, if the error of inconsistent tab and space occurs frequently
- C语言高级用法--函数指针:回调函数;转换表
- 3. Function pointers and pointer functions
- Daily learning 2
- taobao. logistics. dummy. Send (no logistics delivery processing) interface, Taobao store delivery API interface, Taobao order delivery interface, Taobao R2 interface, Taobao oau2.0 interface
- Yyds dry goods inventory software encryption lock function
- docker mysql
- Basic knowledge of QT original code
猜你喜欢

一张图彻底掌握prototype、__proto__、constructor之前的关系(JS原型、原型链)

实现一个多进程并发的服务器

富文本编辑器添加矢量公式(MathType for TinyMCE ,可视化添加)

C#代码审计实战+前置知识

复用和分用

Yyds dry goods inventory software encryption lock function

Socket and socket address

The most complete analysis of Flink frame window function

提示:SQL Server 阻止了对组件‘Ad Hoc Distributed Queries ‘的STATEMENT ‘OpenRowset/OpenDatasource“”

途家木鸟美团夏日折扣对垒,门槛低就一定香吗?
随机推荐
taobao. logistics. dummy. Send (no logistics delivery processing) interface, Taobao store delivery API interface, Taobao order delivery interface, Taobao R2 interface, Taobao oau2.0 interface
Talk about idempotent design
Actual combat sharing of shutter screen acquisition
Fabric. Keep the original level when JS element is selected
复用和分用
OpenHarmony笔记-----------(四)
Yolov6 training: various problems encountered in training your dataset
删除元素(带过渡动画)
快解析:轻松实现共享上网
Pycharm连接远程服务器
Advanced usage of C language -- function pointer: callback function; Conversion table
PHP linked list creation and traversal
STM32 library function for GPIO initialization
Fabric. JS free draw circle
taobao. trades. sold. Get query the transaction data that the seller has sold (according to the creation time), Taobao store sales order query API interface, Taobao R2 interface, Taobao oauth2.0 trans
求轮廓最大内接圆
途家木鸟美团夏日折扣对垒,门槛低就一定香吗?
Certik released the defi security report in 2021, disclosing key data of industry development (PDF download link attached)
Pychart connects to the remote server
Xilinx Vivado set *.svh as SystemVerilog Header