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

边栏推荐
- A white hole formed by antineutrons produced by particle accelerators
- Development and design of animation surrounding mall sales website based on php+mysql
- taobao. trade. Get (get some information of a single transaction), Taobao store order interface, Taobao oauth2.0 interface, Taobao R2 interface code docking and sharing
- Fabric.js 元素被选中时保持原有层级
- 卷积神经网络(入门)
- PTA question bank== > complex four operations, one for one, examination seat number (7-73)
- Openharmony notes --------- (4)
- OpenCV调用USB摄像头的点滴
- NLA自然语言分析,让数据分析更智能
- docker mysql
猜你喜欢

Tencent cloud tstor unified storage passed the evaluation of the first batch of basic file storage capabilities of the ICT Institute

天猫商品详情接口(APP,H5端)

socket(套接字)与socket地址

每日学习2

Xilinx Vivado set *.svh as SystemVerilog Header

Pycharm连接远程服务器

Yolov3 & yolov5 output result description

There is no solution to the decryption error of the remote user 'sa' and the service master password mapped from the remote server 'to the local user' (null) /sa '

Federated Search: all requirements in search

Fabric. JS zoom canvas
随机推荐
途家木鸟美团夏日折扣对垒,门槛低就一定香吗?
Tmall product details interface (APP, H5 end)
php链表创建和遍历
Reuse and distribution
Daily learning 3
Tencent cloud tstor unified storage passed the evaluation of the first batch of basic file storage capabilities of the ICT Institute
fatal: unsafe repository is owned by someone else 的解决方法
Implement a server with multi process concurrency
Solve the problem that openocd fails to burn STM32 and cannot connect through SWD
卷积神经网络(入门)
【空间&单细胞组学】第1期:单细胞结合空间转录组研究PDAC肿瘤微环境
Development and design of animation surrounding mall sales website based on php+mysql
buuctf-pwn write-ups (7)
一张图彻底掌握prototype、__proto__、constructor之前的关系(JS原型、原型链)
STM32-DAC实验&高频DAC输出测试
docker mysql
The use of TestNG, the testing framework (II): the use of TestNG XML
Threejs controller cube space basic controller + inertia control + flight control
threejs的控制器 立方体空间 基本控制器+惯性控制+飞行控制
jmeter脚本参数化