当前位置:网站首页>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
边栏推荐
猜你喜欢
< schéma de développement de la machine d'exercice oral > machine d'exercice oral / trésor d'exercice oral / trésor de mathématiques pour enfants / lecteur LCD de calculatrice pour enfants IC - vk1621
A white hole formed by antineutrons produced by particle accelerators
buuctf-pwn write-ups (7)
Yyds dry goods inventory software encryption lock function
TeamTalk源码分析之win-client
QT new project
富文本编辑器添加矢量公式(MathType for TinyMCE ,可视化添加)
Fabric. JS free draw circle
Pychart connects to the remote server
Yolov6 training: various problems encountered in training your dataset
随机推荐
Fabric. JS upper dash, middle dash (strikethrough), underline
What is erdma? Popular science cartoon illustration
buuctf-pwn write-ups (7)
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
篇9:XShell免费版安装
STM32 standard firmware library function name (I)
Factal: Unsafe repository is owned by someone else Solution
Design and implementation of car query system based on php+mysql
Threejs controller cube space basic controller + inertia control + flight control
每日学习2
Why can't browsers read JSX?
2. Const pointer
mathjax 入门(web显示数学公式,矢量的)
2、const 型指针
《可供方案开发》口算训练机/数学宝/儿童口算宝/智能数学宝 LCD液晶显示驱动IC-VK1622(LQFP64封装),原厂技术支持
The use of TestNG, the testing framework (II): the use of TestNG XML
taobao.logistics.dummy.send( 无需物流发货处理 )接口,淘宝店铺发货API接口,淘宝订单发货接口,淘宝r2接口,淘宝oAu2.0接口
Convolutional neural network (Introduction)
Fabric. JS manual bold text iText
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